ECE252L Set 2 S20
ECE252L Set 2 S20
2. Decoding
3. p executes it
Pre-fetch queue
Bus controller
Segment registers
Instruction pointer IP
DR. NEMA SALEM SPRING 2020 5
BIU: Pre-fetch queue (pipelining)
Internal queue with a byte-wide and 4 bytes deep
FIFO memory
Shift left register
It allows EU to obtain the next instruction directly
from BIU instead of the memory
Executes instruction much faster
8088
Accumulator
Base
Counter
Data
DR. NEMA SALEM SPRING 2020 14
Each of the registers is 16 bits wide (AX, BX, CX, DX)
Also, they can be accessed as 8 bits registers AL, AH, BL, BH, CL, CH, DL, DH
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
Register operations
AX Word multiply, word divide, word IO
AL Byte multiply, Byte divide, Byte IO, translate
AH Byte multiply, Byte divide
BX translate
CX String operations, loops
CL Shift and rotate
DX Word multiply, word divide, Indirect IO
Source Index
Destination Index
Base pointer
Stack Pointer
DR. NEMA SALEM SPRING 2020 16
Each of them is 16 bits wide, L/H bytes are not accessible
They are used as memory pointers (Offsets)
Example: MOV AH, [SI]Move the byte stored in memory location
whose address is contained in the register SI to register AH
IP is not under direct control of the programmer
SP (stack pointer) used to address data in a LIFO (last-in, first-out)
stack memory
BP (base pointer) often used to address an array of data in the
stack memory
MOV AL, 3H
MOV BL, 2H
INC BL
SUB AL,BL
ES
Extra Segment Register
CS
Code Segment Register
SS
Stack Segment Register
Boundary addresses means the starting (least/min) address and the ending
(highest/max) address of the corresponding memory segment.
Then the effective memory address (EA) = this 20-bit segment start address +
the 16-bit offset address in another processor register
Addresses within a segment can range from address 0 to address FFFFh. This
corresponds to the 64Kbyte length of the segment.
DR. NEMA SALEM SPRING 2020 32
DR. NEMA SALEM SPRING 2020 33
Example: DS = 7FA2h & Offset = 438Eh