UNIT 1 AMP Notes
UNIT 1 AMP Notes
UNIT-1
ARCHITECTURE OF 8086 MICROPROCESSER
What is microprocessor?
Microprocessor is a general-purpose programmable LSI or VLSI device capable
of performing all the arithmetic and logical operations by a series of micro-
operations. It is a powerful as many as thousands of fundamental digital devices.
FEATURES OF 8086 MP
i. Multiplexed 16-bit data bus.
ii. 20-bit address bus can able to access up to 1MB memory.
iii. It uses a segmented addressing which facilitates the programmer to
address 4x64KB of memory at a time.
iv. It has pipeline processing facility which increases the speed of operation.
v. The 8086 is a 16-bit microprocessor.
vi. It has 14(16 bit) registers and ALU.
vii. It has 256 software vectored interrupts.
viii. It can be used in either single processor environment or multiprocessor
environment.
ix. Bit,byte,word processing ability.
x. It has advanced several instruction set.
xi. It supports the multiprogramming.
Page-1
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Page-2
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Page-3
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Page-4
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Control flags:
a. Direction flag (DF): if its sets, the string operation will be carried out in
reverse direction i.e. from the last string byte towards the first-string
byte.
b. Interrupt enable flag (IF): if it is set then the processor recognises the
maskable interrupt otherwise the maskable interrupt are ignored.
c. Trap flag (TF): if it is set, the processor goes into single-step mode.in
single-step mode processor executes one instruction at time, this type
of operation very useful for debugging programs.
Physical Address Calculation:
• The physical address is the 20-bit address normally available at address
line.
• The 20-bit physical address is used to access the external memory& input
device.
• But in the 8086 processor there are 20-bit registers to provide a 20-bit
physical address.
• But it uses tricky mechanism by using adder.
• In BIU to generate the 20-bit physical address.
• Adder takes the 16-bit address information from one of the 16-bit
segment register & another 16-bit address information from one of the
16-bit pointer or index register or general purpose register (BX) to form
20-bit physical address.
• The content of segment register is known as base address and content of
any other register known as offset address.
• These addresses are normally called as logical addresses.
• The adder shifts the segment register content by 4-bit position left or
multiply by 16 or 10h and then adds the offset address to form 20-bit
physical address.
EX:
1. If segment register CS = 3456 & offset from register IP = 1230.
• 3456x16 or 10h = 34560
+ 1230
35790
20-bit physical address 35790
Page-5
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Page-6
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
MINIMUM MODE
MAXIMUM MODE CONFIGURATION:
• This mode used in more complex systems containing co-processor
like 8087.
• Requires more control signals.
• MN/MX is connected to ground.
• 8086 MP does not generates control signals directly instead
generates a status signal.
• There is a multiprocessor configuration.
Page-7
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
MEMORY SEGMENTATION:
• The memory is an 8086 based system is organised as segmented memory.
• The CPU 8086 is able to access 1MB of physical memory.
• The complete 1MB of memory can be divided into 16 segments, each of
64KB size and is addressed by a one of the segment registers.
• Segment register point to starting location of a particular segment.
• The address of the segment may be assigned 0000h to F000h respectively.
• To address a specific memory location in a segment, we need an offset
address.
• The offset address values are from 0000h to FFFFh .
Page-8
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Page-9
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
S4 S3 function
0 0 Extra segment
0 1 Stack segment
1 0 Code or no
segment
1 1 Data segment
Read data(RD)-pin 32
• It is an active low o/p pin.
• Its activated whenever MP need information from m/l or i/o port.
• RD goes to high impedance state during hold acknowledge.
Ready signal Ready (pin 22)
• Its active high i/p pin.
• If ready pin is at logic 0 , MP enter into wait states & remain idle.
• If ready pin is at logic 1,it has no effect on the operation of MP.
Interrupt request INTR (pin 18):
• INTR is markable interrupt by i/o devices.
• MP will get interrupted only if all interrupt are enabled using ST1 (SET
interrupt flag) instruction.
• All interrupt are disabled using C21(CLEAR interrupt flag) instruction.
• INTR is non vectored interrupt(does not where to branch &to service).
• INTR =1 when IF=1,the MP enters an interrupt acknowledge cycle
Test interrupt (TEST) pin 23:
TEST is an input pin .
• TEST is tested by wait instruction when the MP is operating in maximum
mode.
• If TEST=1, the MP will stay in idle state.
• TEST is made “0” by 8087 coprocessor to indicate that computation is
finished.
• If TEST =0,the wait instruction functions as NOP.
Non maskable interrupt (NMI) pin 17:
• NMI is activated at the time of power failure & RAM parity error.
• When NMI activated by external devices , MP will be interrupts .
Page-10
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
Page-11
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
2. Minimum mode.
• MN / MX =1, MP works in Minimum mode.
• MN / MX =0, MP works in Maximum mode.
Bus High enable BHE / S7 (Pin 34):
• BHE is used to enable the most significant data bits (D15-D8) during read
& write operation.
• S7 is always logic 1.
Physical Memory Organisation:
• The physical memory of 8086 is shown in below figure.
• The number of bits stored in M/L is only 8-bits.
• Every byte stored in M/L has unique address.
• Physical memory is divided into two bank each of 512kb (total physical
memory size is of 1 MB)
• The banks are called lower bank and upper bank.
• The lower bank contain only even addresses like 0,2,4 etc , and D7-D0
data lines connected to it.
• The upper bank contains only odd addresses like 1,3,5 etc & D15-D8 data
lines connected to it .
• In order to select any M/L, the 19-bit address is obtained by A19-A1.
• To select lower bank A0 bit is used.
• To select/enable upper bank BHE pin is used
Page-12
UNIT 1 ARCHITECTURE OF 8086 MICROPROCESSER
•
•
Page-13