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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Which action is good business etiquette? a. switching your cell phone off before you enter a meeting b. keeping your cell phone on low volume before you enter a meeting c. setting a pleasant ring tone on your cell phone before you enter a meeting d. setting a standard ringtone on your cell phone before you enter a meeting
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
question
Computers and Technology, 24.06.2019 12:50
Write a new lc-3 trap subroutine (i.e. a subroutine that will be invoked via the trap instruction) that will receive a numeric digit entered at the keyboard (i.e. an ascii character), echo it to the screen, and return in r0 the corresponding numeric value: so if the user types the digit '7', the character '7' will appear on the screen, but the value returned in r0 will be b0000 0000 0000 0111 (#7) you may not use any trap calls in your code - you must implement the "polling" code that interrogates the keyboard status and data registers. ; getnum_tsr ; a subroutine for obtaining a numeric value ; given ascii numeric digit input to keyboard. ; the numeric digit is echoed to the console (e.g. '7' = b0000 0000 0011 0111), ; but the value returned in r0 is the actual numeric value ; corresponding to the digit (e.g. b0000 0000 0000 0111 =
Answers: 3
You know the right answer?
Select the pseudo-code that corresponds to the following assembly code. Assume that the variables a,...
Questions
question
Mathematics, 16.04.2021 23:10
question
Mathematics, 16.04.2021 23:10
question
Spanish, 16.04.2021 23:10
Questions on the website: 13722367