Difference between revisions of "Assembler:Commands:INC"

From Cheat Engine
Jump to navigation Jump to search
Line 3: Line 3:
 
Increases the operand by one.
 
Increases the operand by one.
  
 +
The '''CF''' flag is not affected. The '''OF''', '''SF''', '''ZF''', '''AF''',
 +
and '''PF''' flags are set according to the result.
 +
 +
operand = operand + 1
 +
 +
 +
<div style="padding:2px;border:1px dashed #2f6fab;background-color:#f4f4f4;">
 
Adds 1 to the operand, while preserving the state of the '''CF''' flag.  
 
Adds 1 to the operand, while preserving the state of the '''CF''' flag.  
 
The operand can be a register or a memory location.  
 
The operand can be a register or a memory location.  
Line 9: Line 16:
 
that does updates the '''CF''' flag.)
 
that does updates the '''CF''' flag.)
  
The '''CF''' flag is not affected. The '''OF''', '''SF''', '''ZF''', '''AF''',
+
[http://x86.renejeschke.de/html/file_module_x86_id_140.html x86.renejeschke.de/html/file_module_x86_id_140.html]
and '''PF''' flags are set according to the result.
+
</div>
 
 
operand = operand + 1
 
  
  
Line 39: Line 44:
  
 
  inc [SomeSymbol]
 
  inc [SomeSymbol]
 
  
 
== See also ==
 
== See also ==
Line 50: Line 54:
 
* [https://wikibooks.org/wiki/X86_Assembly/Other_Instructions wikibooks.org/wiki/X86_Assembly/Other_Instructions]
 
* [https://wikibooks.org/wiki/X86_Assembly/Other_Instructions wikibooks.org/wiki/X86_Assembly/Other_Instructions]
 
* [http://www.asmpedia.org/index.php?title=Main_Page asmpedia.org]
 
* [http://www.asmpedia.org/index.php?title=Main_Page asmpedia.org]
* [http://x86.renejeschke.de/html/file_module_x86_id_140.html x86.renejeschke.de/html/file_module_x86_id_140.html]
 

Revision as of 07:46, 14 March 2017

command inc operand

Increases the operand by one.

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

operand = operand + 1


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.)

x86.renejeschke.de/html/file_module_x86_id_140.html


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