Hey
are we know why INC ,and DEC d't change CARRY flag ,but change ZERO and OVERLOF flags
WHY :red :eek
Because that is the design.
I'm sure it's more of a pain for Intel now, but the original x86 had those semantics, so they must continue with them.
Mirno
I have often found it very usefull that the CARRY flag was not affected by the INC/DEC instructions.
Simply use the SIGN flag if you need to be informed when a register gets decremented below 0 with the DEC instruction. That SIGN is also affected by the INC instruction.
Raymond
Multiprecision arithmetic.
When incrementing addresses and decrementing loop counters, you don't want to destroy the carry/borrow between adds or subtracts.
Look in Opcodes.HLP (possibly under JMP):
JC/JNC --> Jump if/not if Carry flag set
JS/JNS --> Jump if/not if Sign flag set