Keil Logo

C51: Calculating Code Space for Bank Switching

Information in this article applies to:

  • C51 All Versions


How do I calculate the amount of additional code space if I have a code banking program and I add another code bank?


In most cases, this calculation is simple. It is equal to the size of the bank area. This is usually specified on the linker command line as BANKAREA(0x8000-0xFFFF).

You must also deduct a little space from the common area for inter-bank function calls to routines in the new code bank (typically 8 bytes per function).


Last Reviewed: Thursday, February 25, 2021

Did this article provide the answer you needed?
Not Sure
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.