HL contains the top of the parameter stack.
C contains the Parameter Stack Pointer.
SP contains the Return Stack Pointer.
SP0: The parameter stack pointer is initialised to address
at the very end of the HRAM. The PSP value is decreased when a new item is
added to the stack.
RS0: The return stack pointer (RSP) is initialised to address
located at the very end of the RAM (or the end of RAM bank 0). The RSP value is
decreased when a new address is added to the return stack.
DP: The dictionary pointer is stored at addresses
located at the start of the RAM (or RAM bank 0). The pointer value is
$C002, and is increased when new memory is allocated.
Pushing a value to the PSP
\ Move TOS "down" the stack C dec, H A ld, A [C] ld, C dec, L A ld, A [C] ld, \ Load a value to the TOS $1234 # HL ld,
Popping a value from the PSP
\ Load TOS to register DE H D ld, L E ld, \ Move second item to TOS [C] A ld, A L ld, C inc, [C] A ld, A H ld, C inc,