INC
8-bit Arithmetic Group | 16-Bit Arithmetic Group
Expansion:
INCrement
Usage:
inc {r}
Increases register by 1
| Instruction | Description | Opcode |
|---|---|---|
| INC A | Increase register A by 1 | 3C |
| INC B | Increase register B by 1 | 04 |
| INC C | Increase register C by 1 | 0C |
| INC D | Increase register D by 1 | 14 |
| INC E | Increase register E by 1 | 1C |
| INC H | Increase register H by 1 | 24 |
| INC L | Increase register L by 1 | 2C |
| INC HL | Increase register HL by 1 | 23 |
| INC BC | Increase register BC by 1 | 03 |
| INC DE | Increase register DE by 1 | 13 |
| INC IX | Increase register IX by 1 | DD23 |
| INC IY | Increase register IY by 1 | FD23 |
| INC SP | Increase Stack Pointer register by 1 | 33 |
| INC (HL) | Increase value at memory address held in register (HL) by 1 | 34 |
| INC (IX+{??}) | Increase value at address in register IX + displacement offset by 1 | DD34 {??} |
| INC (IY+{??}) | Increase value at address in register IY + displacement offset by 1 | FD34 {??} |
Example
; Example
ld a, 5 ; move the value 5 to reg A
dec a ; dec a register by 1