Question: Select the pseudo - code that corresponds to the following assembly code. Assume that the variables a , b , c , and d are

Select the pseudo-code 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 (IA32 registers).
Also recall that the inequality a > b is equivalent to b < a.
i.e. 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 18
lowerLevel SDWORD 3
; Strings
yes BYTE "Yes",0
no BYTE "No",0
maybe BYTE "Maybe",0
.code
main PROC
MOV EAX, 1
CMP AH, c
JG option1
JMP option3
option1:
MOV EDX, OFFSET yes
CALL WriteString
JMP endOfProgram
option2:
MOV EDX, OFFSET no
CALL WriteString
JMP endOfProgram
option3:
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!