You are on page 1of 31

Intel Microprocessor 8086

Intel 8086

2
Intel 8086

3
8086 Clock generator (8284)

4
Instruction Queue

• Up to six instruction at a given time


• Speed up in instruction execution
• Supports pipelining

5
Memory Segmentation

• Segmentation is the process

in which the main memory of the

computer is logically divided into

different segments and each

segment has its own base address.


• CS, DS, SS, ES
• What are the advantages?
• Note that the 8086 does not work

the whole 1MB memory at any given

time (k4 KB max).


6
Advantages of Segmented Memory

• Powerful memory management mechanism.


• Data related or stack related operations can be performed in different
segments.
• Code related operation can be done in separate code segments.
• It allows to processes to easily share data.
• It allows to extend the address ability of the processor, i.e. segmentation allows
the use of 16 bit registers to give an addressing capability of 1 Megabytes.
Without segmentation, it would require 20 bit registers.
• It is possible to enhance the memory size of code data or stack segments beyond
64 KB by allotting more than one segment for each area.

7
Data Access Strategy of 8086

• 8086 access memory with even address


• If the data is in 30024h then, for a 16 bit data 8086 can bring it for operation
using one access (30024h and 30025h together
• On the other hand for off address such as 40005h, it has to bring 40004h +
• 40005h. Again, 40006h + 400007h
• Discard 40004h and 40007h
• Finally, result is in 40005h and 40006h. Two access.

8
8086 Architecture

9
Logical to Physical Address Calculation

• BIU/EU
• BIU does the address calculation
• Programmer provide the Code segment (16bit) and Instruction pointer
offset(16bit) values
• BIU calculate the 20 bit physical value
• 4 bit Left shift of CS value and add the IP offset values

10
Logical to Physical Address Calculation

• Imagine, the content of CS is 1601h. IP contains 1010h. Both are 16 bit contents.
• BIU is responsible for the physical address calculation. What is the 20 bit physical
address based on current values of CS and IP?
• 17020h

11
Addressing Modes of 8086

• Five groups

–Register and Immediate mode

–Memory mode

–I/O mode

–Relative addressing mode

–Implied addressing mode

12
Addressing Modes of 8086

Register and Immediate Addressing Mode


• Register Addressing Mode
MOV DX, CX

MOV AL,DL

• Immediate Addressing Mode


MOV CL, 03H

OR

VALUE EQU 03H

MOV CL,VALUE

13
Addressing Modes of 8086

• Direct Addressing Mode


MOV CX, DS:START

START=0040h, [DS]=3050h, What are addresses from which data will be transferred in CX?

30540h to CL, 30541h to CH

• Register Indirect Addressing Mode


MOV [DI],BX

[DS]=5004h, [DI]=0020h, [BX]=3456h

Then, after the execution of above instruction, what will happen?

14
Addressing Modes of 8086

• Based Addressing Modes


(Uses DS, SS, BX, BP)

MOV AL, START [BX]

MOV AL, [BX+START]

• Indexed Addressing Mode

MOV BH, ARRAY[SI]


• Based Indexed Addressing Mode

MOV ALPHA[SI][BX]

15
8086 Pins

16
8086 Pins

17
8086 Pins

18
8086 Pins

19
8086 Pins

20
Minimum Mode Pins

21
Minimum Mode Pins

22
Maximum Mode Pins

23
Maximum Mode Pins

24
Maximum Mode Pins

25
Address Latch Enable (ALE)

26
8086 Interrupt

27
Types of Interrupt

• Hardwired Interrupt/Software Interrupt


• Vectored Interrupt/Non vectored Interrupt
• Maskable Interrupt/Non maskable Interrupt

Software Interrupt
• 0-4 = Predefined Interrupts
• 5-31 Reserved by Intel for future use
• 32-255 Maskable interrupt

28
Predefined Interrupts

• TYPE 0 interrupt represents division by zero situation.


• TYPE 1 interrupt represents single step execution during the debugging of a
program.
• TYPE 2 interrupt represents non maskable NMI interrupt.
• TYPE 3 interrupt represents break point interrupt.
• TYPE 4 interrupt represents overflow interrupt.

29
CS and IP Calculation

• INT nn
• Address for IP = 4 * nn
• Address for CS ==(4 * nn ) + 2
• Remember nn should be in decimal

30
CS and IP Calculation

• A user calls INT 21H, then from which physical address the value will be loaded to
CS and IP?
• If CS and IP will load with the value 40ADh, and 0FD84H, then what will be the
physical address of the ISR?
–21H is 33 in decimal

–IP address 4 33 132 84H

–CS address = (4*33)+2 = 134 = 86H

–84 th and 85 th contains 0FD84H

–86 th and 87 th contains 40ADH

–Thus, 20 bit physical address for ISR is 50854 H

31

You might also like