pop
Pop from stack
Loads BC, DE, HL, AF, IX or IY from the stack, incrementing SP once for each byte.
Used in
- The stack, push and popZ80 assembly
- call, ret and passing valuesZ80 assembly
- Interrupts: im, ei, di and haltZ80 assembly
- Stack arguments and a stack frameZ80 assembly
- Recursion: factorial and FibonacciZ80 assembly
- Binary searchZ80 assembly
- A 2D arrayZ80 assembly
- Read two numbers and print their sumZ80 assembly
- Flappy birdZ80 assembly
SZHP/VNC ––––––
- Changes no flag
Forms
-
The memory location pointed to by SP is stored into the low byte of
rrand SP is incremented. The memory location pointed to by SP is stored into the high byte ofrrand SP is incremented again. -
The memory location pointed to by SP is stored into IXL and SP is incremented. The memory location pointed to by SP is stored into IXH and SP is incremented again.
Operands
rr- A register pair:
bc,de,hloraf. ix- The
ixindex register. You can also useiy, with the same instruction size and timing. More
.org 0x8000
ld bc, 0x1234
push bc
pop bc
halt