Difference between revisions of "Assembler:Commands:INC"

From Cheat Engine
Jump to navigation Jump to search
(Created page with ''''command''' inc ''operand'' Increases the operand by one. Adds 1 to the operand, while preserving the state of the '''CF''' flag. The operand can be a register or a memory l…')
 
Line 6: Line 6:
 
The operand can be a register or a memory location.  
 
The operand can be a register or a memory location.  
 
This instruction allows a loop counter to be updated without disturbing the '''CF''' flag.  
 
This instruction allows a loop counter to be updated without disturbing the '''CF''' flag.  
(Use a ADD instruction with an immediate operand of 1 to perform an increment operation  
+
(Use a [[Assembler:Commands:ADD|ADD]] instruction with an immediate operand of 1 to perform an increment operation  
 
that does updates the '''CF''' flag.)
 
that does updates the '''CF''' flag.)
  

Revision as of 19:34, 13 March 2017

command inc operand

Increases the operand by one.

Adds 1 to 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. (Use a ADD instruction with an immediate operand of 1 to perform an increment operation that does updates the CF flag.)

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

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


See also

External links