Procedures
Calling Procedure
Called Procedure
Push parameters on stack
jsr procedure
Push registers which will be corrupted
tsx
(get work done)
Pop corrupted registers
rts
Adjust
sp
to remove parameters from stack
Access to parameters: calculate the offset from the x index register to the parameter, and use indexed addressing.