z80:Opcodes:INC

From Learn @ Cemetech
Revision as of 22:00, 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

Increases operand by 1.

Syntax

   inc op8		;8 bits
   inc op16	;16 bits

Allowed Instructions

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

Effects

8 Bits

Preserves C flag, N flag is reset, P/V detects overflow and rest are 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,DEC,SBC,SUB