Breaking

Thursday, December 27, 2018

How many flags are there in 8086 microprocessor


How many flags are there in 8086 microprocessor and what are they?
What is a Flag : 
it is one bit signal which may have only one two values 1 0 or true false. When set flag termed as set is in position 1 and in 0 position it is termed as reset.
Flag Register : 
A 16 bit memory storage which stores all the flag bits. There are total 9 flags , 3 are control flags and 6 act as status flags other bits are spare.
Control Flags ,
 these flag control some specific operation of 8086, following are three control flags. With the help of these flag, 8086 controls some of its operation. The control flags are:
Control Flags -Interrupt Flag , Trap Flag and Direction Flag, 

Status Flags-  sign flag, zero flag, parity flag, carry flag, Auxiliary carry, Overflow flag

Flag Symbol
Flag name
Description

S
Sign flag
Set when answer of computation is negative
Z
Zero
Set when computation or comparison of previous instruction is zero
P
Parity
Set when lower byte contains even number of ones
C
Carry
When there have carry in computation
T
Trap
When processor enters single step instruction mode
I
Interrupt
Maskable interrupts are recognised
D
Direction
In string manipulation instructions.If 0 string is processed lowest to highest address,if 1 highest to lowest address
Ac
Auxiliary carry
Set if there is carry from lowest nibble
O
Overflow
When result is larger to accommodate in registers







No comments:

Post a Comment