Suppose we were to call a procedure named ProcOne, passing it two name parameter
ID: 3843900 • Letter: S
Question
Explanation / Answer
.data addr_stack dd 100 dup(0) ; hope that 100 addresses is enough! stack_ptr dd ? ; stack initialization code lea EDX, addr_stack mov stack_ptr, EDX ; one call lea EAX, rtn_point jmp proc1 rtn_point: proc1: ; 1st instruction of procedure here ; push return address on stack mov [EDX], EAX add EDX, 4 . . . lea EAX, rtn_point_nested jmp proc2 rtn_point_nested: . . . ; pop retn address off stack sub EDX, 4 mov EAX, [EDX] jmp [EAX] proc2: ; 1st instruction of procedure here . . . jmp [EAX]
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.