2. CONTENT
What is flag register ?
Category of flags registers
Status Flag
Control flag
Conclusion
3. FLAG REGISTER OF 8086
What is flag register ?
The flags register is the status register in intel x86
microprocessors that contains the current state of
the processor.
The 8086 flag register contents indicate the results of computation in the ALU. It
also contains some flag bits to control the CPU operations.
A 16 flag register is used in 8086. It is divided intotwo parts .
4. CATEGORY OF FLAGS
REGISTERS
There are 2 types of flags register.
•Status flags
•Control flags.
This register is 16 bits wide. The status flags are located in 0, 2, 4, 6, 7 and
11 bits. Control flags are located in 8, 9 and 10 bits and the system flags are
located in 12,13 and 14 bits and others left bits are reserved bits.
6. STATUS FLAG
S- Sign Flag : This flag is set, when the result of any computation is
negative.
Z- Zero Flag: This flag is set, if the result of the computation or
comparison
performed by the previous instruction is zero.
P- Parity Flag: This flag is set to 1, if the lower byte of the result
contains even number of 1’s.
C- 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.
7. STATUS FLAG
AC-Auxiliary Carry Flag: This is set, if carry
from the lowest nibble, i.e., bit three during
addition, or borrow for the lowest nibble, i.e.,
bit three, during subtraction.
O- 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, then overflow willbe set.
8. CONTROL FLAG
T- Tarp Flag: If this flag is set, the
processor enters the single step execution
mode.
I- Interrupt Flag: If this flag is set, the maskable interrupt are
recognized by the CPU, otherwise they are ignored.
D- 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.
9. CONCLUSION
Hence we conclude that Register are one of the important component of
a processor & For the storage of data & their memory location during
the execution of program , we useit.
TheseRegisters are used by8086µp to store data of 16bit.