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

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.