C51: LJMP & LCALL INSTEAD OF AJMP & ACALL
Information in this article applies to:
I'm using the C51 with the Atmel AT89S8252. I've got the following problems:
The AT89S8252 has 8K of Flash for the code and I could not find where to indicate to the C51 that the internal program memory is 8K instead of 2K.
Some of the functions are mapped by the linker in address locations higher than 7FFh and I don't know how to indicate that LCALL and LJMP should be used instead of ACALL and AJMP.
This is usually caused by setting the ROM model to ROM(SMALL) instead of ROM(LARGE) or ROM(COMPACT).
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 lets you create programs up to 64K in size.
Last Reviewed: Thursday, September 22, 2005
of your data.