|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ä |
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
|
|