
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Name: _____Answer Key____________
push $ push $ push $ call prog pop %edx pop %edx pop %edx addl %eax, %ebx
Which of the following instruction can copy the value 20 from the stack (passing by parameter) to %ecx?
a. movl %esp, %ecx b. movl 4(%esp), %ecx c. movl 8(%esp), %ecx d. movl 12(%esp), %ecx
Answer: ____D__________
Stack
$ $ $ return address
ESPi = ESP before executing the code ESPa = ESP after it calls the subroutine
ESPi
ESPa