Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write and execute the program as follows and note the results: address Instruction Comment 100 MOV CX,001A ;WE WILL USE CX AS A COUNTER, 1A=26

Write and execute the program as follows and note the results:

address Instruction Comment

100 MOV CX,001A ;WE WILL USE CX AS A COUNTER, 1A=26 DECIMAL

MOV DL,40 ;PREPARE HEX CHARACTER FOR WRITING TO SCREEN.

xxxx INC DL ;VALUE NOW IS 41H OR THE LETTER A IN ASCII.

MOV AH,02 ;SERVICE FOR WRITING TO SCREEN IS 02 AND INT 21

INT 21 ;WRITE CHARACTER FROM DL REG. TO THE SCREEN.

DEC CX ;SEE IF IT IS 26 TIMES, IF NOT,

JNZ xxxx ;GO BACK AND ADD 1 TO CL TO GET NEXT LETTER.

INT 3 ;HALT IF 26 TIMES (ALL 26 ALPHABETS WRITTEN).

Set the IP to 100 and execute the program by entering G.

B. Change the program to write the numbers 0 thru 9 to the screen.

III. Using the BX Register in the Register Indirect Mode

An instruction that has the BX register placed in square brackets is register indirect addressing. This means to use the number that is in the BX register as an address. Therefore, if 41H (the ASCII value for the letter A) is placed at the address 400, then the instructions MOV BX,400 followed by MOV DL,[BX] will move the code for the letter A into the DL register. Demonstrate this by placing the code for A at address 400, moving this code to the DL register and writing the letter to the screen.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago