z80:Opcodes:DEC

From Learn @ Cemetech
Revision as of 22:30, 5 February 2016 by Maintenance script (talk | contribs) (Initial automated import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Decreases operand by one.

Syntax

   dec op8		;8 bits
   dec op16		;16 bits

Allowed Instructions

   dec a
   dec b
   dec c
   dec d
   dec e
   dec h
   dec l
   dec ixh
   dec ixl
   dec iyh
   dec iyl
   dec (hl)
   dec (ix+n)
   dec (iy+n)
   
   dec bc
   dec de
   dec hl
   dec ix
   dec iy
   dec sp

Effects

8 Bits C flag preserved, P/V detects overflow and rest modified by definition.

16 Bits No flags altered.

Uses

T-States

r denotes 8-bit register. rr represents a two byte register pair: BC, DE, HL, SP

r 4
(hl) 11
(ix+X) 23
(iy+X) 23
rr 6
ix 10
iy 10

See Also

ADC,ADD,DAA,INC,SBC,SUB