Question: TRACE THE CODE AND SHOW WORK PLEASE 1-Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov
TRACE THE CODE AND SHOW WORK PLEASE
1-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 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
2. Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov eax,40 3: push offset Here 4: jmp Ex4Sub 5: Here: 6: mov eax,30 7: INVOKE ExitProcess,0 8: main ENDP 9: 10: Ex4Sub PROC 11: ret 12: Ex4Sub ENDP a. EAX will equal 30 on line 7 b. The program will halt with a runtime error on Line 4 c. EAX will equal 30 on line 6 d. The program will halt with a runtime error on Line 11 3- Which statement is true about what will happen when the example code runs? 1: main PROC 2: mov edx,0 3: mov eax,40 4: push eax 5: call Ex5Sub 6: INVOKE ExitProcess,0 7: main ENDP 8: 9: Ex5Sub PROC 10: pop eax 11: pop edx 12: push eax 13: ret 14: Ex5Sub ENDP a. EDX will equal 40 on line 6 b. The program will halt with a runtime error on Line 13 c. EDX will equal 0 on line 6 d. The program will halt with a runtime error on Line 11 4-. What values will be written to the array when the following code executes? .data array DWORD 4 DUP(0) .code 186 Chapter 5 Procedures main PROC mov eax,10 mov esi,0 call proc_1 add esi,4 add eax,10 mov array[esi],eax INVOKE ExitProcess,0 main ENDP proc_1 PROC call proc_2 add esi,4 add eax,10 mov array[esi],eax ret proc_1 ENDP proc_2 PROC call proc_3 add esi,4 add eax,10 mov array[esi],eax ret proc_2 ENDP proc_3 PROC mov array[esi],eax ret proc_3 ENDP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
