Professional Documents
Culture Documents
DDMP Unit 5 Final
DDMP Unit 5 Final
Interfacing
Dr V S M Srinivasavarma
AX AH AL Accumulator
BH BL Base Status and
BX FlagsH FlagsL Control Flags
CX CH CL Count
DX DH DL Data
SP Stack Pointer
ES Extra Segment
BP Base Pointer
CS Code Segment
SI Source Index
DS Data Segment
DI Destination Index
SS Stack Segment
IP Instruction Pointer
OF DF IF TF SF ZF AF PF CF
2 PF Set if low-order 8 bits of result contain an even number of 1-bits; cleared otherwise
4 AF Set on carry from or borrow to the low-order 4-bits of AL; cleared otherwise
8 TF Once set, a single-step interrupt occurs after the next instruction executes; TF is cleared by
the single step interrupt
9 IF When set, maskable interrupts will cause the CPU to transfer control to an interrupt vector
specified location
10 DF Causes string instructions to auto decrement the appropriate index register when set;
clearing DF causes auto increment
11 OF Set if the signed result cannot be expressed within the number of bits in the destination
operand; cleared otherwise
Byte 7
Byte 6 Word
Read 2
starting
Read 1 Byte 5
at an odd
Byte 4 address
8 9
6 7
4 5
2 3
Byte 5 0 1
Word 2
Byte 4
Byte 3
Word 1 If a 16 bit word begins at an odd
Byte 2 address, the 8086 will require
two memory read or write cycles
Byte 1 16 bit data word to 8086
Word 0
Byte 0
◼ Data Segment
◼ Stores data for program
◼ Stack Segment
◼ Store interrupt and subroutine return addresses
◼ Extra Segment
◼ Extra data segment (often used for shared data)
Code Segment
C3FEFH
B3FF Code Segment
B3FF0H
Stack Segment
5D27
6D26FH
Extra Segment Stack
6288FH
Segment
Extra
52B9 5D270H Segment
52B90H
00000H
SAR
DATA CF Arithmetic Right Shift
SAL
CF SF DATA 0
Arithmetic Left Shift
RCR
DATA CF Rotate Through Carry Right
ROL
CF DATA Rotate Left
ROR
DATA CF Rotate Right
◆ 2-bit MOD Field and 3-bit R/M field together specify the second operand
MOD Description
00 Memory Mode, No displacement follows*
* Except When R/M = 100,
01 Memory Mode, 8-bit displacement follows then 16-bit displacement
follows
10 Memory Mode, 16-bit displacement follows
11 Register Mode (no displacement)
ALE
M/ IO
Adress/ S3 - S7
A16-A19, BHE
Status
Float Data in D0 – D15 Float
AD0 – AD15 A0 – A15
RD
DT/ R
DEN
WR
DT/ R
DEN
7 November 2023 Dr. VSMS 36
8086 Pin Description
◆MN/MX:
◼ The minimum mode is intended for simple single
processor system on one printed circuit board (PCB)
◼ The maximum mode is intended for more complex
systems with separate I/O and memory boards
◼ This mode also supports coprocessors such as the 8087
◆Write (WR)
◼ Active low signal indicates that the direction of the data
flow on the bus is from Processor to Memory or I/O
◼ It output during T2 state and removed during the T4 state
◼ MEMW and IOW
RD
IOR
MEMR
M/ IO
MEMW
IOW
WR
Fc = 24MHz CLK
X2 To 8086
CLK Input
EFI
F/ C PCLK To 8086
Peripherals
CSYNC
8284A
+5V
+
10 μF
-
Power on reset active time of 50 us
L L L
1A4 1Y4
L H H
1G
H X Z
2A1 2Y1
2A2 2Y2
2A3 2Y3
2A4 2Y4
2G
INPUTS
OUTPUT
E’ DIR
L L Bus B Data to Bus A
L H Bus A Data to Bus B
H X Isolation
DIR E
D6 Q6
D7 Q7
C OC
BHE/S7 BHE
8 A19
U3
74373 A19
A16 c oc A16
0
AD15 A15
U4
8 74373 Address Bus
AD8 c oc A8 A0- A19
6 AD7 A7
U5
74373
AD0 c oc A0
ALE
M/ IO IOR
M/ IO U6 Memory & IO
IOW
WR 74244 WR Read & Write
Signal MEMR
RD RD
1A Generation MEMW
◼ RAM
◼ 256KB of RAM using IC 62256 (32KB) FFFFF
EPROM
F0000
3FFFF
Memory Mapping for 8086
RAM
00000
0C Chip 2 EVEN
CS
0C Chip 3
ODD
CS
Control Words
There are two types of control word.
1. Mode instruction (setting of function)
2. Command (setting of operation)