Interactive SDM entry reader for DEC and ROL instructions, with annotated pseudocode and flags sections

DEC — Decrement
ROL — Rotate left
Opcode / instruction table
OpcodeInstructionOp/En64-bitDescription
FE /1DEC r/m8MValidDecrement r/m8 by 1
FF /1DEC r/m16MValidDecrement r/m16 by 1
FF /1DEC r/m32MValidDecrement r/m32 by 1
REX.W + FF /1DEC r/m64MValidDecrement r/m64 by 1
Operation pseudocode — click a line to annotate it
1DEST ← DEST – 1;
Click any line above to see an explanation.
Flags affected
FlagStatusDetail
CFnot affectedDEC deliberately does not touch CF. This distinguishes it from SUB r/m, 1 which would set CF on underflow.
OFmodifiedSet if signed overflow occurred (DEST was INT_MIN before the decrement).
SFmodifiedSet to the MSB of the result.
ZFmodifiedSet if result == 0.
AFmodifiedSet if borrow from bit 3 to bit 4.
PFmodifiedSet if low byte of result has even parity.