MPMC Unit 1
MPMC Unit 1
Microprocessor
Overview
First 16- bit processor released by Addressable memory space is
INTEL in the year 1978 organized in to two banks of 512 kb
each; Even (or lower) bank and Odd (or
higher) bank. Address line A0 is used to
Originally HMOS, now manufactured select even bank and control signal
using HMOS III technique is used to access odd bank
3
Pins and signals
8086
Common signals
Microprocessor
Address/Data bus
5
8086
Common signals
Microprocessor
MN/ MX
MINIMUM / MAXIMUM
READY
CLK
9
8086
Minimum mode signals
Microprocessor
11
8086
Maximum mode signals
Microprocessor
12
8086
Maximum mode signals
Microprocessor
13
8086
Maximum mode signals
Microprocessor
14
Architecture
8086
Microprocessor
Architecture
Architecture
Segment
Registers
8086’s 1-megabyte memory The 8086 can directly address four Programs obtain access to code
is divided into segments of segments (256 K bytes within the 1 and data in the segments by
up to 64K bytes each. M byte of memory) at a particular changing the segment register
time. content to point to the desired
segments.
18
8086
Bus Interface Unit (BIU)
Microprocessor
Architecture
Segment Code Segment Register
Registers
16-bit
CS contains the base or start of the current code segment; IP contains the
distance or offset from this address to the next instruction byte to be fetched.
BIU computes the 20-bit physical address by logically shifting the contents of CS
4-bits to the left and then adding the 16-bit contents of IP.
That is, all instructions of a program are relative to the contents of the CS
register multiplied by 16 and then offset is added provided by the IP.
19
8086
Bus Interface Unit (BIU)
Microprocessor
Architecture
Segment Data Segment Register
Registers
16-bit
Points to the current data segment; operands for most instructions are fetched
from this segment.
The 16-bit contents of the Source Index (SI) or Destination Index (DI) or a 16-bit
displacement are used as offset for computing the 20-bit physical address.
20
8086
Bus Interface Unit (BIU)
Microprocessor
Architecture
Segment Stack Segment Register
Registers
16-bit
The 20-bit physical stack address is calculated from the Stack Segment (SS) and
the Stack Pointer (SP) for stack instructions such as PUSH and POP.
In based addressing mode, the 20-bit physical stack address is calculated from
the Stack segment (SS) and the Base Pointer (BP).
21
8086
Bus Interface Unit (BIU)
Microprocessor
Architecture
Segment Extra Segment Register
Registers
16-bit
Points to the extra segment in which data (in excess of 64K pointed to by the
DS) is stored.
String instructions use the ES and DI to determine the 20-bit physical address
for the destination.
22
8086
Bus Interface Unit (BIU)
Microprocessor
Architecture
Segment Instruction Pointer
Registers
16-bit
23
8086
Bus Interface Unit (BIU)
Microprocessor
24
8086
Execution Unit (EU)
Microprocessor
A decoder in the EU
control system
translates instructions.
and
Some of the 16 bit registers can be
Index registers (Source used as two 8 bit registers as :
Index, Destination Index)
each of 16-bits AX can be used as AH and AL
BX can be used as BH and BL
CX can be used as CH and CL 25
DX can be used as DH and DL
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Accumulator Register (AX)
Registers
Consists of two 8-bit registers AL and AH, which can be
combined together and used as a 16-bit register AX.
26
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Base Register (BX)
Registers
Consists of two 8-bit registers BL and BH, which can be
combined together and used as a 16-bit register BX.
27
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Counter Register (CX)
Registers
Consists of two 8-bit registers CL and CH, which can be
combined together and used as a 16-bit register CX.
Example:
28
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Data Register (DX)
Registers
Consists of two 8-bit registers DL and DH, which can be
combined together and used as a 16-bit register DX.
29
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Stack Pointer (SP) and Base Pointer (BP)
Registers
SP and BP are used to access data in the stack segment.
30
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Source Index (SI) and Destination Index (DI)
Registers
Used in indexed addressing.
31
8086
Execution Unit (EU)
Microprocessor
Architecture
EU Source Index (SI) and Destination Index (DI)
Registers
Used in indexed addressing.
32
Memory Address Generation
Offset Value (16 bits)
Adder
33
34
• The following examples shows the CS:IP scheme
of address formation:
CS 34BA IP 8AB4 Code segment
34BA0
Inserting a hexadecimal 0H (0000B)
with the CSR or shifting the CSR 8AB4 (offset)
four binary digits left
3D654
34BA0(CS)+
8AB4(IP)
3 D 6 5 4 (next address)
44B9F
35
8086
Execution Unit (EU)
Microprocessor
Flag Register
Architecture Auxiliary Carry Flag
lowest nibble, i.e, bit three during This flag is set, when there is
addition, or borrow for the lowest a carry out of MSB in case of
nibble, i.e, bit three, during addition or a borrow in case of
subtraction. subtraction.
This flag is set, when the This flag is set, if the result of This flag is set to 1, if the lower
result of any computation the computation or comparison byte of the result contains even
is negative performed by an instruction is number of 1’s ; for odd number
zero of 1’s set to zero.
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
OF DF IF TF SF ZF AF PF CF
Tarp Flag
Over flow Flag If this flag is set, the processor
This flag is set, if an overflow occurs, i.e, if the result of a signed enters the single step execution
operation is large enough to accommodate in a destination
mode by generating internal
register. The result is of more than 7-bits in size in case of 8-bit
signed operation and more than 15-bits in size in case of 16-bit interrupts after the execution of
sign operations, then the overflow will be set. each instruction
8086 registers
categorized 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
into 4 groups OF DF IF TF SF ZF AF PF CF
AX 16-bit Accumulator Stores the 16-bit results of arithmetic and logic operations
AL 8-bit Accumulator Stores the 8-bit results of arithmetic and logic operations
BX Base register Used to hold base value in base addressing mode to access memory
data
CX Count Register Used to hold the count value in SHIFT, ROTATE and LOOP instructions
DX Data Register Used to hold data for multiplication and division operations
SP Stack Pointer Used to hold the offset address of top stack memory
BP Base Pointer Used to hold the base value in base addressing using SS register to
access data from stack memory
SI Source Index Used to hold index value of source operand (data) for string
instructions
DI Data Index Used to hold the index value of destination operand (data) for string
operations
38
8086
Microprocessor
Memory
Processor Memory
Registers inside a microcomputer
Store data and results temporarily
No speed disparity
Cost
Secondary Memory
Storage media comprising of slow devices such as
magnetic tapes and disks
Hold large data files and programs: Operating
system, compilers, databases, permanent
programs etc.
39
8086
Microprocessor
8086 : 16-bit
Bank 1 : = 0 Odd
addressed memory bank
40
8086
Microprocessor
4 Read/ Write word at an odd address 0 1 D15 – D0 in first operation byte from
odd bank is transferred
1 0 D7 – D0 in first operation byte from
odd bank is transferred
41