Flag Register



Flag Register 


CF- Carry Flag: This flag is set, when there is a carry out of MSB in case of addition or   a borrow in case of subtraction.

PF - Parity Flag: This flag is set to 1, if the lower byte of the result contains even number   of 1’s else (for odd number of 1s) set to zero.

AF- Auxiliary Carry Flag: This is set, if there is a carry from the lowest nibble, i.e, bit three during addition, or borrow for the lowest nibble, i.e, bit three, during subtraction.

ZF-   Zero Flag: This flag is set, if the result of the computation or comparison performed by the previous instruction is zero.

SF-   Sign Flag: This flag is set, when the result of any computation is negative

TF - Tarp Flag: If this flag is set, the processor enters the single step execution mode.

IF- Interrupt Flag: If this flag is set, the mask able interrupt INTR of 8086 is enabled and if it is zero, the interrupt is disabled. It can be set by using the STI instruction and can be cleared by executing CLI instruction. 

DF- Direction Flag: This is used by string manipulation instructions. If this flag bit is ‘0’, the string is processed beginning from the lowest address to the highest address, i.e., auto incrementing mode. Otherwise, the string is processed from the highest address towards the lowest address, i.e., auto incrementing mode.

OF- Over flow Flag: This flag is set, if an overflow occurs, i.e., if the result of a signed operation is large enough to accommodate in a destination register. The result is of more than 7-bits in size in case of 8-bit signed operation and more than 15-bits in size in case of 16-bit sign operations, and then the overflow will be set.  


Uploaded Mon, 18-Jan-2021
Related Articles

Lesson meta keywords and meta description:



Bootstrap Example