173
CHAPTER 9. INSTRUCTION SET
PUSH rp
Function: (SP-1) rpH, (SP-2) rpL, SP SP-2
Saves the contents of register pair rp (XA, HL) to the data memory (stack) addressed by the stack pointer
(SP), then decrements the SP.
The high-order side (rpH: X, H) of the register pair is saved to the stack addressed by (SP-1) and the low-
order side (rpL: A, L) is saved to the stack addressed by (SP-2).
POP rp
Function: rpL (SP), rpH (SP+1), SP SP+2
Restores the contents of the data memory (stack) addressed by the stack pointer (SP) to register pair rp (XA,
HL), then increments the SP.
The contents of (SP) are restored to the low-order side (rpL: A, L) of the register pair and the contents of (SP+1)
are restored to the high-order side (rpH: X, H).