subject

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 DWORD ?
b DWORD ?
c BYTE ?
d BYTE ?
upperLevel DWORD 18
lowerLevel DWORD 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
a) if (c > 0)
print (yes);
else
print (maybe);
b) if (c < 0)
print (yes);
else
print (maybe);
c) if (c < 1)
print (yes);
else
print (maybe);
d) if (c > 1)
print (yes);
else
print (maybe);

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 11:30, kieante01
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
image
Computers and Technology, 23.06.2019 20:30, maryanapritchak1829
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
image
Computers and Technology, 24.06.2019 21:50, carter4026
The use of phrases, fragments, and punctuation can influence the mood of a passage; keeping this in mind, how would you describe the mood of the followingpassage? "fog on the essex marshes, fog on the kentish heights, fog creeping into the cabooses of collier-brigs; fog lying out on the yards, and hovering in the riggingof great ships; fog drooping on the gunwales of barges and small boats. fog in the eyes and throats of ancient greenwich pensioners, wheezing by thefiresides of their wards; fog in the stem and bowl of the afternoon pipe of the wrathful skipper; fog cruelly pinching the toes and fingers of his shivering little'prentice boy on deck." (5 points)
Answers: 2
image
Computers and Technology, 24.06.2019 22:00, sierrawalk2283
True or false technology is often discovered by accident
Answers: 2
You know the right answer?
Select the pseudo-code that corresponds to the following assembly code. Assume that the variables a,...

Questions in other subjects:

Konu
History, 16.10.2020 08:01
Konu
Mathematics, 16.10.2020 08:01