INC
INC
INC - increment the value in a memory address.
Description
INC increments (adds one to) the current value in a memory location.
Flags affected | ||||||
---|---|---|---|---|---|---|
N | Z | C | I | D | V | |
+ | + | - | - | - | - |
Addressing Mode | Assembly | OpCode | No. Bytes. | No. Cycles |
---|---|---|---|---|
Zero Page | INC Oper | e6 | 2 | 5 |
Zero Page, X | INC Oper, X | f6 | 2 | 6 |
Absolute | INC Oper | ee | 3 | 6 |
Absolute, X | INC Oper, X | fe | 3 | 7 |
Examples
Example of Use
Assuming that the value $1F (31) was stored in memory address $0400 (1024), this use of INC would add one to it, resulting in $20 (32):
INC $0400
Related Pages
- DEC - decrement a memory location
- INA - increment the accumulator (not available on standard 6502 microprocessor)
- INX - increment X
- INY - increment Y
page revision: 9, last edited: 15 Jul 2012 05:10