z80:Opcodes:POP

From Learn @ Cemetech
Jump to navigationJump to search

Copies the two bytes from (SP) into the operand, then increases SP by 2.

Syntax

   pop reg16

Allowed Instructions

   pop af
   pop bc
   pop de
   pop hl
   pop ix
   pop iy

Effects

Flags are unaffected except when popping AF.

Uses

Used for retrieving values saved on the stack. Also used when you want to load a 16-bit register into another 16-bit register (the LD instruction won't work for this).

T-States

rr represents a two byte register pair: BC, DE, HL, SP

rr 10
ix 14
iy 14

See Also

PUSH