Please select the text that should be placed in the blank space labeled C in que
ID: 3861610 • Letter: P
Question
Please select the text that should be placed in the blank space labeled C in question 3.
Please select the number that should be placed in the blank space labeled D in question 3.
What hexadecimal number will ESP contain when the "mov eax,1" instruction is executed (this is referring to the code in question 3)?
[ebp+12] This information is provided so that you can answer answer questions 3 through 7 The following is a partial main with a call to a procedure to calculate the factorial of integer argument x, and store the result (xl) in memory The initial address of the top of the stack is 0x0A50 The value at X is 12 (decimal) The address of result (DWORD) is 0x1200 The address of nextstep is 0x2080 The initial value inebp is 0x3B main PROC push OFFSET result push x call factorial nextstep: exit main ENDP factorial PROC push ebpo mov ebp, esp mov eax, 1. value of parameter x mov eCX again loop again address of result edi, mov eax save the factorial in result mov pop ebpo ret factorial ENDP END mal nExplanation / Answer
The above given assembly code is to find factorial for number.
Question 3:
The value needed to include in the place of C is edi.
since the address of the resume 0x1200 stored in edi, the result value is moved here.
Question 4 :The value need too included in the place of D is 4
since it was derived from ebp of the asm code.
Question : Decimal number in esp when mov eax, 1 is executed.
The values in esp will be 0x47, since its inital value was 0x3b
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.