You are here : assembly8051INC

INC - 8051

The INC instruction increments the specified operand by 1. An original value of 0FFh or 0FFFFh overflows to 00h or 0000h. No flags are affected by this instruction.

NOTE : When this instruction is used to modify an output port, the value used as the port data is read from the output data latch, not the input pins of the port.


Syntax

INC @Ri
INC REG
INC Direct


Example

INC @Ri		;1 byte 1 cycle
INC A		;1 byte 1 cycle
INC direct	;2 bytes 1 cycle
INC DPTR	;1 byte 2 cycles
INC Rn		;1 byte 1 cycle


Output / Return Value


Limitations


Alternatives / See Also


Reference