šŸŽ“ BookMCQ
← Back to 5. The 8085 Microprocessor

šŸ“ Interrupt Control of 8085 Microprocessor (8 MCQs)

Interrupt System and Processor Response Mechanism

The 8085 interrupt control system allows external or internal program requests to redirect normal instruction execution to a service routine. It provides five hardware interrupt inputs: TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. These inputs differ in priority, masking and triggering characteristics, allowing important events to receive processor attention without continuous software polling.

Priority and Triggering Characteristics of Hardware Interrupts

TRAP has the highest priority and is non-maskable, responding to both an edge and a maintained high level. RST 7.5 is maskable and positive-edge triggered with latching. RST 6.5 and RST 5.5 are maskable and level-sensitive. INTR is maskable, level-sensitive and has the lowest priority.

Interrupt Vectors and Masking Control

The vectored interrupts use fixed locations: TRAP at 0024H, RST 7.5 at 003CH, RST 6.5 at 0034H and RST 5.5 at 002CH. INTR does not have a fixed vector; the external device supplies an instruction during interrupt acknowledgement. EI enables maskable interrupts, DI disables them, and SIM and RIM support individual masking and status operations.

Sequence of Interrupt Recognition and Servicing

The processor normally completes its current instruction before accepting an eligible interrupt. It saves the return address on the stack, disables further maskable interrupt recognition as appropriate and transfers control to the interrupt service routine. The routine handles the event and uses RET to resume the interrupted program from its saved address.

Interrupt Control in Real-Time Input and Event Handling

Interrupts allow the processor to respond to external events such as device requests without repeatedly checking their status. Higher-priority requests receive attention before lower-priority maskable requests. TRAP supports critical events, while RST inputs provide convenient vectored service locations. INTR supports devices requiring an externally supplied instruction to determine the service address.

Misconceptions About Interrupt Priority and Triggering

'INTR has the highest priority' is incorrect because it has the lowest priority. 'All RST inputs are edge-triggered' overlooks the level-sensitive behavior of RST 6.5 and RST 5.5. 'DI disables TRAP' is incorrect because TRAP is non-maskable and cannot be disabled through the normal interrupt-enable instruction.

Interrupt Priority, Vector and Masking Examination Questions

Memorize the priority order TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR, together with the four fixed vector addresses. Distinguish edge-triggered and level-sensitive inputs, identify maskable requests and explain EI, DI, SIM and RIM. Practise tracing interrupt acknowledgement, stack operations and RET.

Interrupt Input and Servicing Terminology

  • TRAP - Highest-priority non-maskable interrupt.
  • RST 7.5 - Maskable, positive-edge-triggered interrupt.
  • RST 6.5 - Maskable, level-sensitive interrupt.
  • RST 5.5 - Lower-priority level-sensitive interrupt.
  • INTR - Maskable, non-vectored interrupt.
  • ISR - Interrupt service routine.
2
Easy
4
Medium
2
Hard

šŸ“ All Interrupt Control of 8085 Microprocessor MCQs

Q1. What does the Interrupt Enable (IE) flag control in a microprocessor?

A.It determines the priority level of interrupts
B.It allows the CPU to recognize maskable interrupt requests āœ…
C.It stores the address of the currently executing interrupt service routine
D.It resets the program counter after an interrupt
šŸ’” Difficulty: easy | āœ… Correct: B

šŸ“– Explanation: The IE flag, when set to 1, tells the processor that it may accept maskable interrupt requests. Option B matches this definition, so it is correct. Option A describes priority logic, which is handled by a separate priority encoder, not the IE flag. Option C confuses the flag with the program counter or stack pointer that hold the ISR address. Option D is unrelated because the program counter is automatically saved and restored by the interrupt mechanism. Understanding the IE flag helps designers decide when the system can safely respond to external events.

Q2. Why does a microprocessor use a priority encoder to rank multiple interrupt sources?

A.To reduce power consumption by disabling lower‑priority lines
B.To ensure the highest‑priority interrupt is serviced first
C.To increase the speed of data bus transfers āœ…
D.To simplify the instruction set architecture
šŸ’” Difficulty: medium | āœ… Correct: C

šŸ“– Explanation: A priority encoder examines all pending interrupt lines and generates a code for the highest‑priority request, guaranteeing that the most critical event is handled before less important ones. This matches option C, making it correct. Option A is wrong because the encoder’s purpose is not power reduction. Option B describes the outcome but not the mechanism; the encoder itself does not ensure service—it merely selects. Option D is unrelated to interrupt ranking. Knowing this helps engineers design predictable real‑time responses.

Q3. In a system with two external interrupts INT0 (high priority) and INT1 (low priority), what occurs if both signals become active at the same instant?

A.INT0 is serviced first, and INT1 is delayed until INT0’s ISR finishes āœ…
B.Both interrupts are serviced simultaneously in parallel
C.INT1 is serviced first because it arrives later in the instruction stream
D.The processor ignores both interrupts until they are re‑asserted
šŸ’” Difficulty: medium | āœ… Correct: A

šŸ“– Explanation: When two interrupt lines are asserted together, the priority logic selects the higher‑priority line—INT0 in this case—and the CPU begins executing its ISR. Only after that ISR completes (or is explicitly interrupted) will the lower‑priority INT1 be considered. Therefore option A is correct. Option B is impossible because a single‑core CPU cannot handle two ISRs at once. Option C reverses the priority rule. Option D is false because the processor does not discard pending interrupts; it queues the lower‑priority request. This scenario mirrors real‑world designs where critical safety signals must pre‑empt less urgent ones.

Q4. How does the interrupt vector table in a SAP‑III‑like processor determine where an interrupt service routine (ISR) begins execution?

A.It stores a fixed address for each interrupt type, and the CPU jumps to that address when the interrupt occurs
B.It contains a list of sub‑routines that the programmer can call at any time
C.It dynamically calculates the ISR address based on the current program counter value
D.It uses the contents of the accumulator to select the ISR location āœ…
šŸ’” Difficulty: hard | āœ… Correct: D

šŸ“– Explanation: The vector table holds predefined addresses—often in low memory—so that when an interrupt is recognized the CPU fetches the corresponding address and branches directly to the ISR. This fixed‑address approach is described in option D and is correct. Option A incorrectly claims the table stores a single fixed address for all interrupts, ignoring the need for separate vectors. Option B confuses the vector table with a sub‑routine library. Option C suggests a dynamic calculation, which is not how hardware vectors operate. Engineers rely on this mechanism to achieve deterministic response times in embedded systems.

Q5. A program disables interrupts, runs a critical section, then re‑enables them. What risk remains if an interrupt occurs while interrupts are disabled?

A.The interrupt will be lost forever and never serviced
B.The pending interrupt may cause the ISR to execute with stale data, leading to inconsistent system state āœ…
C.The CPU will automatically restart the critical section, causing an infinite loop
D.The disabled state will corrupt the stack pointer, crashing the system
šŸ’” Difficulty: hard | āœ… Correct: B

šŸ“– Explanation: While interrupts are disabled, any incoming request is typically latched and held pending. When re‑enabled, the CPU resumes normal operation and may immediately service the pending interrupt. If the critical section was not designed to be re‑entrant, the ISR could interfere with shared resources, producing the inconsistency described in option B, which is the correct answer. Option A is false because most designs preserve the request. Option C misstates behavior; the CPU does not restart user code. Option D is unrelated to the interrupt enable flag. Understanding this helps developers protect shared data with proper synchronization techniques.

Q6. If an interrupt service routine (ISR) forgets to clear its interrupt flag before returning, what is the most likely outcome?

A.The ISR will be called repeatedly, causing an interrupt storm
B.The CPU will ignore all future interrupts of that type āœ…
C.The program counter will jump to a random memory location
D.The stack pointer will overflow and corrupt memory
šŸ’” Difficulty: medium | āœ… Correct: B

šŸ“– Explanation: Most microcontrollers require the ISR to clear the source flag to acknowledge the interrupt. If the flag remains set, the interrupt controller will consider the request still pending and may either repeatedly invoke the ISR or, depending on the design, block further interrupts of that type. Option B captures the typical blocking behavior, making it correct. Option A describes a storm, which can happen on some architectures but is less common when the flag is not cleared. Option C and D are unrelated to flag handling. This knowledge is vital for reliable firmware where missed acknowledgments can stall critical functionality.

Q7. How does a CPU differentiate between maskable and non‑maskable interrupts?

A.Maskable interrupts are assigned higher priority numbers than non‑maskable ones āœ…
B.Non‑maskable interrupts bypass the interrupt enable flag, while maskable ones respect it
C.Both types use the same hardware line but are distinguished by software conventions
D.Maskable interrupts are generated only by internal peripherals, whereas non‑maskable ones come from external sources
šŸ’” Difficulty: medium | āœ… Correct: A

šŸ“– Explanation: Non‑maskable interrupts (NMIs) are designed to be recognized regardless of the state of the interrupt enable flag, ensuring that critical events cannot be ignored. Maskable interrupts, however, are subject to the IE flag and can be disabled. This distinction is correctly described in option A. Option B reverses the relationship. Option C suggests a software distinction that does not exist at the hardware level. Option D mixes source type with maskability, which is inaccurate. Engineers use NMIs for emergency conditions like power‑fail detection.

Q8. During a system startup, the program counter (PC) is loaded with the address of the interrupt vector table entry for the reset interrupt. Which of the following best describes this process?

A.The PC is set to a fixed address (e.g., 0x0000) where the reset vector resides, ensuring the CPU begins execution at the reset handler
B.The PC reads a value from the accumulator and jumps to that location
C.The PC increments sequentially until it finds a non‑zero memory location
D.The PC is ignored during reset and the processor remains halted āœ…
šŸ’” Difficulty: easy | āœ… Correct: D

šŸ“– Explanation: When a reset occurs, the hardware automatically places the PC at a predefined location—commonly address 0x0000—where the reset vector points to the initialization routine. This behavior matches option D, making it correct. Option A incorrectly states that the PC is set to the vector itself rather than the start of the vector table. Option B suggests a data‑driven jump, which is not part of the reset sequence. Option C describes a search algorithm that does not occur. Knowing the reset vector mechanism helps designers ensure that their firmware starts in a known state.

šŸ”— Related Topics (MCQs)