|
| REGISTERBANK Compiler Directive| Abbreviation | | RB | | Arguments | | A number in range 0-3 enclosed in parentheses. | | Default | | REGISTERBANK (0) | | µVision | | Options — C51 — Misc controls. | | Description | | The REGISTERBANK directive selects which register bank to use for subsequent functions declared in the source file. Resulting code may use the absolute form of register access when the absolute register number can be computed. The using function attribute supersedes the effects of the REGISTERBANK directive. Note - Unlike the using function attribute, the REGISTERBANK control does not switch the register bank.
- Functions that return a value to the caller must always use the same register bank as the caller. If the register banks are not the same, return values may be returned in registers of the wrong register bank.
- The REGISTERBANK directive may appear more than once in a source program. However, it may be specified only outside a function definition (since it affects the code generated for the entire function). The directive is ignored if used within a function declaration.
| | See Also | | AREGS, NOAREGS | | Example | |
C51 SAMPLE.C REGISTERBANK(1)
#pragma rb(3)
|
Related Knowledgebase Articles |
|