DEC
Usage: DEC dest Modifies flags: AF OF PF SF ZF
Unsigned binary subtraction of one from the destination.
Decrement Integer
DEC reg16 ; o16 48+r [8086]
DEC reg32 ; o32 48+r [386]
DEC r/m8 ; FE /1 [8086]
DEC r/m16 ; o16 FF /1 [8086]
DEC r/m32 ; o32 FF /1 [386]
DEC subtracts 1 from its operand. It does not affect the carry flag: to affect the carry flag, use SUB something,1. DEC affects all the other flags according to the result.
This instruction can be used with a LOCK prefix to allow atomic execution.
See also INC.
Example:
pop ecx | dec ecx | cmp ecx 0 | ja LABEL