Keil Logo

ONEREGBANK Compiler Directive

Abbreviation

OB

Arguments

None.

Default

None.

µVision

Options — C51 — Misc controls.

Description

The C51 Compiler selects registerbank 0 on entry to interrupts that do not specify the using attribute. This is done at the beginning of the interrupt service routine with the MOV PSW,#0 instruction. This ensures that high-priority interrupts that do not use the using attribute can interrupt lower priority interrupts that use a different registerbank.

If your application uses only one registerbank for interrupts, you may use the ONEREGBANK directive. This elimitates the MOV PSW,#0 instruction.

Example
C51 SAMPLE.C ONEREGBANK

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