Interrupt Handling

Interrupt handling allows asynchronous event service without continuous polling by CPU.

Key formulas & points

Skim these first — then read the full notes below.

  • Maskable INTR versus non-maskable NMI
  • Priority logic selects highest pending IRQ
  • Nested interrupts possible if IF is re-enabled

Topic details

Introduction

Stallings uses interrupts as the bridge between processor and external events. Indian exam answers should describe vector lookup, context save, and return sequence clearly.

Key relations & formulas

IVTpointer=interrupttype×4IVT pointer = interrupt_{type} \times 4
(offset + segment)

Formulas (Indian textbook notation)

  • 8086supports256vectorsinfirst1KB8086 supports 256 vectors in first 1 KB

Formulas (Indian textbook notation)

  • ISRflow:savecontexttoservicetoEOItorestoretoIRETISR flow: save context to service to EOI to restore to IRET

Notation and sign conventions

Relation 1 —
IVTpointer=interrupttype×4IVT pointer = interrupt_{type} \times 4
IVTpointer=interrupttype×4IVT pointer = interrupt_{type} \times 4
(offset + segment)
Write this relation with symbols exactly as in Microprocessor Architecture & Programming — Ramesh Gaonkar before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 2 —
8086supports256vectorsinfirst1KB8086 supports 256 vectors in first 1 KB

Formulas (Indian textbook notation)

  • 8086supports256vectorsinfirst1KB8086 supports 256 vectors in first 1 KB
Write this relation with symbols exactly as in Microprocessor Architecture & Programming — Ramesh Gaonkar before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.
Relation 3 —
ISRflow:savecontexttoservicetoEOItorestoretoIRETISR flow: save context to service to EOI to restore to IRET

Formulas (Indian textbook notation)

  • ISRflow:savecontexttoservicetoEOItorestoretoIRETISR flow: save context to service to EOI to restore to IRET
Write this relation with symbols exactly as in Microprocessor Architecture & Programming — Ramesh Gaonkar before substituting numbers. Examiners award partial marks for a correct setup even when arithmetic slips.

Concept in depth

On interrupt acceptance, CPU stores context and fetches ISR address from vector table. ISR must preserve required registers, service hardware, and signal completion correctly. Priority and masking prevent low-value requests from blocking critical service. Robust design also addresses latency, nesting policy, and reentrancy constraints.

Assumptions and validity limits

State assumptions explicitly before using any relation for interrupt handling — steady state, uniform properties, linear elastic material, ideal gas, incompressible flow, etc., as applicable.
Wrong assumptions invalidate the entire solution even when the formula is correct. In Microprocessors (Hardware) viva and GATE descriptive questions, listing valid assumptions often earns separate marks.

Step-by-step problem approach

1. Read the question and list given data with SI units (common in Microprocessors (Hardware) papers).
2. Draw a neat labelled diagram where applicable — examiners in Indian universities award diagram marks even when arithmetic slips.
3. Identify which relation from this topic applies to interrupt handling.
4. Use equation 1:
IVTpointer=interrupttype×4IVT pointer = interrupt_{type} \times 4
.
5. Use equation 2:
8086supports256vectorsinfirst1KB8086 supports 256 vectors in first 1 KB
.
6. Substitute values, compute, and verify units and sign (direction).
7. State conclusion in one line — e.g. safe/unsafe, stable/unstable, feasible/infeasible.

Applications & exam relevance

Interrupt Handling appears in embedded boards and kits. In Indian computer hardware curricula this topic is tested because it connects theory to MPU architecture and interfacing.
GATE and semester exams often combine interrupt handling with earlier units — revise prerequisites before attempting mixed problems.
Industry interview panels sometimes ask: "Where did you use interrupt handling?" — answer with a lab, mini-project, or plant visit example if possible.

Common mistakes in exams

Students often forget context save/restore in ISR algorithm or misuse IRET/RET. Another issue is confusing software interrupts with hardware IRQ lines in architecture diagrams.

Quick revision checklist

Before attempting interrupt handling problems, confirm you can:
1. Maskable INTR versus non-maskable NMI
2. Priority logic selects highest pending IRQ
3. Nested interrupts possible if IF is re-enabled
Revise the solved examples in Microprocessor Architecture & Programming — Ramesh Gaonkar and one previous-year GATE or university paper for this unit.

Worked examples

Try the problem first — open the solution when you are ready to check.

Interrupt vector address

Problem

Find IVT byte address for interrupt type 3AH in 8086.

Solution

IVT address = type × 4 = 3AH × 4 = E8H. Offset is at 0000:00E8 and segment at 0000:00EA.

Conceptual check — Interrupt Handling

Problem

In a Microprocessors (Hardware) semester or GATE paper you are asked: "State the main assumption, the governing relation, and one practical consequence of interrupt handling." What should a complete answer include?

📖 Standard books (India)

  • Microprocessor Architecture & ProgrammingRamesh Gaonkar

    Read: Syllabus unit

    8085/8086 — widely used in Indian colleges