PUSH qq

Operation

(SP-2) <- qqL, (SP-1) <- qqH

Mnemonic

PUSH

Operands

qq

b7b6b5b4b3b2b1b0
1 1 qq0 1 0 1

Description

The contents of the register pair qq are pushed to the external memory last-in, first-out (LIFO) stack. The Stack Pointer (SP) Register pair holds the 16-bit address of the current top of the Stack. This instruction first decrements SP and loads the high-order byte of register pair qq to the memory address specified by the SP. The SP is decremented again and loads the low-order byte of qq to the memory location corresponding to this new address in the SP. The operand qq identifies register pair BC, DE, HL, or AF, assembled as follows in the object code:

RegisterddHex
BC00$C5
DE01$D5
HL10$E5
AF11$F5

Condition Bits Affected

None

Example

If the AF register pair contains $2233 and the Stack Pointer contains $1007, then upon execution of

	PUSH	AF

memory address $1006 contains $22, memory address $1005 contains $33 and the Stack Pointer contains $1005