Keil Logo

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
  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.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.