A Calling Convention for 32-bit programs.
Arguments for functions are passed onto the stack in reverse order.
Process
- Arguments are placed onto the stack from right-to-left
- Function is called with
call <location>
. This causesrip
to be pushed to the stack (return address) - Space is allocated onto the stack for local variables
- Function does work
- Returns by calling
ret
- Stack is restored
- Stack adjusted to remove arguments