2internal Architecture of 8086 up-MPMC
2internal Architecture of 8086 up-MPMC
Microprocessor
EE304- Microprocessors and
Microcontrollers
Architecture of 8086 Microprocessor
• It is a 16-bit Microprocessor
• It has 16-bit databus
– It can read data from or write data to memory and ports
either 16-bits or 8-bits at a time
• It has 20-bit Address bus
– It can address 220 memory locations i.e. 1MB
– Each location is of Byte wide
– 16-bit word will be stored in two consecutive memory
locations
– If the first byte of a word is at even address, 8086 can read
the entire word in one operation and if odd, in two
operations
Architecture of 8086 Microprocessor
BHE/S7
16-bit
AD19/S6…. AD16/S3 Bus ALU
AD15-AD0 Interface
INTA, RD, WR Unit Flags
DT/R, DEN,ALE
6-Byte
Instruction Queue
TEST
Lock
INT
QS0-QS1 NMI
Control & Timing RQ/GT0
S2,S1,S0 HOLD
GND
CLK Reset Ready MN/MX VCC HLDA
Architecture of 8086 Microprocessor
15 0
AX AH AL
BX BH BL
CX CH CL
Nibble 4-bit
DX DH DL
Byte 8-bit
word 16-bit
AX 0001001000110100 Double 32-bit
AH AL 00010010 00110100 Word
AX 1234H
AH AL 12H 34H
Architecture of 8086 Microprocessor
• MOV AX,[BX]
• MOV AX, [BX][SI]
Architecture of 8086 Microprocessor
• ROR opr, CX
Architecture of 8086 Microprocessor
Pointer Registers
IP Instruction Pointer Register
BP Base Pointer Register
SP Stack Pointer Register
• MOV AX,SI
• MOV AX,[SI]
• MOV AX,[BX][SI]
• MOV AX,1234[BX][SI]
Architecture of 8086 Microprocessor
CS=1000 3FFFFH
IP=01FFF 64k Data Segment Memory
EA ? 30000H
PA?
1FFFFH
64k Code Segment Memory
10000H
Memory Segmentation
Code Segment
8086 Microprocessor
Memory
64kB
CS
SS Stack Segment
DS Memory
ES 64kB
Data Segment
Memory
64kB
ExtraSegment
Memory
64kB
Memory Segmentation
Non
7FFFFH
Overlapping
Segments 64k Extra Segment Memory
70000H
3FFFFH
64k Data Segment Memory
30000H
1FFFFH
64k Code Segment Memory
10000H
Memory Segmentation
Overlapping
Segments 7FFFFH
64k
70000H
61FFFH
Extra Segment 64k 5FFFFH
Memory
64k Stack Segment Memory
52000H
50000H
3FFFFH
64k
30000H
24FFFH
Data Segment 1FFFFH
Memory
64k
64k Code Segment Memory
15000H
10000H
Physical Memory Address Calculation
15 0
Segment Register 0000 OFFSET Value
ADDER
19 0
20-Bit
Physical Memory Address
Physical Memory Address Calculation
IP 0022 0022 EA
Physical address of
PA 12362 Instruction
Instruction Queuing
U U U U OF DF IF TF SF ZF U AF U PF U CF
Carry Flag
1+0 =1
Addition operation 0+1 =1
1+1 =10
1+1+1 =11
89H 1 0 0 0 1 0 0 1
95H 1 0 0 1 0 1 0 1
11EH 0 0 0 1 1 1 1 0
C
1
Flag Register-Conditional Flags
Subtraction operation
06H 0 0 0 0 0 1 1 0
09H 0 0 0 0 1 0 0 1
-3 1 1 1 1 1 1 0 1
B 00000010
1 2’s Complement
1
00000011
Flag Register-Conditional Flags
Parity Flag
80 1 0 0 0 0 0 0 0
38 0 0 1 1 AC 1 0 0 0
42 0 1 0 0 1 0 0 0
AC 0 0 1
0 0 0 1 0
1
Correction Factor
0 1 0 0 0 0 1 0
Correction Factor: Subtract 6, when AC is set, C is set, 4-bits (Lower /Higher) >9
Flag Register-Conditional Flags
Zero Flag
Overflow Flag
75H 0 1 1 1 0 1 0 1
37H
OF
0 0 1 1 0 1 1 1
ACH 1 0 1 0 1 1 0 0
Flag Register-Control Flags
Direction Flag