Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: this assignment from microprocessor and Interface Course. 1) addition and substraction 2+3-1=4 2) Reverse String 1 input string and output: ; Displaying a string

Note: this assignment from microprocessor and Interface Course.

1) addition and substraction 2+3-1=4 2) Reverse String

1 input string and output:

; Displaying a string

include 'emu8086.inc' ; you have to write this line

PRINTN 'Enter length of string' mov ah,1h int 21h

; int 21h means, call the interrupt handler 0x21 which is the DOS Function dispatcher. ; the \"mov ah,01h\" is seeting AH with 0x01, which is the Keyboard Input with Echo handler ; in the interrupt printn print \"Enter String here: \" mov cl,al sub cl,'0' ; substract instruction mov dl,cl ; mov means move the content of cl registor to dl mov bx,0 p1: mov ah,1h int 21h ; again input mov [bx],ax ; doing a loop by transfering [x+bx] element to ax inc bx ; incrementing bx regitor dec cl cmp cl,0 ; comparing jne p1 ; jump not equal. jump to instruction p1 printn PRINT 'inputted string : ' mov cl,dl mov bx,0

output: mov dl,[bx] mov ah,2h int 21h inc bx dec cl cmp cl,0 jne output printn mov ax, 4c00h ; return to ms-dos // essential line int 21h

ret

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

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Determine miller indices of plane X z 2/3 90% a/3

Answered: 1 week ago

Question

3. Which of the two proposed designs would you recommend, and why?

Answered: 1 week ago