r <- r + 1
INC
r
| b7 | b6 | b5 | b4 | b3 | b2 | b1 | b0 |
|---|---|---|---|---|---|---|---|
| 0 | 0 | r | 1 | 0 | 0 | ||
Register r is incremented and register r identifies any of the registers A, B, C, D, E, H, or L, assembled as follows in the object code.
| Register | r | Hex |
|---|---|---|
| A | 111 | $3C |
| B | 000 | $04 |
| C | 001 | $0C |
| D | 010 | $14 |
| E | 011 | $1C |
| H | 100 | $24 |
| L | 101 | $2C |
| S | is set if result is negative, otherwise it is reset. |
| Z | is set if result is 0, otherwise it is reset. |
| H | is set if carry from bit 3, otherwise it is reset. |
| P/V | is set if r was $7F before operation, otherwise it is reset |
| N | is reset. |
| C | is not affected. |
If the D Register contains $28, then upon the execution of
INC D
the D Register contains $29.