Keil Logo

BL51: WRITING YOUR OWN CODE BANKING SYSTEM


Information in this article applies to:

  • C51 Version 5.50

QUESTION

How can I configure the linker so that it locates functions in different code banks but does not implement code banking? The reason is because I want to write my own code banking system.

ANSWER

You may use the code below as a dummy L51_BANK.A51 file as it contains the bare minimum for the linker to link a code banking project. Add this file to your project. You may then write whatever code you require or develop whatever system you need to implement your own code banking.

$NOCOND DEBUGPUBLICS
;--------------------------------------------------------
;  This file disables the bank switching of the BL51 Banked Linker/Locater
;  and allows code banking with own user routines.
;--------------------------------------------------------
;*********** Configuration Section ************
?B_NBANKS       EQU     16       ; Define max. Number of Banks
;                                ; the max. value for ?B_BANKS is 32
;
; Dummy Definitions
; -----------------
                NAME    ?BANK?SWITCHING

?BANK?SELECT    SEGMENT  CODE
                RSEG    ?BANK?SELECT
?B_BANK0:       CLR     A
                JMP     @A+DPTR

?B_MODE         EQU     0

                PUBLIC  ?B_NBANKS, ?B_MODE, ?B_BANK0

                END

MORE INFORMATION

SEE ALSO

Last Reviewed: Wednesday, August 3, 2005


Did this article provide the answer you needed?
 
Yes
No
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.