Intel 8088 (8086) Microprocessor Structure: Haibo Wang ECE Department Southern Illinois University Carbondale, IL 62901
Intel 8088 (8086) Microprocessor Structure: Haibo Wang ECE Department Southern Illinois University Carbondale, IL 62901
Intel 8088 (8086) Microprocessor Structure: Haibo Wang ECE Department Southern Illinois University Carbondale, IL 62901
Haibo Wang
ECE Department
Southern Illinois University
Carbondale, IL 62901
3-1
Overview
Intel 8088 facts
20 bit address bus allow accessing VDD (5V)
1 M memory locations
16-bit internal data bus and 8-bit
20-bit
external data bus. Thus, it need 8-bit data
address
two read (or write) operations to
read (or write) a 16-bit datum control
8088 control
signals
Byte addressable and byte-swapping signals
To 8088 from 8088
Word: 5A2F
CLK
Bus
control
ALU Instruction Queue External bus
EU
control
Flag register
Bus Interface Unit (BIU)
3-3
General Purpose Registers
15 8 7 0
AX AH AL Accumulator
BX BH BL Base
Data Group
CX CH CL Counter
DX DH DL Data
SP Stack Pointer
BP Base Pointer
Pointer and
Index Group
SI Source Index
DI Destination Index
3-4
Arithmetic Logic Unit (ALU)
A B F Y
n bits n bits
0 0 0 A+B
0 0 1 A -B
Carry
0 1 0 A -1
Y= 0 ? F 0 1 1 A and B
1 0 0 A or B
A>B?
1 0 1 not A
Y
Signal F control which function will be conducted by ALU.
Signal F is generated according to the current instruction.
3-6
Instruction Machine Codes
Instruction machine codes are binary numbers
For Example:
3-8
Generating Memory Addresses
How can a 16-bit microprocessor generate 20-bit memory addresses?
3-9
Memory Segmentation
A segment is a 64KB block of memory starting from any 16-byte
boundary
For example: 00000, 00010, 00020, 20000, 8CE90, and E0840 are all valid
segment addresses
The requirement of starting from 16-byte boundary is due to the 4-bit
left shifting
DS Data Segment
SS Stack Segment
ES Extra Segment
3-10
Memory Address Calculation
Examples
CS 3 4 8 A 0 SS 5 0 0 0 0
IP + 4 2 1 4 SP + F F E 0
Instruction address 3 8 A B 4 Stack address 5 F F E 0
DS 1 2 3 4 0
DI + 0 0 2 2
Data address 1 2 3 6 2
3-11
Fetching Instructions
Where to fetch the next instruction?
8088 Memory
CS 1234
IP 0012 12352 MOV AL, 0
12352
Update IP
— After an instruction is fetched, Register IP is updated as follows:
— For Example: the length of MOV AL, 0 is 2 bytes. After fetching this instruction,
the IP is updated to 0014
3-12
Accessing Data Memory
There is a number of methods to generate the memory address when
accessing data memory. These methods are referred to as
Addressing Modes
Examples:
— Direct addressing: MOV AL, [0300H]
DS 1 2 3 4 0 (assume DS=1234H)
0 3 0 0
Memory address 1 2 6 4 0
DS 1 2 3 4 0 (assume DS=1234H)
0 3 1 0 (assume SI=0310H)
Memory address 1 2 6 5 0
3-13
Reserved Memory Locations
Some memory locations are reserved for special purposes.
Programs should not be loaded in these areas
FFFFF
Locations from FFFF0H to FFFFFH Reset FFFF0
are used for system reset code instruction
area
3-14
Interrupts
An interrupt is an event that occurs while the processor is executing a program
The interrupt temporarily suspends execution of the program and switch the
processor to executing a special routine (interrupt service routine)
When the execution of interrupt service routine is complete, the processor
resumes the execution of the original program
Interrupt classification
Some functions are not available It allows the use of 8087 coprocessor;
in minimum mode it also provides other functions
3-16