Question Solved: Write a program that will generate the following output. Using (Assembly language
Write a program that will generate the following output. Using (Assembly language)
X is CA
Y is EB
X+Y is ?? with c-flag(?) and o-flag(?)
X-Y is ?? with c-flag(?) and o-flag(?)
where the “??” are replaced with the appropriate values.
Repeat the output with X=46 and Y=74, and X=CB and Y=37.
Use the irvine procedures WriteString, WriteChar and Calf to produce the output. (You actually only need WriteString.)
HINT: You can replace characters by simply adding the displacement. For example, if you want to print out, “Cat number 57”, you can use the following code:
catnum BYTE “Cat number ??”,0Dh, 0Ah, 0
mov catnum+11, “5”
mov catnum+12, “7”
mov edx, catnum