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, from NASM's own instruction table. The second column is the processor that introduced the form; a badge marks a form that needs an extension, that is lockable, or that long mode dropped.

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