Comparison Between Subroutine and ISR
- As discussed earlier, routine executed in response to an interrupt is called as the interrupt service routine(ISR).
- Subroutine is the part of a big program which perform some specific part related to the program.
- Subroutine is called by the program itself. It helps to avoid complexity in the program.
- ISR is the code executed in response to the interrupt which may occur during the execution of a program.
- ISR may have nothing in common to the program which is being executed at the time of interrupt is received.
- 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:
“But the best read naturalist who lends an entire and devout attention to truth, will see that there remains much to learn of his relation to the world, and that it is not to be learned by any addition or subtraction or other comparison of known quantities, but is arrived at by untaught sallies of the spirit, by a continual self-recovery, and by entire humility.”
—Ralph Waldo Emerson (18031882)
Related Subjects
Related Phrases
Related Words