_function:
push ebp ;store the old base pointer
mov ebp, esp ;make the base pointer point to the current
;stack location – at the top of the stack is the
;old ebp, followed by the return address and then
;the parameters.
sub esp, x ;x is the size, in bytes, of all
;"automatic variables" in the function
这里的return address以及parameters是怎么进栈的呢?
Standard Exit Sequence:
mov esp, ebp ;reset the stack to "clean" away the local variables
pop ebp ;restore the original base pointer
ret ;return from the function
这里到pop ebp这行应该已经到return address了,后面ret还有什么作用?
