Flag Register:- 

      It is a 16-bit register with each bit corresponding to a flip-flop. It changes its status according to the stored output in the accumulator. A flag can control certain operation of the EU.

Active flag:- There are nine active flags out of 16, in the 8086 flag register. The remaining are undefined flag.

Control Flag:- Out of nine active flags, six are conditional flags and the remaining three are called as the control flag. The three control flags are:

1.    The Trap flag(TF)
2.    The interrupt flag(IF)
3.    The direction flag(DF)

The Trap Flag:
  • ·       Setting TF puts the processor into single step mode for debugging, In single stepping microprocessor executes a instruction and enters into single step ISR.
  • ·       If TF=1, the CPU automatically generates an internal interrupt after each instruction, allowing a program to be inspected as it executes instruction by instruction.

The Interrupt Flag:-
  • ·       If IF=1, the CPU will recognize external interrupt request (Interrupt Disabled). If IF=0, then interrupt disabled.
  • ·       Clearing IF disables these interrupts.
  • ·       IF has no effect on either non-maskable external or internally generated interrupt.

The Direction Flag:-
  • ·       This bit is specially for string instructions.
  • ·       If DF=1, the string instruction will automatically decrement the pointer. If DF=0,the string instruction will automatically increment the pointer.

{ 11 comments... read them below or Comment }

  1. explain each register briefly with examples if any.

  2. I'm amazed, I have to say. Really hardly at any time do I experience a site that's the two educative and entertaining, and allow me tell you, you might have strike the nail on the head. Your concept is fantastic the issue is anything that not ample men and women are speaking intelligently about. I am very joyful that I stumbled across this in my find for anything referring to this.
    Wholesale Flags
    Flag Designer

  3. Can u give us a detailed explanation on this

  4. what r the function of status flag ... which is not describe here.. have a look as soon possible,
    Explaination is awesome.

    1. status flag are set according to some result of arithmetic operation. you do not need to alter the value yourself.

  5. why are there undefined flag bits??

  6. Why do we have undefined flagss??



- Copyright © 8085 Microprocessor -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -