Beruflich Dokumente
Kultur Dokumente
M icroprocessor
A microprocessor is an electronic device which computes on the given input similar
to CPU of a computer. It is made by fabricating millions (or billions) of transistors
on a single chip.
History of Microprocessor
Microprocessor journey started with a 4-bit processor called 4004; it was made by
Intel Corporation in 1971. It was 1st single chip processor. Then the idea was
extended to 8-bit processors like 8008, 8080 and then 8085 (all are Intel products).
8085 was a very successful one among the 8-bit processors; however its
application is very limited because of its slower computing speed and other quality
factors. Some years later Intel came up with its 1st 16-bit processors 8086.
Intel 8086:
The 8086 is a 16-bit microprocessor chip designed by Intel corporation in between
early 1976 and mid-1978. The release of Intel's 8086 microprocessor in 1978 was a
watershed moment for personal computing.
1
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
2
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
3
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
The BIU also contains a dedicated adder which is used to generate the 20bit
physical address.
The main linkage between the two functional blocks is the instruction queue,
with the BIU looking ahead of the current instruction being executed in order to
keep the queue filled with instructions for the EU to decode and operate on.
Instruction Queue
• It is of 6 Bytes.
4
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
1. The BIU outputs the contents of the instruction pointer register (IP) onto the
address bus, causing the selected byte or word in memory to be read into the BIU.
3. Once inside the BIU, the instruction is passed to the queue: a first-in/first-out
storage register sometimes likened to a pipeline.
4. Assuming that the queue is initially empty, the EU immediately draws this
instruction from the queue and begins execution.
5. While the EU is executing this instruction, the BIU proceeds to fetch a new
instruction. Depending on the execution time of the first instruction, the BIU may
fill the queue with several new instructions before the EU is ready to draw its next
instruction.
6. The cycle continues, with the BIU filling the queue with instructions and the EU
fetching and executing these instructions. The BIU is programmed to fetch a new
instruction whenever the queue has room for two additional bytes. The advantage
to this pipelined architecture is that the EU can execute instructions (almost)
continually instead of having to wait for the BIU to fetch a new instruction. This is
shown schematically in the following Figure
5
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
6
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
7
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
Registers of 8086
• General Purpose Registers
• Pointer and Index Registers
• Segment Registers
• Instruction Pointer
• Status Flags
AX
BX
CX
DX
Each of these 16-bit registers are further subdivided into two 8-bit registers.
AX AH AL
BX BH BL
CX CH CL
DX BH DL
2. BX Register: This register is mainly used as a base register. It holds the starting
base location of a memory region within a data segment.
8
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
4. DX Register: DX register is used to contain I/O port address for I/O instruction.
Pointers and Index Registers
Following four registers are under this category:
Segment Register
9
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
The data segment register points to the starting address of the data segment, and
so on. The maximum capacity of a segment may be up to 64 KB.
10
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
Instruction Pointer
The Instruction Pointer (IP) in 8086 acts as a Program Counter. It points to the
address of the next instruction to be executed. Its content is automatically
incremented when the execution of a program proceeds further. The contents of
the IP and Code Segment Register are used to compute the memory address of the
instruction code to be fetched. This is done during the Fetch Cycle.
Status Flags
11
Dijlah Collage University Assistant Lecturer: Tamara Ala’a
Microprocessor Architecture Second Year
Status Flags determines the current state of the accumulator. They are modified
automatically by CPU after mathematical operations. This allows to determine
the type of the result. 8086 has 16-bit status register. It is also called Flag Register
or Program Status Word (PSW). There are nine status flags and seven bit positions
remain unused.
The following Figure shows the bit definitions for the 16-bit flag register.
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
OF DF IF TF SF ZF AF PF CF
Carry Flag
Undefined Parity
Flag
Auxiliary Carry Flag
Zero Flag
Sign Flag
Trap Flag
Interrupt Flag
Direction Flag
Overflow Flag 25
• Six of the flags are status indicators reflecting properties of the result of the last
arithmetic or logical instruction
• 8086 flag word. DF, IF, and TF can be set or reset to control the operation of the
processor.
• The remaining flags are status indicators. Bits marked X are undefined.
12