First page Back Continue Last page Overview Graphics

Passing Parameters on the Stack


Notes:

In this example the byte value in Var1 and the word value in Var2 are pushed on the stack before the subroutine ProcessVals is called. After returning from the subroutine, three is added to the stack pointer to restore the state of the stack to what it was before the psha and pshd instructions were executed.