Question: Select the pseudo - code that corresponds to the following assembly code. Assume that the variables a , b , c , and d are
Select the pseudocode that corresponds to the following assembly code. Assume that the variables a b c and d are initialized elsewhere in the program.
You may want to review the usage of EAX, AH and AL IA registers
Also recall that the inequality a b is equivalent to b a
ie If A is greater than B that's equivalent to saying that B is less than A
data
; General purpose variables
a SDWORD
b SDWORD
c SBYTE
d SBYTE
upperLevel SDWORD
lowerLevel SDWORD
; Strings
yes BYTE "Yes",
no BYTE No
maybe BYTE "Maybe",
code
main PROC
MOV EAX,
CMP AH c
JG option
JMP option
option:
MOV EDX, OFFSET yes
CALL WriteString
JMP endOfProgram
option:
MOV EDX, OFFSET no
CALL WriteString
JMP endOfProgram
option:
MOV EDX, OFFSET maybe
CALL WriteString
endOfProgram:
exit
main ENDP
END main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
