Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Intel 8086 Architecture

Reference: Yu / Marut
Chapter 02, Chapter 03
8086 Microprocessor:
Pin Diagram
Functional Blocks
Register array or Data Bus
internal memory
ALU

Instruction decoding
unit
Flag Register

Timing and
control unit PC/ IP

Control Bus Address Bus


Execution Unit (EU)

8086 Architecture
EU executes instructions that
have already been fetched by
the BIU.

BIU and EU functions


separately.

Bus Interface Unit (BIU)

BIU fetches instructions, reads data


from memory and I/O ports, writes
data to memory and I/ O ports.
8086 Architecture
There are two main components in 8086: Bus Interface Unit &
Execution Unit.

BIU performs the following actions:


• Maintains communication between the EU & the memory or I/O
circuits.
• Transmits addresses, data & control signals on the buses.
• Fetches instruction from memory
• Read data from port and memory
• Write data to port and memory
• BIU has registers CS, DS, ES, SS, IP: these hold addresses of
memory locations. IP contains the address of the next instruction to
be executed by EU.
8086 Architecture
EU performs the following actions:
• Executes instructions using ALU. ALU can perform
arithmetic (+, -, x, /) & logic (AND, OR, NOT) operations.
• The data for operations are stored in registers. EU has 8
registers to hold data: AX, BX, CX, DX, SI, DI, SP, BP. It also
contains Temporary Register & FLAGS Register.
• Tells BIU where to fetch instruction from.
• Decodes instructions to determine operations.
8086 Architecture
• The EU & BIU are connected by an Internal Bus, & they
work together.
• While the EU is executing an instruction, the BIU fetches
up to six bytes of the next instruction & places them in
the Instruction Queue. This operation is called
Instruction Prefetch. This speeds up the processor.

EU has no connection to system buses. It receives and


outputs all its data through BIU.
REGISTERS
• Information inside the microprocessor is stored in registers.
8086 has 14 registers, each of which are 16 bits in size.
• DATA Registers : hold data for an operation.
-AX (Accumulator Register)
-BX (Base Register)
-CX (Count Register)
-DX(Data Register)
• Instruction is faster if data are stored in registers.
• The high and low byte of data registers can be accessed
separately. The higher byte of AX is called AH and the lower
byte is called AL. Similarly BH, CH, DH, BL,CL, DL.
REGISTERS
• ADDRESS Registers : hold the address of an instruction or data.
Address Registers are divided into Index, Pointer & Segment Registers.

• Index Registers
-SI (Source Index)
-DI (Destination Index)

• Pointer Registers
-IP (Instruction Pointer); usually inaccessible
-BP (Base Pointer)
-SP (Stack Pointer)
REGISTERS
• The program’s code, data, & stack are loaded into different memory
segments named: Code Segment, Data Segment, Stack Segment.
• To keep track of various program segments, 8086 has 4 segment
registers.
Segment Registers : hold segment numbers.
-CS (Code Segment)
-DS (Data Segment)
-SS (Stack Segment)
-ES (Extra Segment)
If a program needs to access a second data segment, it can use the ES
register.
REGISTERS
• The registers SP, BP, SI DI normally point to memory
locations. They contain Offset Addresses of memory
locations.

• To access instructions, 8086 uses the registers CS & IP.


The CS register contains the segment number of the next
instruction, & the IP contains the offset. IP is updated
each time an instruction is executed so that it will point to
the next instruction.
Program Segments
• CS:IP –points to the physical address of the next
instruction to be executed.

• SS:SP –points to the stack.

• DS:DI – points to the physical address in memory where


data is to be stored next.

• DS:SI - points to the physical address in memory where


data is to be read from.
Flags Register
STATUS Register : keeps the current status of the
processor. The Status Register of 8086 is called the FLAGS
Register.
Flags Register is 16 bit register. 9 of these 16 bits stand for
9 flags.

U: UNDEFINED
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
U U U U OF DF IF TF SF ZF CF AF U PF U CF
Flags
• 8086 has 9 flags: Status flags(6) and Control flags(3)
• Status flags are
1. Carry flag (CF)
2. Parity flag (PF)
3. Overflow flag (OF)
4. Zero flag (ZF)
5. Sign flag(SF)
6. Auxiliary flag(AF)
Flags
Control flags are
1. Trace flag(TF)
2. Interrupt flag (IF)
3. Direction flag (DF)

15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
U U U U OF DF IF TF SF ZF CF AF U PF U CF
Thank You

You might also like