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

Registerbanks in interrupts

Can you tell me :
If an interrupt routine using (say) registerbank 2 calls a subroutine, does the subroutine have to be specified as using registerbank 2 as well?

If so, what is the best way of specifying a routine that may be called from both the foreground and an interrupt?

Parents
  • In C51 there is a way to tell the compiler to generate register bank independent code for a given function. Then you could call such a function from either an ISR or mainline code using the normal cautions of course.

    Without this, you must call functions in the same register bank.

    - Mark

Reply
  • In C51 there is a way to tell the compiler to generate register bank independent code for a given function. Then you could call such a function from either an ISR or mainline code using the normal cautions of course.

    Without this, you must call functions in the same register bank.

    - Mark

Children