Difference between revisions of "Z80:Opcodes:PUSH"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
(Decrements SP by 2, then copies the operand into (SP).)
 
Line 1: Line 1:
 
<!-- Short summary of instruction -->
 
<!-- Short summary of instruction -->
Copies the operand into (SP), then increments SP by 2.
+
Decrements SP by 2, then copies the operand into (SP).
  
 
== Syntax ==
 
== Syntax ==

Latest revision as of 21:53, 13 March 2017

Decrements SP by 2, then copies the operand into (SP).

Syntax

   push reg16

Allowed Instructions

   push af
   push bc
   push de
   push hl
   push ix
   push iy

Effects

Flags are unaffected.

Uses

Used for saving register values onto 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 11
ix 15
iy 15

See Also

POP