7. (True/False): Nested procedure calls are not permitted by the Microsoft assembler unless the NESTED operator is used in the procedure definition.
15. What will be the final value in EAX after these instructions execute?
push 5
push 6
pop eax
pop eax
3. Which instruction pops the stack into the EFLAGS register?
17. Which statement is true about what will happen when the example code runs?
1: main PROC
2: mov eax,30
3: push eax
4: push 40
5: call Ex3Sub
6: INVOKE ExitProcess,0
7: main ENDP
8:
9: Ex3Sub PROC
10: pusha
11: mov eax,80
12: popa
13: ret
14: Ex3Sub ENDP
a. EAX will equal 40 on line 6
b. The program will halt with a runtime error on Line 6
c. EAX will equal 30 on line 6
d. The program will halt with a runtime error on Line 13
7. False (there is no NESTED operator).
15. 5
Explanation:
After the first push operation the stack contains (5). After the second push operation the stack contains (6) on top of 5 on the stack. The first pop operation removes the top of the stack (6) and stores it in EAX and after 2nd pop operation removes top stack (5) and stores it in EAX.The final value will be 5.
3. popf
17. (d)
Explanation:
It will crash on line 11 . This is because in
Ex2Sub
the pop eax
removes the topmost
item from the stack, which is the return address. So when
ret
tries to do the same, it will see the next item,
which was 20
and unlikely to be a correct code
address.
Get Answers For Free
Most questions answered within 1 hours.