Draw the flag resister of 8086 microprocessor and describe the function of I, D and O flag hits.


Flag register is a part of EU (Execution Unit). It is a 16-bit register with each bit corresponding to a flip-flop.
A flag is a flip-flop. It indicates some condition produced by the execution of an instruction. For example the zero flag (ZF) will set if the result of execution of an instruction is zero.
Figure below shows the details of the 16 bit flag register of 8086 CPU.


8086 flag register formal
It consists of 9 active flags out of 16. The remaining 7 flags marked ‘U’ are undefined flags.
These 9 flags are of two types:
6 Status flags and 3 Control flags
Status flags:
(i) Carry flag (CY)
(ii) Parity flag (PF)
(iii) Auxiliary carry flag (AC)
(iv) Zero flag (ZF)
(v) Sign flag (SF)
(vi) Overflow flag (OF)
Control flags:
(i) Trap nag (TF)
(ii) Interrupt enable flag (IF)
(iii) Direction flag (DF)
The function of I, D and O flag bits
Interrupt enable flag (IF)
It is used to mask (disable) or unmask (enable) the INTR interrupt. If user sets IF flag, the CPU will recognize external interrupt requests. Clearing IF disables these interrupts.

Direction hag (DF): If this flag is set. S1 and D1 are in auto-decrementing mode in string operations.

Overflow flag (OF): It will be set if the result of a signed operation is too large to fit in the number of bits available to represent it. It can be checked using the instruction INTO (interrupt on Overflow). 

No comments

Dear Members, Thanks for Your Comments. We must be reply your comment answer as soon as possible. Please Stay with us.....

Theme images by ideabug. Powered by Blogger.