Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Microprocessor 8088/8086
What is a Computer?
Memory I/O
Processor
Data Bus
Address Bus
Control Bus
• CPU Registers
– special memory locations constructed from
flip-flops and implemented on-chip
– e.g., accumulator, count register, flag register
• Arithmetic and Logic Unit (ALU)
– ALU is where most of the action take place
inside the CPU
Generate Generate
Address Address Address Unit
1 2
A19
Address Bus provides a memory Address Bus
address to system memory and
I/O address to system I/O devices A0
• Logical Memory
– 80x86 supports byte addressable memory
– byte (8 bits) is a basic memory unit
– e.g., when you specify address 24 in memory, you get the
entire eight bits
– when the microprocessors address a 16-bit word of memory,
two consecutive bytes are accessed
• Physical Memory
– The physical memories of 80x86 family differ in width
• e.g., 8088 memory is 8 bits wide,
• 8086, 80286 memory is 16 bits wide, and
• 80386dx, 80486 memory is 32 bits wide
– for programming there is no difference in memory
width, because the logical memory is always 8-bit wide
– memory is organized in memory banks
• a memory bank is an 8-bit wide section of the memory
• e.g., the 16-bit microprocessors contain two memory banks to
form 16-bit wide section of memory that is addressed as bytes
or words
FFFFFD FFFFFC
FFFFFB FFFFFA
8 bits
8 bits
000005 000004
000003 000002
000001 000000
D15 - D8 D7- D0
• Text
– Letters and characters (7-bit ASCII
standard), e.g., 'A'=65=0x41
– Extended ASCII (8-bit) allows for
extra 128 graphics/symbols)
– Collection of characters = Strings
– Collection of Strings = Documents
• Programs
– Commands (MOV, JMP, AND, OR, NOT)
– Collections of commands = subroutines
– Collection of subroutines = programs
• Floating point numbers (covered later)
• Images (GIF, TIF, JPG, BMP)
• Video (MPEG, QuickTime, AVI)
• Audio (voice, music)
Note:
32 bit registers are
not available on
8086, 8088, 80286
• General-Purpose Registers
– AX (accumulator) often holds the
temporary result after an arithmetic and
logic operation
– BX (base) often holds the base (offset)
address of data located in the memory
• SI :來源索引暫存器。
DI :目的索引暫存器。
• 16 位元暫存器,功能同 bx 可間接
定址,但不能化分成兩個 8 位元。
• SP: 堆疊指標暫存器。
• BP: 基底指標暫存器。
– SP 是堆疊指標,當使用 push 指令時, sp
會加 2 ,而執行 pop 時 sp 會減 2 。
– BP 是可間接定址的暫存器,不過通常用於堆
疊段,如 mov ax,ss:[bp] 。
• 註 :mov ax,ss:[bp] 中的 ss 為區段
( 或稱節段 ) 暫存器,若省略時,則會取
ds 段的資料。
• 16 位元暫存器,先將它轉成 2 進制來看。
– AF :輔助進位旗標。 CF :進位旗標。
– OF :溢位旗標。 SF :符號 ( 負號 ) 旗標。
– PF :奇偶旗標。 ZF :零值旗標。
– DF :方向旗標。 IF :中斷旗標。
– TF :單步旗標。
Object Segment
Offset
Instruction CS
IP
Program data item DS Explicit,
BX,SI, or DI
Working storage item SS SP
or BP
Member of character sequence ES DI
• Interrupts
– Notifies the CPU when an event has
occurred
• Timer [update clock] , serial I/O [input data],
Parallel I/O [ready]
• Network adapter [packet arrived]