This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

function and isr

what is the difference between jump to a function and jump to the isr? what are the steps involved?
(discuss regarding return also)

Parents
  • ...jump to a function and jump to the isr...

    Your question is so open-ended that it sounds like a school question. Nonetheless, here is some information that addresses some of your questions and differentiates functions and ISRs.

    • A function is called by a program in response to flow control.
    • An ISR is called when its associated interrupt is triggered.
    • An ISR may call a function.
    • A function "probably" doesn't call an ISR. But, a function could trigger an ISR.
    • Some interrupts can be masked or disabled which prevents their ISR from getting invoked.
    • Some interrupts cannot be masked and are given a special name of NMI. But, on the PC, even the NMI can be masked.
    • In some architectures, a function may be triggered by an SWI and a function may trigger an SWI. This means that the SWI acts more like a function call and does not really invoke an ISR in the traditional sense. However, it is probably acceptable to interchange the terminology in this case.
    • Functions and ISRs both usually return unless they include a bug or, possibly intentional, endless loop that prevents such. However, in the latter case this could be used to trigger a watchdog interrupt and its associated ISR.
    • ISRs generally don't have a return value.
    • Functions may or may not have a return value depending on their definition.

    Jon

Reply
  • ...jump to a function and jump to the isr...

    Your question is so open-ended that it sounds like a school question. Nonetheless, here is some information that addresses some of your questions and differentiates functions and ISRs.

    • A function is called by a program in response to flow control.
    • An ISR is called when its associated interrupt is triggered.
    • An ISR may call a function.
    • A function "probably" doesn't call an ISR. But, a function could trigger an ISR.
    • Some interrupts can be masked or disabled which prevents their ISR from getting invoked.
    • Some interrupts cannot be masked and are given a special name of NMI. But, on the PC, even the NMI can be masked.
    • In some architectures, a function may be triggered by an SWI and a function may trigger an SWI. This means that the SWI acts more like a function call and does not really invoke an ISR in the traditional sense. However, it is probably acceptable to interchange the terminology in this case.
    • Functions and ISRs both usually return unless they include a bug or, possibly intentional, endless loop that prevents such. However, in the latter case this could be used to trigger a watchdog interrupt and its associated ISR.
    • ISRs generally don't have a return value.
    • Functions may or may not have a return value depending on their definition.

    Jon

Children
No data