Past exam question: 2082 Chaitra (Regular), Q10(a)
Open in the Padhaiko appQuestion
What is interrupt service routine?
Solution
Definition: An Interrupt Service Routine (ISR), or interrupt handler, is a dedicated subroutine executed by the microprocessor in response to a hardware or software interrupt. When triggered, the processor automatically saves the current Program Counter (return address) on the stack, jumps to the ISR address to service the peripheral device, and then executes a return instruction (RET) to restore context and resume normal execution.
Answer:
An ISR is a specialized subroutine that the microprocessor executes upon accepting an interrupt to service the interrupting device before returning to the main program via RET.