Keil Logo

BSE Compiler Directive

Abbreviation

None.

Arguments

None.

Default

Multiple data pointers are not related to CPU registerbanks.

µVision

None.

Description

This directive may only be used in conjunction with the MOD517 multiple DPTR support. When you use this directive, the compiler assumes that the device has Data Pointer Register Banking enabled (a feature which is currently available with the Evatronix R8051XC core).

Data Pointer Register Banking creates 4x2 DPTR banks which are controlled by the context switch via PSW.3 and PSW.4 that changes the R0-R7 registerbank.

The BSE directive enables the following features:

  • The BSE directive prevents saving the DPSEL and DPTR registers when an interrupt routine switches the registerbank. This reduces the overhead of interrupt functions.
  • The BSE directive assumes that the device provides auto-increment features for the DPTR register. When you use the MOD517(NODP8) directive, auto-increment is used in the memcpy, memmove, memcmp, strcpy, and strcmp functions.

The BSE directive requires that DPSEL.3 is set to enable Data Pointer Register Banking. This may be done at the beginning of the main function.

void main (void)
{
.
.
.
// enable BSE (Data Pointer Register Banking)
DPSEL = 8;
.
.
.
}
See Also

MOD517

Example
C51 SAMPLE.C MOD517 (NOAU) BSE

#pragma bse
  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.