hi everybody
i am new to assembly . But very much interested in mastering it so plz help me.....
my doubt is when are carry flag , overflow flag set or unset
i searched the internet . but i didn't understood the difference.
i got totally confused . :'(
can some one give few examples of setting these flags or unsetting these flags
Please help me
thanks in advance
The carry flag is used by many instructions.
In unsigned addition and subtraction, add, adc, sub, sbb.
In shifting the carry holds the bit shifted or rotated out, shr, shl, rcr, rcl, ror, rol.
It can also be set stc, cleared clc, toggled cmc.
It can also be used for setting a byte to 0 or 1 setc, setnc.
It can hold the result of bit operations, btc, btr, bts.
Also used by many of the conditional jump instructions jc, jnc and others.
The overflow is used for signed addition and subtraction.
It is affected/used by a few instructions.
The opcodes help file that comes with MASM32
shows what flags are affected/used by an instruction.
vineel,
Already asked, already answered. Ratch
http://www.masm32.com/board/index.php?topic=6620.0