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

using register bank in C167

I found how to use one specific register bank for a function (interupt)by specifying using My_Bank and so, be faster (less PUSH and POP)but I would like to know if I can specify a variable to be located in one register bank (for speed), and, if yes, how to do it?

Parents
  • I have some variables (coeff of a transfer function) I use in an Interrupt function and make MUL and DIV with them... I think it would be faster if this variables are stored in registers... I think I can easely affect a register of the specified bank to this variable, but the question is: how can I be sure that the C compiler whill not use these registers and then destroye my variable???

Reply
  • I have some variables (coeff of a transfer function) I use in an Interrupt function and make MUL and DIV with them... I think it would be faster if this variables are stored in registers... I think I can easely affect a register of the specified bank to this variable, but the question is: how can I be sure that the C compiler whill not use these registers and then destroye my variable???

Children