Unit 3
Unit 3
Group Activity
It was one of the first processors in the x86 family, forming the basis for modern computer architecture.
Supports:
● Multiprogramming
● Assembly-level programming
Piyush kumar
Pin Diagram
Pins
AD0–AD15 (Address/Data Bus) BHE’/S7 (Bus High Enable / Status):
● Multiplexed lines for lower-order address and ● BHE’ (active low) enables D8–D15 (upper data
data. bus).
● Useful for connecting 8-bit devices to upper byte.
● Act as A0–A15 during address phase (T1). ● Multiplexed with status line S7 (valid during T2–
T4).
● Act as D0–D15 during data phase (T2–T4). ● BHE’ is active (low) during T1.
A16–A19 (High-Order Address Bus):
RD’ (Read Control Signal):
● Carry high-order address bits.
● Active low output signal.
● Multiplexed with status signals:
● Indicates a read operation from memory or I/O.
○ A16/S3, A17/S4, A18/S5, A19/S6
Pins
READY:
NMI (Non-Maskable Interrupt):
● Acknowledgement signal from memory or ● Edge-triggered input.
slow I/O devices. ● Generates a Type 2 interrupt.
● Indicates completion of data transfer.
● Cannot be masked or disabled by
● Active High (1).
software.
● When low, the processor inserts wait states
until READY = 1.
Vcc:
● Power supply input: +5V DC.
GND:
● Ground reference.
Architecture of 8086 Microprocessor
1. Bus Interface Unit (BIU) 2. Execution Unit (EU)
○ Fetches instructions from memory ○ Executes instructions decoded from the queue
○ Performs arithmetic and logical operations
○ Performs address calculation ○ Controls flags and registers
Handles communication with ○ Includes:
memory and I/O ■ ALU (Arithmetic Logic Unit)
○ Includes: ■ General Purpose Registers (AX, BX,
■ Segment Registers (CS, DS, CX, DX)
■ Control Flags and Condition Flags
SS, ES)
■ Instruction Pointer (IP)
■ Instruction Queue (6 bytes for
prefetching)
Jasmeet
Architecture of 8086 Microprocessor
Interrupt
An interrupt is a mechanism that temporarily halts the normal execution of a program to handle an urgent event. Once the
interrupt is serviced, the microprocessor resumes execution from where it was interrupted.
Saving Processor
State
Identifying the
Interrupt Type
Jump to Interrupt
Service Routine
Execution of ISR
Resuming
VINIT SHEETAL Execution
Types of Interrupts
sdf
Here are diagrammatic chart : -
1. Efficient CPU Utilization: Instead of continuously checking for input/output (polling), interrupts
allow the CPU to execute other tasks and respond only when required.
2. Multitasking: Allows execution of multiple tasks simultaneously, such as handling user input while
processing data.
3. Real-time Event Handling: Critical for real-time systems like industrial automation and embedded
devices.
4. Error Handling: Detects and responds to hardware failures and software errors.
5. I/O Operations: Enables faster communication with peripheral devices (disk drives, printers, etc.).
Interrupt Vector Table (IVT)
Types of Registers:
- General-purpose registers
- Special-purpose registers
- Segment registers
- Pointer and index registers
SAMARTH
1. General purpose register
•There are four 16 bit general purpose registers, i.e. AX, BX, CX, and
DX. These are used to store 16- bit data. They can also be used to
store 8 bit data and they are referred to AH, AL, BH, BL, CH, CL,
DH, and DL.
• AX register: It is also known as accumulator register. It is used to
store one of the operands for arithmetic operations.
• BX register: It is used as a base register. It is used to store the
starting base address of the memory area within the data segment.
• CX register: It is referred to as counter. It is used in loop instruction
to store the loop counter.
• DX register: This register is used to hold I/O port address for I/O
instruction.
2. Stack & base pointer register
SP - stack pointer
–It is 16-bit register.
–Always points to top item on the stack.
–Offset address relative to SS.
–An empty stack will had SP = FFFEh.
BP - base pointer
–It is 16-bit register.
–Primarily used to access parameters passed via the stack.
–Offset address relative to SS.
3. Source & Destination index register
- IP (Instruction Pointer): Holds the offset address of the next instruction to execute.
- FLAGS Register: Reflects the status of the processor (Zero, Carry, Sign, Overflow,
etc.)
Introduction to Flags
Types of Flags
● CF (Carry Flag) :
Set when there is a carry/borrow in arithmetic ops.
● PF (Parity Flag):
Set if the result has even number of 1s.
● ZF (Zero Flag):
Set if result of operation is zero.
● SF (Sign Flag):
Reflects the sign of result (MSB).
● OF (Overflow Flag)
Set if signed overflow occurs.
2. Control Flag
ANSHU
Immediate Addressing
AMAN
Types of Memory
DEPINDER KUMAR
Sample Program – Print Character
.model small
.stack 100h
.data
msg db 'A'
.code
main:
mov ax, @data ; initialize DS
mov ds, ax
end main
THANK YOU