Assembler:Commands:DEC

From Cheat Engine
Revision as of 19:34, 13 March 2017 by TheyCallMeTim13 (talk | contribs) (Created page with ''''command''' dec ''operand'' Decreases the operand by one. Subtracts 1 from the operand, while preserving the state of the '''CF''' flag. The operand can be a register or a m…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

command dec operand

Decreases the operand by one.

Subtracts 1 from the operand, while preserving the state of the CF flag. The operand can be a register or a memory location. This instruction allows a loop counter to be updated without disturbing the CF flag. (To perform a decrement operation that updates the CF flag, use a SUB instruction with an immediate operand of 1.)


The CF flag is not affected. The OF, SF, ZF, AF, and PF flags are set according to the result.

operand = operand - 1


Command Parameters

Parameter Description
operand The destination operand


Examples

dec al
dec ax
dec eax
dec rax
dec [00123ABC]
dec [rax]
dec [SomeSymbol]


See also

External links