Professional Documents
Culture Documents
MICROPROCESSOR ARCHITECTURE
& INTERFACING : INTEL x86
• Backward compatible with 8085
• Memory interfacing technique is similar, though memory
addressing is different
• 40-pin DIP, 5V supply
• 29,000 transistors
• 20 bit address to access memory
• (memory space = 220 = 1MB)
• “General Purpose” & “Special Purpose”
• 16 bit registers
• GP Registers:
– Can be used as 8 bit or 16 bit
– Used for holding data, variables, and intermediate results
temporarily
• SP Registers:
– Used as segment registers, pointers, index registers or as
offset storage registers for some addressing modes
• General data registers
• Segment registers
• Pointers & index registers
• Flag registers
• X, H, L ?
• AX - Accumulator
• CX – Default counter in string and
loop operations
• BX – Offset storage for forming
physical address
• DX – Implicit operand/ destination in
few instructions
• 8086 addresses segmented memory
• Total 1MB is divided into 16 logical segments;
each segment having 64KB memory
• 4 segment registers
• CS – used for addressing a memory location in
the code segment of the memory
• DS – points to the data segment of the
memory
• ES – Another data segment used along with
DS
• SS – used to address stack segment, memory
to store stack data, main operations are Push
& Pop
• While addressing any location in the memory bank, address is
calculated from two parts:
– Segment address
– Offset
• SR contains the 16-bit segment base address, related to different
segments
• Any of the pointers/index registers/ BX may contain the offset of the
location to be addressed
• This scheme is advantageous, as address bits are 20 and machine
operates at 16 bits.
• Pointers contain offsets within the particular segments
• Instruction Pointer (IP):
The instruction pointer usually stores the address of the next
instruction that is to be executed.
• Base Pointer (BP):
The Base pointer stores the base address of the memory.
Also, it acts as an offset for Stack Segment (SS).
• Stack Pointer (SP):
The Stack Pointer Points at the current top value of the
Stack. Like the BP, it also acts as an offset to the Stack
Segment (SS).
• Source Index (SI):
It stores the offset address of the source.
• Destination Index (DI):
It stores the offset address of the Destination.
• The Flag or Status register is a 16-bit register which contains 9
flags, and the remaining 7 bits are idle in this register.
• These flags tell about the status of the processor after any
arithmetic or logical operation. IF the flag value is 1, the flag is
set, and if it is 0, it is said to be reset.
• Indicates the results of computations in the ALU.
• Also contains some flag bits to control CPU operations.
• Supports 16-bit ALU, set of 16-bit registers
• 8086 is a 16-bit Integer processor in a 40 pin, Dual Inline Packaged
IC
• 8086 provides the programmer with 14 internal registers, each 16 bits
or 2 Bytes wide.
• To increase execution speed and fetching speed, 8086 segments the
memory.
• It’s 20 bit address bus can address 1MB of memory.
• 8086 works only with four 64KB segments within the whole 1MB
memory.
• Powerful interrupt structure
• Fetched instruction queue
BIU
Contains circuit for physical address
calculation and a precoding instruction
byte queue. It makes the system’s bus
signals available for external interfacing
of devices
Condition Flags
Control Flags
Execution Unit (EU)
This flag is set, when the result This flag is set, if the result of the This flag is set to 1, if the lower byte of
of any computation is negative computation or comparison performed the result contains even number of 1’s
by an instruction is zero ; for odd number 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
Trap Flag
Over flow Flag If this flag is set, the processor enters
This flag is set, if an overflow occurs, i.e, if the result of a signed operation is
the single step execution mode by
large enough to accommodate in a destination register. The result is of more
than 7-bits in size in case of 8-bit signed operation and more than 15-bits in
generating internal interrupts after
size in case of 16-bit sign operations, then the overflow will be set. the execution of each instruction