Microprocessors Notes
Microprocessors Notes
Microprocessors Notes
PART – A
PART – B
UNIT-1: PART-A
1. Describe the features and comparison of 8085 & 8086 Microprocessors
Features of 8086:
8086 Microprocessor is an enhanced version of 8085 Microprocessor that was designed
by Intel in 1976. It is a 16-bit processor having 20 address lines and16 data lines that
provides up to 1MB storage. It consists of powerful instruction set, which provides
operations like multiplication and division easily. It supports two modes of operation, i.e.
Maximum mode and Minimum mode. Maximum mode is suitable for system having
multiple processors and Minimum mode is suitable for system having a single processor.
The most prominent features of a 8086 microprocessor are:
It has an instruction queue, which is capable of storing six instruction bytes from
the memory resulting in faster processing.
It was the first 16-bit processor having 16-bit ALU, 16-bit registers, internal data
bus, and 16-bit external data bus resulting in faster processing.
It is available in 3 versions based on the frequency of operation −
8086 → 5MHz
8086-2 → 8MHz
(c)8086-1 → 10 MHz
It uses two stages of pipelining, i.e. Fetch Stage and Execute Stage, which improves
performance.
Fetch stage can prefetch up to 6 bytes of instructions and stores them in the queue.
Execute stage executes these instructions.
It has 256 vectored interrupts.
It consists of 29,000 transistors.
Comparison between 8085 & 8086 Microprocessor:
Size − 8085 is 8-bit microprocessor, whereas 8086 is 16-bit microprocessor.
Address Bus − 8085 has 16-bit address bus while 8086 has 20-bit address bus.
Memory − 8085 can access up to 64Kb, whereas 8086 can access up to 1 Mb of
memory.
Instruction − 8085 doesn’t have an instruction queue, whereas 8086 has an
instruction queue.
Pipelining − 8085 doesn’t support a pipelined architecture while 8086 supports a
pipelined architecture.
I/O − 8085 can address 28 = 256 I/O's, whereas 8086 can access 2 16 = 65,536
I/O's.
Cost − The cost of 8085 is low whereas that of 8086 is high.
While addressing any location in the memory bank, the physical address is calculated
from two parts:
Physical address= segment address + offset address
The first is segment address, the segment registers contain 16-bit segment base
addresses, related to different segment.
The second part is the offset value in that segment.
Pointers and Index Registers:
The index and pointer registers are given below:
IP—Instruction pointer-store memory location of next instruction to be executed
BP—Base pointer
SP—Stack pointer
SI—Source index
DI—Destination index
The pointers registers contain offset within the particular segments. The pointer register
IP contains offset within the code segment. The pointer register BP contains offset within
the data segment. Thee pointer register SP contains offset within the stack segment. The
index registers are used as general purpose registers as well as for offset storage in case
of indexed, base indexed and relative base indexed addressing modes. The register SI is
used to store the offset of source data in data segment. The register DI is used to store
the offset of destination in data or extra segment. The index registers are particularly
useful for string manipulation.
8086 flag register
The 8086 flag register contents indicate the results of computation in the ALU. It also
contains some flag bits to control the CPU operations. A 16 bit flag register is used in
8086. It is divided into two parts .
i. Condition code or status flags
ii. Machine control flags
The condition code flag register is the lower byte of the 16-bit flag register. The
condition code flag register is identical to 8085 flag register, with an additional overflow
flag.
The control flag register is the higher byte of the flag register. It contains three flags
namely direction flag (D), interrupt flag (I) and trap flag (T).
4. Describe the 8086 Flag Register of 8086 Microprocessor
The 8086 flag register contents indicate the results of computation in the ALU. It also
contains some flag bits to control the CPU operations.
A 16 bit flag register is used in 8086. It is divided into two parts .
i. Condition code or status flags
ii. Machine control flags
The condition code flag register is the lower byte of the 16-bit flag register. The condition
code flag register is identical to 8085 flag register, with an additional overflow flag. The
control flag register is the higher byte of the flag register. It contains three flags namely
direction flag (D), interrupt flag (I) and trap flag (T).
2. Direct: In the direct addressing mode a 16-bit memory address (offset) is directly
specified in the instruction as a part of it.
Ex: MOV AX, [5000H]
Here, data resides in a memory location in the data segment, whose effective address
may be completed using 5000H as the offset address and content of DS as segment
address. The effective address here, is 10H * DS + 5000H.
3. Register: In register addressing mode, the data is stored in a register and is referred
using the particular register. All the registers, except IP, may be used in this mode.
Ex: MOV BX, AX
4. Register Indirect: Sometimes, the address of the memory location, which contains
data or operand, is determined in an indirect way, using the offset register. This mode of
addressing is known as register indirect mode. In this addressing mode, the offset
address of data is in either BX or SI or DI register. The default segment is either DS or
ES. The data is supposed to be available at the address pointed to by the content of any
of the above registers in the default data segment.
Ex: MOV AX, [BX]
Here, data is present in a memory location in DS whose offset address is in BX. The
effective address of the data is given as 10H * DS+[BX].
5. Indexed: In this addressing mode, offset of the operand is stored in one of the index
registers. DS and ES are the default segments for index registers, SI and DI respectively.
This is a special case of register indirect addressing mode.
Ex: MOV AX, [SI]
Here, data is available at an offset address stored in SI in DS. The effective address, in
this case, is computed as 10*DS+[SI].
7. Based Indexed: The effective address of data is formed, in this addressing mode, by
adding content of a base register (any one of BX or BP) to the content of an index register
(any one of SI or DI). The default segment register may be ES or DS.
Ex: MOV AX, [BX][SI]
Here, BX is the base register and SI is the index register the effective address is
computed as 10H * DS + [BX] + [SI].
11. Inter-segment Direct: In this mode, the address to which the control is to be
transferred is in a different segment. This addressing mode provides a means of
branching from one code segment to another code segment. Here, the CS
and IP of the destination address are specified directly in the instruction.
12. Inter-segment Indirect: In this mode, the address to which the control is to be
transferred lies in a different segment and it is passed to the instruction indirectly, i.e
contents of a memory block containing four bytes, i.e IP (LSB), IP(MSB), CS(LSB) and CS
(MSB) sequentially. The starting address of the memory block may be referred using any
of the addressing modes, except immediate mode.
7. Explain the forming of effective addresses in different modes of 8086 µProcessor.
Forming the effective Addresses:
The following examples explain forming of the effective addresses in the different modes.
Ex: 1. The contents of different registers are given below. Form effective addresses for
different addressing modes.
Offset (displacement)=5000H
[AX]-1000H, [BX]- 2000H, [SI]-3000H, [DI]-4000H, [BP]-5000H, [SP]-6000H,
[CS]-0000H, [DS]-1000H, [SS]-2000H, [IP]-7000H
Shifting segment address four bits to the left is equivalent to multiplying it by 16D or
10H
i. Direct addressing mode: ii. Register indirect:
MOV AX,[5000H] MOV AX, [BX]
DS : OFFSET ↔ 1000H : 5000H DS: BX ↔ 1000H: 2000H
10H*DS ↔ 10000—segment address 10H*DS↔ 10000—segment address
offset ↔ +5000---offset address [BX] ↔ +2000---offset address
_______ ________
15000H – Effective address 12000H – Effective address
_______ ________