Interrupt Handler - Comparison Between Subroutine and ISR

Comparison Between Subroutine and ISR

  1. As discussed earlier, routine executed in response to an interrupt is called as the interrupt service routine(ISR).
  2. Subroutine is the part of a big program which perform some specific part related to the program.
  3. Subroutine is called by the program itself. It helps to avoid complexity in the program.
  4. ISR is the code executed in response to the interrupt which may occur during the execution of a program.
  5. ISR may have nothing in common to the program which is being executed at the time of interrupt is received.
  6. In the case of subroutine, only address of next field is stored in the stack automatically when it is called while in the case of ISR, along with the address of next field, content of status register and some other registers(if required) are also stored.

Read more about this topic:  Interrupt Handler

Famous quotes containing the word comparison:

    I have travelled a good deal in Concord; and everywhere, in shops, and offices, and fields, the inhabitants have appeared to me to be doing penance in a thousand remarkable ways.... The twelve labors of Hercules were trifling in comparison with those which my neighbors have undertaken; for they were only twelve, and had an end; but I could never see that these men slew or captured any monster or finished any labor.
    Henry David Thoreau (1817–1862)