pop

Pop from stack

Loads BC, DE, HL, AF, IX or IY from the stack, incrementing SP once for each byte.

SZHP/VNC ––––––
  • Changes no flag

Forms

  • The memory location pointed to by SP is stored into the low byte of rr and SP is incremented. The memory location pointed to by SP is stored into the high byte of rr and 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, hl or af.
ix
The ix index register. You can also use iy, with the same instruction size and timing. More
        .org 0x8000
        ld bc, 0x1234
        push bc
        pop bc
        halt