äHow do we pass
parameters?
äCan push parameters onto
the stack before calling to pass parameters, the subprogram can then reference
the stack
for the parameters
äThey can be discarded from
the stack using the following variant of the RET operation
äRET nn
äWhere nn is the number
added to the SP just after the return address is
popped off
ä
ä
ä
ä
ä
äBy Value
äPush the value
äBy Reference
äPush the address, the
called routine must also assume the parameter will be accessed indirectly
Return address pushed by CALL instruction
Pushed Parameters, nn words for passed and returned
parameters
Old stack
Ret nn, sets the IP to the
return address, then advances
the SP to the Old Stack