You are here : assembly8051DEC

DEC - 8051

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.


Syntax

DEC @Ri
DEC REG
DEC Direct


Example

DEC @R1		;Makes R1=R1-1
DEC A		;Makes A=A-1
DEC 35h		
DEC R7


Output / Return Value


Limitations


Alternatives / See Also


Reference