Keil Logo

DEC

The DEC instruction decrements the specified operand by 1. An original value of 00h underflows to 0FFh. 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 pins of the port.

See Also: INC

DEC @Ri
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
0001011i
Operation
DEC
(Ri) = (Ri) - 1
Example
DEC @R1
DEC A
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
00010100
Operation
DEC
A = A - 1
Example
DEC A
DEC direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
00010101 direct
Operation
DEC
(direct) = (direct) - 1
Example
DEC 35h
DEC Rn
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
00011nnn
Operation
DEC
Rn = Rn - 1
Example
DEC R7
  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.