Code Banking: Different banks reference to a table that store in CODE memory

Dear all,
My project using code banking.
I have a table that store in CODE memory(BANK1(?CO?MENUROOT(0x2000))).
And my program in many Banks(Bank1, Bank2, Bank3......) reference to this table. But only program in bank1 can get the correct table value.
Because a lot of reasons, I have to seperate these programs into different banks. And I don't want to create many copy of this table in defferent name to put them in each bank.
How can I solve this problem?
Thank you.

Ovid.

Parents
  • You'll almost certainly have to either keep that table in the common bank, or change from a table to an OO-style accessor function. The reason is that C51 knows how to organize function calls across banks, but not data references. So data either has to be non-banked (in the common area), or it has to be replaced by functions.

Reply
  • You'll almost certainly have to either keep that table in the common bank, or change from a table to an OO-style accessor function. The reason is that C51 knows how to organize function calls across banks, but not data references. So data either has to be non-banked (in the common area), or it has to be replaced by functions.

Children
More questions in this forum