|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
What does the ONEREGBANK directive do?
The ONEREGBANK directive offers enhanced support for programs that use a single register bank. By default, the C51 Compiler ensures that registerbank 0 is selected by interrupt service routines (ISRs) that are declared without a using directive. This is done by adding the instruction:
to the interrupt service routine entry code. This is necessary when the using directive is omitted on high-priority ISRs that may interrupt other low-priority ISRs (that have a register bank specified with the using directive). This also applies to RTX-51 and RTX-51 Tiny applications.
You may use the ONEREGBANK directive to specify that only registerbank 0 is used in your application. Then, C51 will not generate the additional MOV PSW,#0 instruction for ISRs.
Article last edited on: 2002-04-08 00:00:00
Did you find this article helpful? Yes No
How can we improve this article?