8086microprocessor - Architecture
8086microprocessor - Architecture
MICROPROCESSOR
ARCHITECTURE
Features
• It is a 16-bit Micro Processor.
• 8086 has a 20-bit address bus can access up
to 220 memory locations (1 MB).
1
• It can support up to 64K I/O ports.
• It provides 14, 16 -bit registers.
• Word size is 16 bits and double word size is
4 bytes.
• It has multiplexed address and data bus
AD0- AD15 and A16 – A19.
• It can prefetches up to 6 instruction bytes
from memory and queues them in order to
speed up instruction execution.
2
• It requires +5V power supply.
3
4
Internal architecture of 8086
5
• The BIU performs all bus operations such as
instruction fetching, reading and writing
operands for memory and calculating the
addresses of the memory operands. The
instruction bytes are transferred to the
instruction queue.
• EU executes instructions from the instruction
system byte queue.
• BIU contains Instruction queue, Segment
registers, Instruction pointer, Address adder.
6
• EU contains Control circuitry, Instruction
decoder, ALU, Pointer and Index register, Flag
register.
EXECUTION UNIT
• Decodes instructions fetched by the BIU •
Generate control signals,
• Executes instructions.
7
The main parts are:
• Control Circuitry
• Instruction decoder
• ALU
EXECUTION UNIT –
General Purpose
Registers
16 bits
8 bits 8 bits
8
AH AL
Accumulator
AX
BH BL
Base
BX
CH CL
CX Count
DH DL
DX Data
9
SP Stack Pointer
SI Source Index
Index
DI Destination Index
10
EXECUTION UNIT – General Purpose Registers
Register Purpose
AX Word multiply, word divide, word I /O
AL Byte multiply, byte divide, byte I/O, decimal arithmetic
11
CL Variable shift and rotate
12
Pointer and Index Registers
• used to keep offset addresses.
• Used in various forms of memory addressing.
• In the case of SP and BP the default reference to form
a physical address is the Stack Segment (SS will be
discussed under the BIU)
• The index registers (SI & DI) and the BX generally
default to the Data segment register (DS).
SP: Stack pointer
– Used with SS to access the stack segment
BP: Base Pointer
– Primarily used to access data on the stack
– Can be used to access data in other segments
• SI: Source Index register
– is required for some string operations
– When string operations are performed, the SI register
points to memory locations in the data segment which is
addressed by the DS register. Thus, SI is associated with
the DS in string operations.
14
• DI: Destination Index register
– is also required for some string operations.
– When string operations are performed, the DI register
points to memory locations in the data segment which is
addressed by the ES register. Thus, DI is associated with
the ES in string operations.
16
EXECUTION UNIT – Flag Register
Flag Purpose
Carry (CF) Holds the carry after addition or the borrow after subtraction.
Also indicates some error conditions, as dictated by some
programs and procedures.
A control flag.
Interrupt (IF) Controls the operation of the INTR (interrupt request)
I=0; INTR pin disabled. I=1; INTR pin enabled.
Direction (DF) A control flag.
It selects either the increment or decrement mode for DI
and /or SI registers during the string instructions.
Adder