Keil Logo Arm Logo

8051 Instruction Set Manual

INC

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.

See Also: DEC

INC @Ri
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
0000011i
Operation
INC
(Ri) = (Ri) + 1
Example
INC @R0
INC A
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
00000100
Operation
INC
A = A + 1
Example
A = A + 1
INC direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
00000101 direct
Operation
INC
(direct) = (direct) + 1
Example
INC 34h
INC DPTR
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 2
Encoding
10100011
Operation
INC
DPTR = DPTR + 1
Example
INC DPTR
INC Rn
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
00001nnn
Operation
INC
Rn = Rn + 1
Example
INC Rn

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.