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
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.
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