- 2068 Bhadra · 2+6 marks
Interrupt vs polling; interrupts in 8085
Short answer
Polling wastes CPU time by repeatedly checking devices; interrupts let devices signal the CPU. In the 8085, after finishing the current instruction, it pushes PC, loads the vector address (e.g., 003CH for RST 7.5), and executes the ISR ending with EI and RET.
How is interrupt processing different than polling? Explain how interrupt processing is done with 8085.
Interrupt vs polling
In polling the processor repeatedly reads the status of each I/O device in a loop to see which one needs service. In interrupt processing the device itself signals the processor when it needs service, and the processor meanwhile does other work.
| Basis | Polling | Interrupt |
|---|---|---|
| Who starts the transfer | The CPU checks the device | The device requests the CPU |
| CPU time | Wasted in the status loop (busy waiting) | Used for useful work until an interrupt comes |
| Response time | Depends on the loop; may be slow | Fast (after current instruction) |
| Hardware | Simple, no extra hardware | Needs interrupt pins/controller |
| Priority | Fixed by order of checking | Set by hardware priority |
| Suitable for | Few devices, simple systems | Real-time, many devices |
Interrupt processing in the 8085
The 8085 has TRAP, RST 7.5, RST 6.5, RST 5.5 (vectored) and INTR (non-vectored), with INTA' as the acknowledge output.
- The main program enables interrupts with EI (and SIM if RST 5.5/6.5/7.5 masks need to be set). TRAP is always enabled.
- A device raises a request on one of the pins.
- The 8085 finishes the current instruction and checks the pins (priority: TRAP > RST 7.5 > 6.5 > 5.5 > INTR).
- If the interrupt is accepted, the interrupt enable flip-flop is reset, so no other maskable interrupt is accepted.
- The PC (return address) is pushed on the stack.
- For INTR, the 8085 sends INTA'; the device places an RST n opcode (or CALL) on the data bus. For the others the PC is loaded with a fixed address: TRAP 0024H, RST 7.5 003CH, RST 6.5 0034H, RST 5.5 002CH.
- The interrupt service routine runs. It saves registers with PUSH, services the device, restores the registers with POP, and executes EI and then RET.
- RET pops the PC and the main program continues.
Main program ---- interrupt arrives
| finish instruction, push PC
v
Vector (e.g. 003CH) -> JMP ISR
| ISR: PUSH, service, POP, EI, RET
v
Pop PC -> back to main program
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Software interrupts of 8085 · Microprocessor, chapter 5
- Interrupt pins of 8085 · Microprocessor, chapter 5
- 8085 ALP: transfer data with more than 3 ones · Microprocessor, chapter 2
- Interrupt processing in 8086 · Microprocessor, chapter 5 · asked 3×
- Maskable vs non-maskable interrupts · Microprocessor, chapter 5 · asked 2×
- Hardware vs software interrupts · Microprocessor, chapter 5
- Interrupt processing steps · Embedded System, chapter 5
- Programmed vs interrupt-driven vs DMA · Computer Organization and Architecture, chapter 7 · asked 5×
- DMA vs programmed and interrupt-driven I/O · Computer Organization and Architecture, chapter 7 · asked 3×
- Interpret: computers and word processing · Communication English, chapter 1