None: Do not change interrupt code. (1): Save address extension SFR in interrupt code.
Default
The standard C51 library is used.
µVision
Options — Target — 'far' memory type support.
Options — Target — save address extension SFR in interrupts.
Description
The VARBANKING directive instructs the compiler to use
alternate library routines that support far memory for classic
8051 devices.
To use far memory, you
must configure the memory access functions and an address extension
SFR in XBANKING.A51
and include this file in your project. As alternative, set
?B_VARBANKING in the L51_BANK.A51
bank switch configuration file.
VARBANKING(1) adds code to interrupt service routines to
save and restore the address extension SFR. Specifically, the
following instructions are inserted at the beginning of an interrupt
function:
PUSH ?C?XPAGE1SFR
MOV ?C?XPAGE1SFR,?C?XPAGE1RST
The symbol ?C?XPAGE1SFR is typically defined in file
XBANKING.A51 and specifies the memory location of the address
extension SFR. The initial value of this SFR is specified by the
?C?XPAGE1RST symbol. Note that not every version of the
XBANKING.A51 requires to save and restore an address extension
SFR and therefore sometimes the symbol ?C?XPAGE1SFR does not
exist.
The examples in \KEIL\C51\EXAMPLES\FARMEMORY\ show how to
use the C51 far memory type on classic 8051 devices.
Note
Only interrupt functions in C modules that are translated with
the VARBANKING (1) directive save and restore the address
extension SFR. If your application contains interrupt routines from
assembly modules or libraries you must check them manually.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.