Call instruction clarification
Posted: Mon Aug 29, 2011 10:16 am
When I execute the call instruction it pushes the return address to the stack, right?That would result in a stack shown on the right. And if I want to get at the pushed RAX/RBX values than I need to first put the address that CALL put there somewhere safe and return it to the stack before RET.
Am I missing anything else? Considering I have been programming in Assembly for two years and only found this out now I have a feeling that there might be more. Or that I got this wrong.
Code: Select all
CODE | Resulting stack (High address)
PUSH RAX | RAX's value
PUSH RBX | RBX's value
CALL CODE | RET address
Am I missing anything else? Considering I have been programming in Assembly for two years and only found this out now I have a feeling that there might be more. Or that I got this wrong.