Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Can someone help me with part B. I have already done part A.? I am using dosbox to execute the program but I can't get it right the program I wrote is below.

MOV CX,000A ;WE WILL USE CX AS A COUNTER, 000A=10 DECIMAL

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

0100 INC DL ;VALUE NOW IS 23H OR THE NUMBER 0 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 10 TIMES, IF NOT,

JNZ 0100 ;GO BACK AND ADD 1 TO CL TO GET NEXT NUMBER.

INT 3 ;HALT IF 10 TIMES (ALL 10 NUMBER WRITTEN).

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions

Question

Find V S . V P = 250 V N P = 730 turns N S = 275 turns

Answered: 1 week ago