subroutine call
special operations for calls
- jsr X
push the current program counter onto the stack
and jump to label X
- rts
pop the address off the top of the stack
and jump to it
calling protocol
- called procedure
reads arguments out of registers arg1, arg2, …
puts its result in register result
- and is free to
overwrite the contents of all registers
- so calling procedure must
save registers it will subsequently need
by pushing them onto the stack