🎓 BookMCQ
← Back to 7. Interrupt Instructions of 8085

📝 Hardware Interrupts in 8085 Microprocessor (8 MCQs)

External Interrupt Inputs and Their Processor Functions

Hardware interrupts are requests applied through physical input pins of the 8085 to obtain processor attention. The five inputs are TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. They allow external devices to interrupt normal program execution when an event requires immediate service, subject to priority, enable and masking conditions.

Edge-Sensitive and Level-Sensitive Interrupt Inputs

TRAP requires a rising edge followed by a high level until internally sampled. RST 7.5 is positive-edge triggered and its request is latched. RST 6.5, RST 5.5 and INTR are high-level-sensitive. These triggering characteristics determine how an external device must generate and maintain its request.

Priority Order and Interrupt Vector Locations

The priority order is TRAP, RST 7.5, RST 6.5, RST 5.5 and INTR. Their fixed vectors are 0024H, 003CH, 0034H and 002CH for the first four respectively. INTR is non-vectored; the processor activates INTA and the external device supplies an instruction that determines the service location.

Example of RST 7.5 Hardware Interrupt Servicing

Assume RST 7.5 is enabled and a valid rising edge occurs. The internal request latch records the event, even if the input pulse ends before recognition. When the processor accepts it, the PC is saved on the stack and execution transfers to 003CH, where the interrupt service routine begins.

Differences Between Hardware and Software Interrupts

Hardware interrupts originate from external electrical signals, whereas software interrupts result from instructions executed in the program. The 8085 provides fixed vectors for four hardware interrupt inputs, while INTR obtains its service instruction externally. RST 0 through RST 7 are software restart instructions and use separate predefined vector locations.

Misconceptions About Hardware Interrupt Operation

'RST 7.5 must remain high until recognition' is incorrect because its rising-edge request is latched. 'RST 6.5 is edge triggered' is incorrect because it is level sensitive. 'All five hardware interrupts have fixed vector addresses' overlooks INTR, whose destination depends on the externally supplied instruction.

Hardware Interrupt Recognition and Priority Questions

Practise comparing all five interrupt inputs by priority, vector, masking and triggering behavior. Understand the role of INTA and the stack during servicing. Questions may present simultaneous requests, ask which interrupt is selected or require identification of the electrical condition necessary for recognition of a particular input.

Hardware Interrupt Input and Servicing Terms

  • TRAP - Highest-priority non-maskable interrupt.
  • RST 7.5 - Positive-edge-triggered interrupt.
  • RST 6.5 - High-level-sensitive interrupt.
  • RST 5.5 - Lower-priority level-sensitive interrupt.
  • INTR - Externally supplied non-vectored request.
  • INTA - Interrupt acknowledgement signal.
2
Easy
4
Medium
2
Hard

📝 All Hardware Interrupts in 8085 Microprocessor MCQs

Q1. A microcontroller must compute the 2's complement of a 3‑byte number stored starting at address 2101H. Which register pair should be initialized with the address of the first byte before the loop begins?

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

📖 Explanation: The program uses LXI H,2100H then INX H to position HL at 2101H, the location of the least‑significant byte. Initializing HL therefore points to the source data, allowing the loop to read each byte sequentially. DE is reserved for the destination area (starting at 2201H), BC is unused for address handling, and SP is the stack pointer, which would interfere with normal data flow. Using the correct pointer is essential in real firmware to ensure that the right bytes are processed.

Q2. Which interrupt in the 8085 microprocessor cannot be disabled by software and therefore has the highest priority?

A.TRAP ✅
B.RST7.5
C.INTR
D.RST5.5
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: TRAP is a non‑maskable interrupt; it is always recognized regardless of the interrupt enable (EI) instruction. Because it cannot be turned off, the processor gives it the highest priority to handle critical events like power‑fail detection. RST7.5 and RST5.5 are maskable and can be ignored if disabled, while INTR is the general purpose interrupt with the lowest priority. This priority scheme mirrors real‑world designs where emergency signals must be serviced immediately.

Q3. What is the machine‑code opcode for the 8085 instruction CMA (Complement Accumulator)?

A.3E ✅
B.2F
C.80
D.76
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The CMA instruction, which flips every bit of the accumulator, is encoded as 2Fh in 8085 machine language. Option A (3E) is the opcode for MVI A, immediate data, option C (80) corresponds to ADD B, and option D (76) is the HLT instruction. Knowing exact opcodes is useful when writing hand‑assembled code or debugging binary dumps, as an incorrect opcode would perform a different operation and corrupt program logic.

Q4. During execution of the 2's complement routine, a carry is generated after processing the least‑significant byte. How does the program indicate this carry for the next iteration?

A.Increment D
B.Set B to 00
C.Set B to 01 ✅
D.Decrement C
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When the JNC instruction finds a carry, the program jumps to a label that loads B with 01h, representing a carry of one for the next byte’s addition. Setting B to 00h would incorrectly clear the carry, leading to a wrong two's‑complement result. Incrementing D would move the destination pointer incorrectly, and decrementing C would reduce the loop counter prematurely. Propagating the carry correctly mirrors how multi‑byte arithmetic is handled in real processors.

Q5. Why does the routine first execute CMA and then ADI 01h on each byte?

A.To obtain 2's complement
B.To obtain 1's complement ✅
C.To clear the accumulator
D.To increment the address pointer
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: CMA produces the one's complement of the byte, flipping all bits. Adding 01h (ADI 01h) to this result yields the two's complement, which is the standard method for representing negative numbers in binary. Simply using CMA would leave the value as a one's complement, while clearing the accumulator or incrementing the address pointer would not perform any arithmetic conversion. This two‑step process is essential in embedded systems that need to negate multi‑byte values.

Q6. Assume N = 04h (four bytes) and the source bytes at 2101H‑2104H are FFh, 00h, 7Fh, 80h. After the program finishes, which value will be stored at 2204H?

A.01h
B.FFh
C.80h
D.7Fh ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: The routine processes each byte individually. FFh becomes 01h after complement and addition, 00h becomes FFh, 7Fh becomes 80h, and 80h becomes 7Fh. These results are stored sequentially starting at 2201H, so the fourth result resides at 2204H and is 7Fh. Any other option would correspond to an earlier byte’s result or an incorrect complement operation. Accurate byte‑wise two's complement conversion is crucial in systems that manipulate signed multi‑byte numbers, such as sensor data processing.

Q7. Why is the TRAP interrupt given the highest priority in the 8085 architecture?

A.Because it cannot be disabled by software ✅
B.Because it is vectored to address 003CH
C.Because it has the shortest latency
D.Because it is level‑sensitive
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: TRAP is non‑maskable, meaning the processor cannot ignore it even if the interrupt enable flag is cleared. This property ensures that critical events, like a power‑failure or watchdog signal, are always serviced immediately, justifying its top priority. While being vectored to a fixed address simplifies handling, other interrupts are also vectored; latency and level‑sensitivity do not determine priority in the 8085. The design reflects real hardware where unstoppable emergencies must be addressed without delay.

Q8. If the programmer wants the results to start at address 2300H instead of 2201H, which instruction should be modified?

A.LXI D,2201H ✅
B.LXI H,2100H
C.MOV C,M
D.STAX D
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The destination address is held in the DE register pair, loaded by the instruction LXI D,2201H. Changing the immediate operand to 2300H redirects all subsequent STAX D stores to the new region. LXI H,2100H sets the source pointer and should remain unchanged, MOV C,M loads the byte count, and STAX D performs the store operation using whatever address DE currently holds. Adjusting the address register is the standard method for relocating output data in real‑world firmware modifications.

🔗 Related Topics (MCQs)