IYh <- (SP+1), IYl <- (SP)
POP
IY
b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 | |
---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | $FD |
1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | $E1 |
The top two bytes of the external memory last-in, first-out (LIFO) stack are popped to Index Register IY. The Stack Pointer (SP) Register pair holds the 16-bit address of the current top of the Stack. This instruction first loads to the low-order portion of IY the byte at the memory location corresponding to the contents of SP; then SP is incremented and the contents of the corresponding adjacent memory location are loaded to the high-order portion of IY. The SP is incremented again.
None
If the Stack Pointer contains $1000, memory location $1000 contains $55, and location $1001 contains $33, the instruction
POP IY
results in Index Register IY containing $3355 and the Stack Pointer containing $1002.