ARM Technical Support Knowledge Articles

PROGRAMS THAT USE ONE REGISTERBANK

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

What does the ONEREGBANK directive do?

ANSWER

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:

 MOV PSW,#0

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.

SEE ALSO

Article last edited on: 2002-04-08 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential