Question: This information is provided so that you can answer questions 1 through 5. The following is a partial main procedure with a call to a





This information is provided so that you can answer questions 1 through 5. The following is a partial main procedure with a call to a sub-procedure which will calculate the factorial of an integer argument x, and store the result (x!) in memory. The initial address of the top of the stack (the value of ESP) is BA5@h The value of x is 12 (decimal) The address of result (DWORD) is 1200h The address of the nextstep code label is 2088h The initial value in EBP is 3Bh .data x result DWORD 12 ? DWORD .code main PROC PUSH OFFSET result PUSH X CALL factorial nextstep: exit main ENDP factorial PROC PUSH EBP MOV EBP, ESP MOV EAX, 1 MOV , A ; value of parameter x again: MUL ECX LOOP again MOV EDI, B ; address of result ; save the factorial in result EAX MOV POP EBP RETLD factorial ENDP ; deconstruct stack frame END MAIN Please select the text that should be placed in the blank space labeled A in question 1. O 2080h O [EBP+12] O [EBP+8] O[EDI] Please select the text that should be placed in the blank space labeled B in question 1. O[EDI] O [EBP+8] O 2080h O [EBP+12] Please select the text that should be placed in the blank space labeled C in question 1. O [EBP+8] O [EBP+12] O[EDI] 2080h Please select the number that should be placed in the blank space labeled D in question 1. 4 12 O 16 2 8 What hexadecimal number will ESP contain when the MOV EAX, 1 instruction is executed (this is referring to the code in question 1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
