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

interrupt function (register bank)

I want to create an interrupt function. So I have to know the interrupt number and I have to select the register bank. My question is, which register bank I must select and why???
Where can I get information about this problem?
Thank you for answers.
andy

Parents
  • Selection of a register bank for an interrupt function is not a must. If a register bank is assigned to an interrupt function the compiler simply switches the PSW after saving the previous contents on the stack. On exit all that has to be done is to restore the PSW by popping it from the stack. If no bank is assigned, the compiler takes care of the registers of the current (active) bank by pushing them onto the stack. This is normally more time consuming than just saving/restoring the PSW. If you need high speed processing, assign a register bank. If speed is not a requirement for your application, you may assign a specific bank and use the register bank area as additonal 8 bytes of DATA memory.

    HHK

Reply
  • Selection of a register bank for an interrupt function is not a must. If a register bank is assigned to an interrupt function the compiler simply switches the PSW after saving the previous contents on the stack. On exit all that has to be done is to restore the PSW by popping it from the stack. If no bank is assigned, the compiler takes care of the registers of the current (active) bank by pushing them onto the stack. This is normally more time consuming than just saving/restoring the PSW. If you need high speed processing, assign a register bank. If speed is not a requirement for your application, you may assign a specific bank and use the register bank area as additonal 8 bytes of DATA memory.

    HHK

Children
No data