Pop iy – Zilog Z08470 User Manual
Page 132

Z80 Instruction Set
UM008007-0715
120
Z80 CPU
User Manual
POP IY
Operation
IYH ← (SP – X1), IYL ← (SP)
Op Code
POP
Operand
IY
Description
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 cur-
rent 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 por-
tion of IY. The SP is incremented again.
Condition Bits Affected
None.
Example
If the Stack Pointer Contains
1000h
, memory location
1000h
contains
55h
, and location
1001h
contains
33h
, the instruction POP IY results in Index Register IY containing
3355h
, and the Stack Pointer containing
1002h
.
M Cycles
T States
4 MHz E.T.
4
14 (4, 4, 3, 3)
3.50
1
1
1
0
1
1
0
1
DD
1
1
1
0
1
1
1
1
FD