8086 MicroProcessors
Lecture
8086 Microprocessors
2
8086 Microprocessors
The BIU is responsible for performing all external bus
operations, such as instruction fetching, reading and
writing of data operands for memory, address
generating, and inputting or outputting data for
input/output peripherals.
These operations are take place over the system bus.
This bus includes 16-bit bidirectional data bus, a 20
bus, and the signals needed to control transfer over the
bus.
3
8086 Microprocessors
8086 microprocessor is divided internally into two separate
units:
◦ Bus Interface Unit (BIU)
◦ Execution Unit (EU)
The two units functions independently.
The Execution Unit (EU) is responsible for decoding and
executing instructions.
It contains arithmetic logic unit (ALU), status and control flags,
general-purpose register, and temporary operand registers.
Maintain the microprocessor status and control flags,
manipulates the general registers and instruction operands
4
THE EXECUTION UNIT
The EU has 16 bit ALU for performing arithmetic and
logic operations.
16 bit registers (AX, BX, CX, DX, SP, BP, SI, DI and
Flag registers).
◦ AX, BX, CX, DX (general purpose registers) can be
used as eight 8 bit registers (AH, AL, BH, BL, CH,
CL, DH, DL).
5
8086 Microprocessors
The BIU uses a mechanism known as pre fetching.
The BIU uses mechanism of pre fetching by queue.
This queue permits the 8086 to pre fetch instruction
code.
6
8086 Microprocessors
7
GENERAL PURPOSE REGISTERS
General purpose registers (AH, AL, BH, BL,
CH, CL, DH, DL).
These registers can be used as 8 individually
or can be used as 16 BX, CX, and DX.
The AL register is also called the accumulator
some features that the other general purpose
registers do not have.
8
GENERAL PURPOSE REGISTERS
9
GENERAL PURPOSE REGISTERS
AX
◦ AX is 16 bit accumulator accumulator
◦ AL is 8 bit accumulator
Used for operations involving input/output
and most arithmetic.
For example: multiply, divide, and translate
instructions assume the use of AX.
Also, some instructions generate more
efficient machine code if they reference AX
rather than another register.
10
GENERAL PURPOSE REGISTERS
BX
◦ BX is known as the Base register
◦ This is only general purpose register whose contents can
be used for addressing 8086 memory.
All memory reference utilizing this register content for
addressing uses the DS as the default segment register.
BX can also be combined with DI or SI as a base register for
special addressing.
BX register is similar to the 8085 HL register.
(BH to H;
BL to L)
11
GENERAL PURPOSE REGISTERS
CX
◦ CX is known as the counter register
◦ It may contain a value to control the number of
times a loop is repeated or a value to shift bits left
or right.
12
GENERAL PURPOSE REGISTERS
DX
DX is known as a data register
◦ Used to hold 16 bit result (data).
◦ Some I/O operations require its use,
◦ like multiply and divide operations that involve
large values assume the use of DX and AX together
as a pair.
13
POINTER & INDEX REGISTERS
The 8086 has four other general registers,
two pointer registers SP and BP,
two index registers DI and SI
These are used to store what are called offset addresses
An offset address represents the displacement of a
storage location in memory from the segment base
address in a segment register.
Unlike the general-purpose data registers, the pointer
and index registers are only accessed as words (16 bits).
14
POINTER REGISTERS
The two pointer registers (16 bits), stack pointer (SP) and base
pointer (BP) are used to access data in the stack segment.
The 16 bit SP register provides an offset value, which, when
associated with the SS register (SP:SS), refers to the current
word being processed in the stack.
The SP contents are automatically updated during the execution
of a POP and PUSH
15
POINTER REGISTERS
16
17
18