Software Architecture: of The INTEL 8086
Software Architecture: of The INTEL 8086
Microprocessor &
Microcontroller
Hardware Architecture of
INTEL 8086
Pin Diagram and Pin Details
min/max mode
Coprocessor and Multiprocessor
configuration
Hardware organization of address space
Control signals
I/O interfaces
RCET
Microprocessor &
Microcontroller
RCET
Microprocessor &
Microcontroller
Software
Architecture of
INTEL 8086
RCET
Software architecture of
the INTEL 8086
Memory segmentation and
addressing
Block diagram of 8086
Address space & Data organization
Data Types
Registers
Stack
I/O space
RCET
Microprocessor &
Microcontroller
RCET
RCET
Microprocessor &
Microcontroller
Segmented Memory
RCET
Microprocessor &
Microcontroller
Memory Address
Generation
The BIU has a dedicated adder for
determining physical memory addresses.
Offset Value (16 bits)
0000
Adder
RCET
Microprocessor &
Microcontroller
Segment : Offset
Address
Logical Address is specified as segment:offset
Physical address is obtained by shifting the
segment address 4 bits to the left and adding
the offset address.
Thus the physical address of the logical address
A4FB:4872 is:
A4FB0
+ 4872
A9822
RCET
Microprocessor &
Microcontroller
10
Segments, Segment
Registers & Offset
Registers
Microprocessor &
Microcontroller
11
Segments, Segment
Registers & Offset
Registers
4 Segments in 8086
Code Segment (CS)
Code
SEGMEN
T
REGISTE
R
Instruction
Pointer (IP)
DSR
Source Index
(SI)
ESR
Destination
Index (DI)
SSR
Stack Pointer
(SP) / Base
12
Segment
Extra
Segment
Stack
RCET
Microprocessor &
Segment
Microcontroller
REGISTER
CSR
Segment
Data
OFFSET
RCET
Microprocessor &
Microcontroller
13
RCET
Microprocessor &
Microcontroller
14
Pipelined architecture of
the 8086 microprocessors
RCET
Microprocessor &
Microcontroller
15
RCET
Microprocessor &
Microcontroller
16
8086 Registers
General Purpose
AH
Index
AL
AX
BP
SP
BH
BL
BX
SI
CH
CL
DH
DL
CX
DI
Segment
DX
CS
RCET
SS
Flags
DS
IP
ES
Microprocessor &
Microcontroller
17
General Purpose
Registers
AX - the
Accumulator
BX - the Base
Register
CX - the Count
Register
DX - the Data
Register
RCET
Microprocessor &
Microcontroller
18
General Purpose
Registers
AX
Accumulator Register
Preferred register to use in arithmetic, logic
and data transfer instructions because it
generates the shortest Machine Language
Code
Must be used in multiplication and division
operations
Must also be used in I/O operations
BX
Base Register
Also serves as an address register
RCET
Microprocessor &
Microcontroller
19
General Purpose
Registers
CX
Count register
Used as a loop counter
Used in shift and rotate operations
DX
Data register
Used in multiplication and division
Also used in I/O operations
RCET
Microprocessor &
Microcontroller
20
Microprocessor &
Microcontroller
21
Flag Register
Overflow
Carry
Direction
Parity
Interrupt enable
Auxiliary Carry
Trap Zero
Sign
RCET
Microprocessor &
Microcontroller
8086 Programmers
Model
ES
CS
SS
DS
IP
BIU registers
(20 bit adder)
EU registers
AX
BX
CX
DX
AH
BH
CH
DH
Extra Segment
Code Segment
Stack Segment
Data Segment
Instruction Pointer
AL
BL
CL
DL
SP
BP
SI
DI
FLAGS
RCET
Microprocessor &
Microcontroller
Accumulator
Base Register
Count Register
Data Register
Stack Pointer
Base Pointer
Source Index Register
Destination Index Registe
23
The Stack
The stack is used for temporary storage of
information such as data or addresses.
When a CALL is executed, the 8086 automatically
PUSHes the current value of CS and IP onto the
stack.
Other registers can also be pushed
Before return from the subroutine, POP
instructions can be used to pop values back from
the stack into the corresponding registers.
RCET
Microprocessor &
Microcontroller
24
The Stack
RCET
Microprocessor &
Microcontroller
25
Hardware
Architecture of
INTEL 8086
RCET
26
Hardware Architecture of
INTEL 8086
Pin Diagram and Pin Details
min/max mode
Hardware organization of address space
Control signals
Coprocessor and Multiprocessor
configuration
I/O interfaces
RCET
Microprocessor &
Microcontroller
27
RCET
Microprocessor &
Microcontroller
28
Grou
nd
Reset
Registers,
seg regs,
flags
CS: FFFFH,
IP: 0000H
If high for
minimum 4
clks
Clock
Duty cycle:
33%
RCET
Microprocessor &
Microcontroller
29
Address/Data
Bus:
Address Latch
Enable:
Contains
address bits A15A0 when ALE is 1
& data bits D15
D0 when ALE is
0.
RCET
When high,
multiplexed
address/data bus
contains address
information.
Microprocessor &
Microcontroller
30
Non maskable
interrupt
Interrupt
request
RCET
Interrupt
acknowled
ge
Microprocessor &
Microcontroller
31
Hold
acknowledg
e
RCET
Microprocessor &
Microcontroller
32
RCET
Microprocessor &
Microcontroller
33
Bus High
Enable/S7
Enables most
significant data
bits D15 D8
during read or
write operation.
S7: Always 1.
1,1: No selection
RCET
Microprocessor &
Microcontroller
34
Pins
Maximum
Mode Pins
RCET
Microprocessor &
Microcontroller
35
RCET
Microprocessor &
Microcontroller
36
Status
Signal
Inputs to 8288 to
generate
eliminated signals
due to max mode.
Microprocessor &
Microcontroller
37
DMA
Request/Gr
ant
Activated by using
the LOCK: prefix on
any instruction
Lock Output
RCET
Microprocessor &
Microcontroller
38
QS1 QS0
00: Queue is idle
01: First byte of
opcode
10: Queue is empty
11: Subsequent byte
of opcode
RCET
Queue
Status
Microprocessor &
Microcontroller
Used by numeric
coprocessor
(8087) 39
RCET
Microprocessor &
Microcontroller
40
RCET
Microprocessor &
Microcontroller
41
RCET
Microprocessor &
Microcontroller
42
RCET
Microprocessor &
Microcontroller
43
RCET
Microprocessor &
Microcontroller
44
RCET
Microprocessor &
Microcontroller
45
Microprocessor &
Microcontroller
46
RCET
Microprocessor &
Microcontroller
47
RCET
Microprocessor &
Microcontroller
48
Memory Banking
RCET
Microprocessor &
Microcontroller
49
A
____
BHE
ALE
D
20
21
Latch
A(11-1)
D(7-0)
A(19-12)
16
Low byte
(Even Bank)
Addr
Decoder RAMCS*
8086
__
M/IO
___
WR
___
RD
A0
MEM*
BHE*
A(11-1)
D(15-8)
A(10-0)
D(7-0)
__
R/W
OE*
CS*
High byte
(Odd Bank)
50
8086 Interrupts
RCET
Microprocessor &
Microcontroller
51
8086 Interrupts
Procedure
RCET
Microprocessor &
Microcontroller
52
RCET
Microprocessor &
Microcontroller
53
RCET
Microprocessor &
Microcontroller
54
RCET
Microprocessor &
Microcontroller
55
RCET
Microprocessor &
Microcontroller
56
Microprocessor &
Microcontroller
57
Coprocessor and
Multiprocessor
configuration
Multiprocessor Systems refer to the
use of
multiple processors that executes instructions
simultaneously and communicate with each
other using mail boxes and Semaphores.
Microprocessor &
Microcontroller
58
Coprocessor and
Multiprocessor
configuration
Coprocessors
and
Closely
coupled
configurations are similar in that both the
8086 and the external processor shares the:
- Memory
- I/O system
- Bus & bus control logic
- Clock generator
RCET
Microprocessor &
Microcontroller
59
Coprocessor / Closely
Coupled Configuration
RCET
Microprocessor &
Microcontroller
60
Microprocessor &
Microcontroller
61
Coprocessor Execution
Example
Coprocessor cannot take control of the bus, it does everything through the CPU
RCET
Microprocessor &
Microcontroller
62
Closely Coupled
processor may
take control of the
bus independently.
Two 8086s cannot
be closely coupled.
RCET
Microprocessor &
Microcontroller
63
Loosely Coupled
Configuration
has shared system bus, system memory, and
system I/O.
each processor has its own clock as well as its
own memory (in addition to access to the system
resources).
Used for
systems.
medium
to
large
multiprocessor
Microprocessor &
Microcontroller
64
Loosely Coupled
Configuration
No direct connections between the modules.
Each share the system bus and communicate
through shared resources.
Processor in their separate modules can
simultaneously access their private subsystems
through their local busses, and perform their local
data
references
and
instruction
fetches
independently. This results in improved degree
of concurrent processing.
Excellent for real time applications, as separate
modules can be assigned specialized tasks
RCET
Microprocessor &
Microcontroller
65
Advantages of
Multiprocessor
Configuration
Microprocessor &
Microcontroller
66
WAIT State
Microprocessor &
Microcontroller
67
RCET
Microprocessor &
Microcontroller
68
RCET
Microprocessor &
Microcontroller
69
RCET
Microprocessor &
Microcontroller
70