Introduction:8086 Microprocessor is an upgraded form of the 8085Microprocessor. This 16-bit microprocessor provides a storage capacity of 1MBand comprises 20 address lines and 16 data lines. It can operate in twomodes; Maximum and Minimum modes respectively. Maximum mode is apt when thesystem has multiple processors and Minimum mode is for a single processorsystem.8086Microprocessor is divide into two: Execution Unit BusInterface Unit (EU) (BU) EUThe EU passesinstructions to the BIU on where to fetch data from, how to decode and furtherexecute those instructions. It controls all operations with the help of theinstruction decoder and the ALU (Arithmetic and Logic Unit). It is connected tothe system only through the BIU.
The ALU performsarithmetic and logical operations like addition, subtraction, OR, Not, etc.1 Flag Register: A16-bit register that relies on the accumulator result for its status. Itcontains 9 flags further divided into Conditional and Control flags.· Conditional flags: 1.
Carryflag: Set to 1 when there is an overflow in arithmetic operations.2. Auxiliaryflag: Set to 1 when a carry/borrow is generated in the lower nibble and passedon to the higher nibble.3. Parityflag: Set to 1 when the lower order 8-bit result contains even number of 1’s.Set to 0 when there are odd number of 1’s.4.
Zeroflag: Set to 1 when an arithmetic or logical operation result is zero. 5. Signflag: Set to 1 when an operation results in a negative.
6. Overflowflag: Set to 1 when system capacity is exceeded.· Control flags:1. Directionflag: Set to 1 when it is required access the higher memory address in stringoperations.2. Interruptflag: Set to 1 when interrupt conditions needs enabling which means that theinterruption of a program has to be allowed.3. Trapflag: Set to 1 when the program is to be run in single step mode which meansone instruction is executed at a time to help in debugging.
2 General PurposeRegister: AH, AL, BH, BL, CH, CL, DH and DL are the 8 general purposeregisters. They can either be used individually (8-bit) or in pairs (16-bit). AH and AL = AXBH and BL = BXCH and CL = CXDH and DL = DX· AX register: Accumulator register;stores operands for arithmetic operations· BX register: Base register; stores theinitial base address of memory within data segment· CX register: Counter register; storesloop counter in loop instructions· DX register: stores I/O port address forI/O instructions3 Stack PointerRegister: It stored the starting address of the segment top the memory locationin 16-bit form of where the most recent word was stored on the stack. BIUThe BIU is connected tothe EU via the Internal Bus. It controls data and address transfers for the EUlike passing addresses, fetching instructions, decoding and writing data fromand to the memory.
1 Instruction Queue:The BIU receives 6 bytes of instructions at a time and passes them to theinstruction queue. As the EU keeps executing the instructions 2 bytes at a timeand is ready for the next set, it simply fetches the next set from thisinstruction queue. 2 Pipelining: Theprocess of the BIU passing the next set of instructions to the EU while theprevious instruction set is being executed is known as pipelining.
3 SegmentRegister: CS, DS, SS and ES are foursegment buses housed in the BIU. The processor uses the stored addresses ofinstructions and data present in the memory to access memory locations. · CS: Code segment; gives address ofmemory location of the executable program· DS: Data segment; gives the offset addressof the data to be used in the program· SS: Stack segment; provides memory todeal with data and addressing during program execution · ES: Extra segment; stores extradestination data for strings4 Instruction Pointer:It is present in the Segment register. It stores address of the nextinstruction set to be executed.