1,885
edits
Changes
→Push/Pull on the Stack
==== Push/Pull on the Stack ====
When a value is pushed to the stack, the stack pointer register (SP) is decremented and the selected register is written to memory location $0100+SPand the stack pointer register (SP) is decremented.
When a value is pulled from the stack, the stack pointer register (SP) is incremented and the selected register is loaded from memory location $0100+SP and the stack pointer register (SP) is incremented.
There are two instructions to push data onto the stack: