Question: 12. Figure 1.1 below shows the assembler output from the C compiler for a compiled C function. 1. _TEXT SEGMENT 2. _zS = -32; size=4


12. Figure 1.1 below shows the assembler output from the C compiler for a compiled C function. 1. _TEXT SEGMENT 2. _zS = -32; size=4 3. y = -20; size = 4 4. _xS=-8; size = 4 5. _main PROC; COMDAT 6. 7. push ebr 8. mov ebr. esp. 9. sub esp. 228 ; 000000e4H 10. push ebx 11. push esi push edi 13. lea edi. DWORD PTR [ebp-228] 14. mov ecx. 57: 00000039H 15. mov eax. -858993460 : CSCCSSCH 16. rep stosd: x=2 18. mov DWORD PTR_xS[ebp), 9 19. :y=Z: 20. mov DWORD PTR _yS[ebp). 7 21. : z= subtract(x,y); 22. mov cax. DWORD PTR_y$[ebp] 23. push eax 24. mov esx. DWORD PTR_x$[ebp] 25. push esx 26. call_subtract 27. add esp. 8 28. mov DWORD PTR_z$[ebp), eax 17. Figure 1.1 1. The purpose of Line 9 in Figure 1.1. is to: 3. Line 27 in Figure 1.1. is necessary because: a. The register ESP contains an illegal value. a. Subtast 228 from the ESP register. b. Make more room on the stack for local and debug variables. b. Variables X and Y must be removed from the stack. DODO c. Format the stack frame. c. Variable z is located 8 bytes from the top of stack. d. All of the above. d. None of the above. Reason for your answer: Reason for your answer: 4. The purpose of Line 28 in Figure 1.1. is to: 2. By the time the subroutine _subtract is called at line 26 in Figure 1.1.: a. Register EBP has been pushed onto the stack. b. Register EBP contains the contents of register ECX. a. Copy the value of variable Z into the EAX register. b. Copy the value of the EAX register into the Z register. c. Copy the value of the EAX register into variable z. d. None of the above. c. The contents of the variables X and Y are on the top of the stack. d. None of the above. Reason for your answer: Reason for your answer: 12. Figure 1.1 below shows the assembler output from the C compiler for a compiled C function. 1. _TEXT SEGMENT 2. _zS = -32; size=4 3. y = -20; size = 4 4. _xS=-8; size = 4 5. _main PROC; COMDAT 6. 7. push ebr 8. mov ebr. esp. 9. sub esp. 228 ; 000000e4H 10. push ebx 11. push esi push edi 13. lea edi. DWORD PTR [ebp-228] 14. mov ecx. 57: 00000039H 15. mov eax. -858993460 : CSCCSSCH 16. rep stosd: x=2 18. mov DWORD PTR_xS[ebp), 9 19. :y=Z: 20. mov DWORD PTR _yS[ebp). 7 21. : z= subtract(x,y); 22. mov cax. DWORD PTR_y$[ebp] 23. push eax 24. mov esx. DWORD PTR_x$[ebp] 25. push esx 26. call_subtract 27. add esp. 8 28. mov DWORD PTR_z$[ebp), eax 17. Figure 1.1 1. The purpose of Line 9 in Figure 1.1. is to: 3. Line 27 in Figure 1.1. is necessary because: a. The register ESP contains an illegal value. a. Subtast 228 from the ESP register. b. Make more room on the stack for local and debug variables. b. Variables X and Y must be removed from the stack. DODO c. Format the stack frame. c. Variable z is located 8 bytes from the top of stack. d. All of the above. d. None of the above. Reason for your answer: Reason for your answer: 4. The purpose of Line 28 in Figure 1.1. is to: 2. By the time the subroutine _subtract is called at line 26 in Figure 1.1.: a. Register EBP has been pushed onto the stack. b. Register EBP contains the contents of register ECX. a. Copy the value of variable Z into the EAX register. b. Copy the value of the EAX register into the Z register. c. Copy the value of the EAX register into variable z. d. None of the above. c. The contents of the variables X and Y are on the top of the stack. d. None of the above. Reason for your answer: Reason for your
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
