Technical Support

C51: REPLACE AJMP/ACALL WITH LJMP/LCALL


Information in this article applies to:

  • C51 Version 5.50 or higher

QUESTION

I am using an 8051 derivative that does not support the AJMP and ACALL instructions. When I build my project and examine it in the µVision Debugger, I notice that the toolchain is using AJMP instructions into the interrupt vector table.

How can I ensure that the toolset does not use any AJMP and ACALL instructions?

ANSWER

There are two settings that affect the generation of AJMP and ACALL instructions.

  • C51 Compiler: you need to use the default setting ROM(LARGE) to generate just LJMP and LCALL instructions from the compiler level. In µVision this is configured under Project - Options for Target - Target. Select Code ROM Size: Large 64K program.
  • Linker/Locater: use the directive NOAJMP (abbreviation NOAJ). In µVision this directive can be entered under Project - Options for Target - BL51 Misc or LX51 Misc. Enter under Misc controls: NOAJMP.

MORE INFORMATION

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

SEE ALSO

Last Reviewed: Friday, July 15, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure