Keil Logo

Register Usage

In an assembler subroutine, the following registers may be used without prior saving of their contents: R0 to R11, WR16 to WR30, PSW, PSW1, and DPTR. DR60 is the STACK POINTER; at the end of the assembler subroutine the value of DR60 must be the same as at the entry of the routine. If the subroutine uses the registers R12 to R15, the contents of the registers must be saved and restored at return to the calling C function.

When calling a C function from assembler, it must be assumed that the register contents of R0 to R11, WR16 to WR30, PSW, PSW1, and DPTR are destroyed during the processing of the C function. The PSW flag UD is not used in C251 code and may be freely used.

  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.