dec

8086 and later

Decrement by 1

dec reg16 | dec reg32 | dec r/m8 | dec r/m16 | dec r/m32 | dec r/m64 | dec [reg8], r/m8 | dec [reg16], r/m16 | dec [reg32], r/m32 | dec [reg64], r/m64

DEC subtracts 1 from its operand. It does not affect the carry flag: to affect the carry flag, use SUB something,1 (see SUB). 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 (INC).

Loading...

Forms

Every form of dec the assembler accepts.

FormSinceNotes
dec reg168086nolong
dec reg32386nolong
dec r/m88086lock
dec r/m168086lock
dec r/m32386lock
dec r/m64x86-64locklong
dec [reg8], r/m8x86-64apxlocklong
dec [reg16], r/m16x86-64apxlocklong
dec [reg32], r/m32x86-64apxlocklong
dec [reg64], r/m64x86-64apxlocklong