Keil Logo

C51: USING MORE THAN 2K OF CODE SPACE


Information in this article applies to:

  • C51 All Versions

QUESTION

I'm using the C51 version 5.50 for creating firmware for the Atmel AT89S8252. This part has 8K of Flash for the code. Where do I indicate to the C51 that the internal program memory is 8K instead of 2K? Some of my program functions are mapped in address locations higher than 7FFh.

How do I indicate to the linker/locator that in some cases it should use LCALL and LJMP instructions instead of ACALL and AJMP?

ANSWER

Make sure to check that you are using ROM(LARGE) and not ROM(SMALL).

ROM(SMALL) forces the total program size to 2K or less and forces the use of AJMP and ACALL instructions.

ROM(LARGE) lets the compiler use LJMP and LCALL instructions for all function calls. That will let you create programs up to 64K in size.

Last Reviewed: Monday, June 7, 2004


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.