SAM47 INSTRUCTION SET KS57C2308/P2308/C2316/P2316
5-72
POP Pop From Stack
POP dst
Operation: Operand Operation Summary Bytes Cycles
RR Pop to register pair from stack 1 1
SB Pop SMB and SRB values from stack 2 2
Description: The contents of the RAM location addressed by the stack pointer is read, and the SP is
incremented by two. The value read is then transferred to the variable indicated by the
destination operand.
Operand Binary Code Operation Notation
RR 00101r2 r1 0RRL (SP), RRH (SP+1)
SP SP+2
SB 11011101(SRB) (SP), SMB (SP+1),
SP SP+2
01100110
Example: The SP value is equal to 0EDH, and RAM locations 0EFH through 0EDH contain the values 2H,
3H, and 4H, respectively. The instruction
POP HL
leaves the stack pointer set to 0EFH and the data pointer pair HL set to 34H.