<<< Overflow Condition, Cont | Index | INC and DEC Instructions, Cont. >>> |
The INC instruction adds one to the destination operand,
while preserving the state of the carry flag CF:
The destination operand can be a register or a memory location.
This instruction allows a loop counter to be updated without disturbing the CF flag.
(Use ADD instruction with an immediate operand of 1 to perform an increment operation that does update the CF flag.)
The DEC instruction subtracts one from the destination operand,
while preserving the state of the CF flag.
(To perform a decrement operation that does update the CF flag, use a SUB instruction with an immediate operand of 1.)
<<< Overflow Condition, Cont | Index | INC and DEC Instructions, Cont. >>> |