Professional Documents
Culture Documents
AD15-AD0:
These are the time multiplexed memory I/O address and
data lines.
Here T1, T2, T3, T4 and TW are the clock states of a machine
cycle. TW is a wait state.
During T1, these are the most significant address lines or memory operations.
The status of the interrupt enable flag bit(displayed on S5) is updated at the
beginning of each clock cycle.
These lines float to tri-state off (tristated) during the local bus hold aknowledge
Pin Description
signals having common functions in minimum as well as maximum mode.
The address bits are separated from the status bits using latches
controlled by the ALE signal.
The bus high enable signal is used to indicate the transfer of data over the
higher order (D15-D8) data bus as shown in Table .
It goes low for the data transfers over D15-D8 and is used to derive chip selects
of odd address memory bank or peripherals.
BHE is low during T1 for read, write and interrupt acknowledge cycles, when-
ever a byte is to be transferred on the higher byte of the data bus.
It is low during T1 for the first pulse of the interrupt acknowledge cycle.
Pin Description
signals having common functions in minimum as well as maximum mode.
RD is active low and shows the state for T2,T3, TW of any read cycle.
READY:
This is the acknowledgement from the slow devices or memory that they have
completed the data transfer. The signal is active high.
The signal made available by the devices is synchronized by the 8284A clock
generator to provide ready input to the 8086.
Pin Description
signals having common functions in minimum as well as maximum mode.
INTR-lnterrupt Request:
TEST:
If the TEST input goes low, execution will continue, else, the
processor remains in an idle state.
NMI-Non-maskable Interrupt:
RESET:
The signal is active high and must be active for at least four clock
cycles.
VCC :
+5V power supply for the operation of the internal circuit.
GND:
Ground for the internal circuit.
Pin Description
signals having common functions in minimum as well as maximum mode.
MN/MX :
This line becomes active in the previous T4 and remains active till
final T4 of the current cycle.
When it goes low, it means that the processor has accepted the
interrupt Request.
DT /R -Data Transmit/Receive:
This output is used to decide the direction of data flow
through the transreceivers (bidirectional buffers). When the
processor sends out data, this signal is high and when the
processor is receiving data, this signal is low.
Pin Description
The following pin functions are for the minimum mode operation of 8086.
DEN-Data Enable:
At the same time it releases the system bus for use by master.
Pin Description
The following pin functions are for the minimum mode operation of 8086.
2. The current cycle is not operating over the lower byte of a word (or operating
on an odd address).
2. During T4 (current) or T1 (next) clock cycle, 8086 sends a active low grant
pulse to the requesting master.
This indicates that the 8086 has allowed the local bus to float and that it will be
used by another master.
The CPU's bus interface unit is likely to be disconnected from the local bus of
the system.
3. A one clock wide pulse from the another master indicates to 8086 that the 'hold‘
request is about to end and the 8086 may regain control of the local bus at the
next clock cycle.
8086 Internal Architecture
8086 Architecture Description
Functions of BIU
fetches instructions and place them in Instruction Queue.
Reads and Writes data from / to memory / I/O.
Computes the 20-bit address.
The BIU stores these prefetched bytes in first-in-first-out register set called a
queue.
When the EU is ready for its next instruction it simply reads the instruction
byte(s) for the instruction from the queue in the BIU.
This is much faster than sending out an address to the system memory
and waiting for memory to send back the next instruction byte or bytes.
Except in the case of JMP and CALL instructions, where the queue must be
dumped and then reloaded starting from a new address, this prefetch-and-
queue scheme greatly speeds up processing.
Fetching the next instruction while the current instruction executes is called
pipelining.
Instruction Queue
What is Pipelining ?
Advantages of Pipelining
Why is the 8086 Queue only 6 Bytes
long ?
Execution Unit (EU)
The execution unit contains :
General purpose registers
Segment Registers
Pointer and Index registers
Arithmetic and Logic Unit
Control Unit
Flags Register
EU registers AX AH AL Accumulator
BX BH BL Base Register
CX CH CL Count Register
DX DH DL Data Register
SP Stack Pointer
BP Base Pointer
SI Source Index Register
DI Destination Index Register
FLAGS FLAGS Register
Register organization of 8086
Can be divided into four categories :
AL in this case contains the low-order byte of the word, and AH contains the
high-order byte.
Accumulator can be used for I/O operations, rotate and string manipulation.
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.
DX Register:
Data register can be used as a port number in I/O operations and implicit
operand or destination in case of few instructions.
In integer 32-bit multiply and divide instruction the DX register contains high-
order word of the initial or resulting number.
Segment Registers
There are 4 segment registers :
Code Segment (CS ) Register
Data Segment (DS ) Register
Stack Segment (SS ) Register
Extra Segment (ES ) Register
Since one memory location can store 1 Byte , the memory capacity of
8086 is 1MByte.
Ex. if lower byte is stored at 03410 H , the higher Byte will be stored at 03411 H.
Storing a word in two consecutive memory locations
BUT , With this scheme , two machines cycles will be required to read
or write a data word (16-bits) in memory.
Memory Bank System in 8086
There are 4 possible ways to access data from memory in 8086 processor :
– Problem:
– But 20 bit addresses are TOO BIG to fit in 16 bit
registers ?
– Solution:
– Memory Segmentation
– In segmented memory architecture the available memory space is
divided into “chuncks” called as segments.
– In 8086 there are four types of segments CS , SS , DS , ES
Memory Segmentation in 8086
– Rules of Memory Segmentation :
• In a minimum system all four segments can start with an address 00000H
Addressing a location in segmented memory
The complete physical address of a memory location is stored
in two different places –
1 MB Memory
logical segments.
5FFFF H Top of SS
The complete 64 K SS
1Mbyte memory SS Base
segmentation is as
50000 H SS = 5000 H
shown in fig .
4489F H
Top of CS
Each segment
contains 64Kbyte
64 K CS
CS Base
of memory. 348A0 H
CS = 348A H
Facilitate the use of separate memory areas for the program, its
data and the stack.
The CS register is automatically updated during far jump, far call and far
return instructions.
8086 has 9 active flags and they are divided into two categories:
2. Control Flags. : 3
Flag Registers
Carry flag
Overflow
Direction Parity flag
Trap Zero
6 are status flags
3 are control flag
Sign
Flag Register Description
Carry Flag (CY):
This flag indicates an overflow condition for unsigned integer arithmetic. It is
also used in multiple-precision arithmetic.
In 8-bit signed numbers the MSB represents the sign while remaining 7-bits are
used to represent magnitude (0 – 127 ).