🎓 BookMCQ
← Back to 7. Interrupt Instructions of 8085

📝 The Interrupts in 8085 Microprocessor (12 MCQs)

Five Hardware Interrupt Inputs and Their Priority

The Intel 8085 supports five hardware interrupt inputs that allow external devices to request processor attention. They are TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. Their fixed priority order is TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR, enabling the processor to select the highest-priority eligible request.

Triggering Characteristics of Individual Interrupts

TRAP is both edge and level sensitive and is non-maskable. RST 7.5 is positive-edge triggered and internally latched. RST 6.5 and RST 5.5 are level-sensitive, as is INTR. The distinction affects how long an external device must maintain its interrupt request to ensure reliable recognition.

Fixed Vectors and External Interrupt Acknowledgement

TRAP branches to 0024H, RST 7.5 to 003CH, RST 6.5 to 0034H and RST 5.5 to 002CH. INTR has no fixed vector because the external device supplies an instruction after INTA becomes active. The processor saves the return address on the stack before transferring control.

Example of a Higher-Priority Interrupt Request

Suppose RST 5.5 and RST 7.5 requests are simultaneously pending and both are enabled. RST 7.5 receives priority because it ranks higher. The processor services it first and transfers control to 003CH. RST 5.5 can be serviced later when the appropriate interrupt conditions permit its recognition.

Interrupt Enabling, Masking and Service Completion

EI globally enables maskable interrupts, while DI disables them. SIM controls individual masks for RST 7.5, RST 6.5 and RST 5.5, and RIM reads their mask and pending status. Interrupt service routines handle device events and commonly use RET to restore the interrupted program's execution address.

Misconceptions About Hardware Interrupt Priority

'RST 5.5 has higher priority than RST 7.5' reverses the priority order. 'TRAP can be disabled using DI' is incorrect because it is non-maskable. 'INTR has a fixed vector address like RST 7.5' is incorrect because the external device supplies an instruction during acknowledgement.

Interrupt Priority, Vector and Triggering Examination Questions

Memorize the five interrupt names, priority sequence and four fixed vector addresses. Distinguish positive-edge-triggered RST 7.5 from the level-sensitive RST 6.5 and RST 5.5. Understand TRAP's non-maskable behavior and INTR's external acknowledgement, and practise tracing interrupt acceptance and return operations.

Hardware Interrupt and Vector Terminology

  • TRAP - Highest-priority non-maskable interrupt.
  • RST 7.5 - Edge-triggered vectored interrupt.
  • RST 6.5 - Level-sensitive vectored interrupt.
  • RST 5.5 - Lower-priority vectored interrupt.
  • INTR - Maskable non-vectored interrupt.
  • INTA - Acknowledges an accepted INTR request.
2
Easy
6
Medium
4
Hard

📝 All The Interrupts in 8085 Microprocessor MCQs

Q1. Which flip‑flop is cleared automatically when any interrupt is accepted by the 8085?

A.Interrupt Enable (IE) flip‑flop ✅
B.TRAP flip‑flop
C.RFS flip‑flop
D.SOD flip‑flop
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: When the 8085 accepts an interrupt, it automatically clears the Interrupt Enable (IE) flip‑flop to prevent further interrupts until the program re‑enables them with EI. The other flip‑flops listed are either unrelated to interrupt handling or remain unchanged. Clearing IE ensures the current interrupt service routine can execute without being pre‑empted, which is essential for reliable operation.

Q2. Why does the RST7.5 interrupt have higher priority than RST6.5 in the 8085?

A.Its vector address is lower
B.It is hard‑wired to a higher priority line ✅
C.It uses a larger opcode
D.It disables other interrupts
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: RST7.5 is wired to a higher‑priority interrupt line than RST6.5, so when both lines are active the hardware selects RST7.5 first. The vector address or opcode size does not affect priority, and RST7.5 does not automatically disable other interrupts; the priority is purely a hardware wiring feature.

Q3. A microcontroller must toggle an LED each time a push‑button is pressed. Which interrupt type is most suitable for this task?

A.INTR (non‑vectored)
B.RST5.5
C.RST6.5
D.RST5.5 (vectored) ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: A push‑button typically generates a single, predictable interrupt request. Using the vectored RST5.5 line gives a known address for the service routine, simplifying the design. INTR would require the external device to supply the address, adding complexity. RST6.5 is also vectored but has lower priority than RST5.5, making RST5.5 the better choice for a dedicated LED toggle.

Q4. In the code below, EI is executed and a peripheral raises an INTR request. Which address will the program counter receive when the interrupt is serviced?

A.The address supplied by the external device ✅
B.0x003C (RST7.5 vector)
C.0x0028 (RST5.5 vector)
D.0x0000 (reset vector)
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: INTR is a non‑vectored interrupt; the 8085 expects the external device to place the desired address on the data bus during the acknowledge cycle. Therefore the PC is loaded with whatever address the peripheral provides, not with any fixed vector such as those used for RST7.5 or RST5.5. The reset vector is unrelated to normal interrupt handling.

Q5. How does the 8085 determine that a maskable interrupt is pending?

A.By checking the status of the IE flip‑flop and the corresponding interrupt line ✅
B.By polling the interrupt vector table
C.By executing a special interrupt instruction
D.By reading the status register
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A maskable interrupt is recognized only when the Interrupt Enable (IE) flip‑flop is set (by executing EI) and the specific external interrupt line (e.g., RST7.5, RST6.5, RST5.5) is asserted low. The CPU does not poll a vector table or execute a dedicated instruction; it continuously monitors these hardware signals during each instruction cycle.

Q6. After executing EI, an RST6.5 interrupt occurs. Which register pair is used by the CPU to store the return address?

A.BC
B.DE
C.HL
D.SP ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: When an interrupt is accepted, the 8085 automatically pushes the current program counter onto the stack, which is addressed by the Stack Pointer (SP). The return address is stored at the memory locations pointed to by SP, and SP is then decremented. The other register pairs are not involved in this automatic stack operation.

Q7. What is the effect of executing DI inside an interrupt service routine?

A.It disables further interrupts ✅
B.It enables further interrupts
C.It clears the interrupt flag
D.It resets the program counter
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: DI clears the Interrupt Enable (IE) flip‑flop, preventing any new maskable interrupts from being recognized until EI is executed again. This is useful inside an ISR to avoid nesting of interrupts. DI does not enable interrupts, clear flags, or alter the program counter; its sole purpose is to control the acceptance of subsequent interrupt requests.

Q8. Why is the TRAP interrupt considered non‑maskable?

A.It cannot be disabled by DI ✅
B.It shares the same vector as RST7.5
C.It uses a special opcode
D.It is generated only by software
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: TRAP is hard‑wired to the highest priority level and the IE flip‑flop does not affect its recognition. Executing DI has no effect on TRAP, making it non‑maskable. The other statements are incorrect: TRAP has its own fixed vector (0x0024), does not share a vector with RST7.5, and is typically generated by external hardware, not software.

Q9. Design an ISR that computes the 2’s complement of a byte stored at address 0x2101 and places the result at 0x2201. Which sequence correctly implements this within the ISR?

A.CMA; ADI 0x01; STA 0x2201 ✅
B.CMA; ADD B; STA 0x2201
C.CMA; ADI 0x01; MOV M, A; INX H; STA 0x2201
D.CMA; ADI 0x01; STAX D; RET
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: To obtain the 2’s complement, the byte must first be complemented (CMA) and then incremented by one (ADI 0x01). The result should be stored at the destination address using STAX D, where D‑E points to 0x2201. Option A follows this exact sequence, while the other options either omit the increment, use the wrong register, or alter the address incorrectly.

Q10. How does interrupt priority interact with the stack when a higher‑priority interrupt occurs while a lower‑priority ISR is executing?

A.The higher‑priority ISR is executed after the lower‑priority ISR returns
B.The higher‑priority ISR pre‑empts and pushes its return address onto the stack ✅
C.The stack is ignored and the CPU jumps directly
D.Both ISRs share the same stack frame
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: If a higher‑priority interrupt arrives during the execution of a lower‑priority ISR, the CPU saves the current PC on the stack (using SP) and then transfers control to the higher‑priority ISR. After the higher‑priority ISR finishes, the return address is popped, and execution resumes in the lower‑priority ISR. The stack is therefore used for each nested interrupt, preserving separate return addresses.

Q11. Given that the interrupt vector for RST5.5 is 0x0028, what address will the PC be loaded with when this interrupt is accepted?

A.40 ✅
B.44
C.48
D.28
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: RST5.5 is a vectored interrupt whose vector address is calculated as the interrupt number multiplied by 8. For RST5.5, the number is 5, giving 5 × 8 = 0x28. Therefore, when the CPU acknowledges RST5.5, it automatically loads the program counter with 0x0028. The other addresses correspond to different vectors or are unrelated.

Q12. A system uses both INTR (non‑vectored) and RST7.5 (vectored) interrupts. If INTR is enabled and both devices assert their interrupt lines simultaneously, which interrupt will be serviced first?

A.INTR because it is non‑vectored
B.RST7.5 because it has higher priority ✅
C.Both are serviced together
D.The CPU will ignore both
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The 8085 hardware assigns a fixed priority order to its interrupt lines, with RST7.5 being higher than INTR. When both lines are active, the processor evaluates the priority hierarchy and selects the highest‑priority request, which in this case is RST7.5. The fact that INTR is non‑vectored does not give it precedence over a higher‑priority vectored interrupt.

🔗 Related Topics (MCQs)