1. Suppose we were to call a procedure named Procone, passing it three value par
ID: 3843533 • Letter: 1
Question
1. Suppose we were to call a procedure named Procone, passing it three value parameters. The procedure adds the two parameters and retums their sum in EAX Mow eax.7 mov eax, 11 push eax. EAX sum call Procone create the implementation of Procone, using explicit stack parameters (such as lebp n). Follow other common conventions regarding the saving and restoring of registers. Restore the stack pointer using the STDCALL calling convention, and assume a 32-bit memory model 2. Suppose we were to call a procedure named Proc Two, which calculates the sum of the elements of an array of 32-bit words and returns the sum in EAX. The following code calls ProcTwo data myray dWORD 1012h, 2023h, 3034h, 4045h push offset my ray push size of my ray call implementation of Proc Two, using explicit stack parameters (such as lebp nl) Follow other common conventions regarding the saving and restoring of registers. Restore the stack pointer using the STDCALL calling convention, and assume a 32-bit memory model. 3. Trace showing the stack frame at each call and contents of ebx Example 2: The Accum Procedure main PROC push 9 call Accum call DumpRegs exit main ENDP Accum PROC push ebp mov ebp, esp mov e box, [ebp +8) cmp ebx, 3 add eaux, ebx sub ebx, 3 push ebx call Accum L1 pop ebp ret 4 Accum ENDP called. 4 Refer to Example 2. What will be the value of EAX when DumpRegs is 5. Trace the following code, show frames in correct order stackExplanation / Answer
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.