Difference between revisions of "Assembler:Commands:INC"
Jump to navigation
Jump to search
m |
|||
Line 17: | Line 17: | ||
that does updates the '''CF''' flag.) | that does updates the '''CF''' flag.) | ||
− | |||
</div> | </div> | ||
Line 48: | Line 47: | ||
{{AssemblerCommandSeeAlso}} | {{AssemblerCommandSeeAlso}} | ||
− | + | {{Template:AssemblerCommandExternalLinks}} | |
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 15:22, 3 January 2018
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.)
Command Parameters
Parameter | Description |
---|---|
operand | The destination operand |
Examples
inc al
inc ax
inc eax
inc rax
inc [00123ABC]
inc [rax]
inc [SomeSymbol]