REGUSEfunction (register | range 〚,
register | range〛)
Default
None.
µVision
None.
Description
The REGUSE directive specifies which registers are modified
by the specified function. The function
specified must match the symbol name used in a PUBLIC
definition.
The registers specified by the REGUSE directive are used by
global register optimization to improve the performance of C
functions that call assembler routines.
The registers that may be specified are:
R0-R7,
DPL,
DPH,
DPTR (for DPL and DPH),
A (for the accumulator),
B (for the B register),
C (for the carry flag),
PSW.
The range specifies a range of registers such as
R1-R4.
Note
Refer to Interfacing
C to Assembler in the Cx51 User's Guide. The section Register
Usage contains additional information about the registers that
can be altered in assembler routines.
The assembler does not verify the registers used in a routine.
Make certain you are careful to specify the correct set of
registers used. Failure to do so will result in run-time problems
(due to overwritten register values).
The function name specified must exactly match the
spelling and case of the identifier defined in the assembly source
file. If the CASE directive was not specified, identifiers
are converter to uppercase.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.