Keil Logo

C51: AVOIDING ACALL PROBLEMS IN DS80C390 REV BX DEVICES


Information in this article applies to:

  • C51 Version 7

QUESTION

I'm using the Keil PK51 Professional Developer's Kit with a Dallas DS80C390 Rev Bx Device in Contiguous Mode. I'm using the ROM(D512K) directive to generate compact code using the extended ACALL instructions. However, there is a potential chip problem with ACALL instructions in the DALLAS SEMICONDUCTOR ERRATA SHEET DS80C390 Revision B4 under item 6:

The ACALL instruction will not operate correctly in 24-bit contiguous mode if the memory location following the 3 byte instruction falls on a 64 kB page boundary (xx0000h).

Work around: None.

Be sure that ACALL instructions are not located close to a 64 kB page boundary (xx0000h).

What should I do?

ANSWER

The code generated by the Keil tools avoid this problem as follows:

  • Functions generated with Keil C51 are marked with relocation type INSEG.
  • This ensures that the function is always located withint a 64K Byte block.
  • Functions end with a RET or a JMP instruction. ACALL cannot be the last instruction in a function.

Therefore, ACALL will not be the last instruction in a 64K Byte block and this chip problem cannot occur.

To be certain that no ACALL instructions are located at the end of a 64K Byte block by the assembler parts of your application code, you may reserve the last memory location in each code page using the LX51 Linker RESERVE directive. For example, in µVision under Options for Target - LX51 Locate - Reserve: enter:

C:0xFFFF-C:0xFFFF, C:0x1FFFF-C:0x1FFFF,
C:0x2FFFF-C:0x2FFFF, C:0x3FFFF-C:0x3FFFF

This will ensure that there are no CPU instruction located at the last byte of a 64K Byte block in the memory segments 0, 1, 2, and 3.

MORE INFORMATION

  • Refer to RESERVE in the LX51 User's Guide.

SEE ALSO

Last Reviewed: Monday, July 18, 2005


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.