Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

23. (5 pts) What 2 operations are performed by a return instruction? 24. (5 pts)

ID: 3911456 • Letter: 2

Question

23. (5 pts) What 2 operations are performed by a return instruction?

24. (5 pts) What 2 operations are performed by a call instruction?


25. (15 pts) Examine the following assembly instructions, and answer the subsequent questions.
0020 mov eax,    [ebp + 0x0C] ; value here = 0x000000FF
0023 mov cl, [ebp + 0x08]    ; value here = 0x82
0026 cmp al, cl
0028 jl label    ; label is at address 003C, jl is signed
002A nop
002B
...
003C label: sub al, cl


a. (3 pts) Inside a function, assuming that ebp is used for the stack frame, what is at the address ebp+0x0C
with respect to a C function call?


b. (3 pts) Given a signed operation, al is ( greater than, less than, equal to) cl?


c. (3 pts) What is the address from which the offset to the jl is calculated? __________


d. (3 pts) How would you determine the value of the offset for the jl instruction? __________


e. (3 pts) Suppose ecx = 0xABCD1234 prior to executing the code above. What is the new value after
executing the code at address 23.


ecx = 0x________________

Explanation / Answer

23.

The stack contains the adress to where the function has to be returned which was stored in the stack during call instruction. The return instruction

24.

The call instruction performs the two following operations

Please post the remaining questions as separate question.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote