Oregon State University Assembly Language Output Questions

Hello,

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

This is a quick session for reading Assembly Language x86 MASM input to gather output answers.

Select the pseudo-code that most closely corresponds to the following assembly code. Assume that the variables a, b, c, and d are initialized
elsewhere in the program.
a
.data
General purpose variables
SDWORD ?
SDWORD ?
с
SBYTE
?
SBYTE
?
upperLevel SDWORD
18
Lower Level SDWORD 3
; Strings
yes
BYTE “Yes”,0
no
BYTE “No”,0
maybe
BYTE “Maybe”,0
. code
main PROC
MOV
EAX, 0
MOV EBX, a
startLoop:
CMP
EAX, EBX
JGE endOfProgram
MOV EDX, OFFSET no
CALL WriteString
INC EAX
JMP startLoop
MOV EDX, OFFSET maybe
CALL WriteString
endOfProgram:
exit
main ENDP
END main
Suppose that result is declared as DWORD, and the following MASM code is executed:
MOV
EAX, 17
MOV EBX, 13
MOV ECX, 6
_label5:
ADD
EAX, EBX
ADD
EBX, 2
LOOP _label5
MOV result, EAX
What is the value stored in the memory location named result?
Given the following data declarations and code (within main), what is printed to the console window?
(Do not include “quotations” or “Press any key to continue”, simply write out anything printed with WriteString)
data
yes
no
maybe
BYTE
BYTE
BYTE
“Yes”,0
“No”,0
“Maybe: “,0
. code
MOV
CMP
JG
EAX, 20
EAX, 10
-printMaybe
_printNo:
MOV EDX, OFFSET no
JMP _finished
_printYes:
MOV EDX, OFFSET yes
JMP _finished
_printMaybe:
MOV EDX, OFFSET maybe
CALL WriteString
CMP
EAX, 15
JL -printYes
JMP _printNo
_finished:
CALL WriteString
No
Given the following data declarations and code (within main), what is printed to the console window?
(Do not include “quotations” or “Press any key to continue”, simply write out anything printed with WriteString)
.data
yes
BYTE
BYTE
“Yes”,0
“No”,0
no
. code
MOV EAX, 10
CMP EAX, 5
JG -printYes
MOV EDX, OFFSET no
JMP _finished
_printYes:
MOV EDX, OFFSET yes
_finished:
CALL WriteString
No

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER