Computer Science Illuminated
Computer Science Illuminated
6th Edition
ISBN: 9781284055917
Author: Nell Dale, John Lewis
Publisher: Jones & Bartlett Learning
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 6, Problem 39E

Explanation of Solution

Program code:

LDA   0X0048,i ;Load character "H" in the accumulator

STA   0X008B,d ;Store contents of accumulator in 8B

CHARO 0X008C,d ;Read character from specified location and ;Write on the screen

LDA   0X0065,i ;Load character "e" in the accumulator

STA   0X008B,d ;Store contents of accumulator in 8B

CHARO 0X008C,d ;Read character from specified location and ;Write on the screen

LDA   0X006C,i ;Load character "l" in the accumulator

STA   0X008B,d ;Store contents of accumulator in 8B

CHARO 0X008C,d ;Read character from specified location and ;Write on the screen

LDA   0X006C,i ;Load character "l" in the accumulator

STA   0X008B,d ;Store contents of accumulator in 8B

CHARO 0X008C,d ;Read character from specified location and ;Write on the screen

LDA   0X006F,i ;Load character "o" in the accumulator

STA   0X008B,d ;Store contents of accumulator in 8B

CHARO 0X008C,d ;Read character from specified location and ;Write on the screen

STOP     ;Stop processing

.END         ;End program

Explanation:

The above program code is used to write the word “Hello” on the screen by using direct addressing mode.

  • In the direct addressing mode, the operand in the instruction contains the address of the data which is needed to load into the accumulator.
  • As it follows 16-bit addressing, while writing a character, it writes the next address of the loaded location.

In the program code:

  • To write the character “H”,
    • It loads the hexadecimal value “(0X0048)” of the character “H” into the accumulator.
    • And it stores the content of the accumulator into the specified location “8B”...

Blurred answer
Students have asked these similar questions
I would like to know the main features about the following 3 key concepts:1. Backup Domain Controller (BDC)2. Access Control List (ACL)3. Dynamic Memory
In cell C21, enter a formula to calculate the number of miles you expect to drive each month. Divide the value of number of miles (cell A5 from the Data sheet) by the average MPG for the vehicle multiplied by the price of a gallon of gas (cell A6 from the Data sheet).
Microsoft Excel
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education