Microprocessor 8086
Microprocessor 8086
MicroProcessor: 8086
• Contain 2 processing units: Bus Interface Unit (BIU) and
the Execution Unit (EU).
• Each has dedicated functions and operate in parallel
• Makes fetching and execution of instructions
independent
• BIU is responsible for performing all the external bus
operations; instruction fetching, read/write data
operands, I/O peripherals
• Bus includes 8 bits bidirectional data bus, and 20 bits
address bus and signals to controls transfers.
MicroProcessor: 8086
• BIU contains the segment registers, the IP, address
generation adder, bus control logic and instruction queue.
• Instruction queue implements parallelism and contains up to 6
bytes of instruction code.
• BIU looks for free bus slot to add instruction to the FIFO queue
• The free bus slots, when both EU and BIU do not require the bus,
are called idle states
• The EU is responsible for decoding and executing instructions
• EU consists of ALU, status and control flags, general purpose
registers.
• EU obtains instructions from FIFO queue and data from register
or memory.
MicroProcessor: 8086
• EU decodes the instructions, generates
data addresses if required, and passes them
to BIU
• EU performs the execution and updates the
flag registers
• EU may have to wait if the instruction queue
is empty
Pointer and Index Registers
• Two pointer (SP & BP) and two index registers (SI &
DI)
• Used as offset addresses to reference 64KB segment
of memory
• Index register used relative to data segment or extra
segment
• Pointer register used relative to stack segment
register
• Values can be read and write through software
• Can only be accessed as word
• To use the addresses the instruction simply specifies the
Pointer and Index Registers
• SP and BP used as offset to current value of SS (SS:SP)
• SP represents the offset of next stack location
• BP is also used relative to SS
• BP is used access data within the stack segment of
memory
• Used in based addressing mode
• BP also used to reference parameters that are
passed to subroutine by way of the stack.
• In this case the subroutine uses based addressing to
access the values of parameters from stack
Pointer and Index Registers
• The index registers hold the offset for DS and ES.
• In indexed addressing the Source Index (SI) register
holds the offset of source operands
• While the Destination Index (DI) holds the offset of
destination operand
• Some of the operation (arithmetic or logical) can be
applied directly on data in memory, instead of
registers
• In this case, index address is used to identify the
operands in memory
Pointer and Index Registers
• The arithmetic operation can be applied directly to
index register
• For example, adding 2 to SI, to point the next word in
memory
Status Register