First page Back Continue Last page Overview Graphics
Subroutines and the Stack
Stack pointer must be intialized using LDS instruction.
Register contents can be saved on stack.
Parameters can be passed
- by value, or
- by reference
Parameters can be passed in registers or on the stack.
Delays can be implemented using loops, ideally in subroutines.
Subroutines in separate source files must be declared using XDEF and XREF.