First question 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
Second Question Which statement is true about what will happen when the example code runs?
1: main PROC
2: push 10
3: push 20
4: call Ex2Sub
5: pop eax
6: INVOKE ExitProcess,0
7: main ENDP
8:
9: Ex2Sub PROC
10: pop eax
11: ret
12: Ex2Sub ENDP
a. EAX will equal 10 on line 6
b. The program will halt with a runtime error on Line 10
c. EAX will equal 20 on line 6
d. The program will halt with a runtime error on Line 11
1. By looking at this I think that EAX would still equal 30 at the end of line 6 because eax was just pushed on the stack not a change in value
2. This one I would believe it would equal 10 because of LIFO (last in first out). EAX would equal 10 because it was the last one in.
This is a new concept, any help would be appreciated.