1.

How many flags are in the Status Flags ?

Answer»

Status Flags:- 

The 8086 has a 16 bit flag register 

(a) Condition code or status flags:- 

  • It is the lower byte of a 16 bit status flag register.
  • It contains sign flag, zero flag, auxiliary carry flag, Parity flag and overflow flag. 

(b) Machine cycle:- 

  • It is the higher byte of 16 bit status flag register. 
  • It contains directional flag, Trap flag, Interrupt flag etc.

(1) Carry Flag:- The flag register is set to 1 when there is unsigned overflow. When there is no overflow this flag is set 0. 

(2) Parity Flag:- The flag is set to be 1 when there is even no. of one bits in result and it 0 when there is odd no. of one bits. 

(3) Auxiliary Flag:- Set to be 1 when there is an unsigned overflow for low nibble (4 bits). 

(4) Zero Flag:- Set to be 1 when result is zero, for non-zero results this flag is set to 0. 

(5) Sign Flag:- Set to 1 when result is negative, when result is positive it is set to 0. 

(6) Trap Flag:- It is set; the processor enters the single step execution mode or a trap interrupt generated after execution of each instruction. 

(7) Direction Flag:- This is used string manipulation instruction D=0, then the string is processed beginning from lower address to the higher address. D=1, then the string is processed beginning higher address to the lower address. 

(8) Interrupt Flag:- This flag is set, the mask able interrupt recognized by the CPU otherwise they are ignored.

(9) Overflow Flag:- This flag is set, if an overflow occurs i.e. if the result signed operation is large enough to accommodate in a destination register.



Discussion

No Comment Found

Related InterviewSolutions