Difference between revisions of "Assembler:Commands:DEC"

From Cheat Engine
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:Assembler]]
 
'''command''' dec ''operand''
 
'''command''' dec ''operand''
  
Line 17: Line 18:
 
use a [[Assembler:Commands:SUB|SUB]] instruction with an immediate operand of 1.)
 
use a [[Assembler:Commands:SUB|SUB]] instruction with an immediate operand of 1.)
  
[http://x86.renejeschke.de/html/file_module_x86_id_71.html x86.renejeschke.de/html/file_module_x86_id_71.html]
+
[http://c9x.me/x86/html/file_module_x86_id_71.html c9x.me/x86/html/file_module_x86_id_71.html]
 
</div>
 
</div>
  
Line 46: Line 47:
 
  dec [SomeSymbol]
 
  dec [SomeSymbol]
  
== See also ==
+
{{AssemblerCommandSeeAlso}}
* [[Assembler]]
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 
* [[Assembler:Commands|Assembler Commands]]
 
  
== External links ==
+
{{Template:AssemblerCommandExternalLinks}}
* [https://wikipedia.org/wiki/X86_instruction_listings wikipedia.org/wiki/X86_instruction_listings]
 
* [https://wikibooks.org/wiki/X86_Assembly/Other_Instructions wikibooks.org/wiki/X86_Assembly/Other_Instructions]
 
* [http://x86.renejeschke.de/ x86.renejeschke.de]
 
* [http://www.asmpedia.org/index.php?title=Main_Page asmpedia.org]
 
* [http://ref.x86asm.net/ ref.x86asm.net]
 

Latest revision as of 15:42, 3 January 2018

command dec operand

Decreases 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


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

c9x.me/x86/html/file_module_x86_id_71.html


Command Parameters[edit]

Parameter Description
operand The destination operand


Examples[edit]

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

See also[edit]

External links[edit]