Keil Logo

C51: SUPPORT FOR DEVICES WITH UNDER 2K CODE SPACE


Information in this article applies to:

  • C51 All Versions

SYMPTOM

By default, the Cx51 Compiler generates code using LJMP and LCALL instructions for jumps and calls. Numerous devices are available that do not support these instructions. For these devices, the AJMP and ACALL instructions must be used instead of the LJMP and LCALL instructions.

RESOLUTION

The Cx51 Compiler provides the ROM directive which allows you to control which jump and call instructions are used.

  • ROM(LARGE) is the default setting. It instructs the compiler to use LJMP and LCALL instructions for all jumps and calls.
  • ROM(COMPACT) instructs the compiler to use LCALL instructions for function to function calls and AJMP instructions for jumps within a function.
  • ROM(SMALL) instructs the compiler to use AJMP and ACALL instructions for all jumps and calls.

Note that the evaluation version of the tools impose a restriction on where code is located. For that reason, you cannot use the evaluation tools to program devices with under 2K of code memory. Of course, the licensed tools can be used to program such devices.

MORE INFORMATION

  • Refer to ROM in the Cx51 User's Guide.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Monday, August 21, 2006


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  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.