Keil™, An ARM® Company

Technical Support

A51: ERROR A14 (BAD RELOCATABLE EXPRESSION)


Information in this article applies to:

  • C51 Version 6

QUESTION

I have an assembler program that assembled with no errors in previous versions of the Keil tools. However, now I receive the following error message:

02C2                 538        MOV   R0,#HIGH NONDES_END - NONDES_STRING
*** ______________________________________________________^
*** ERROR #A14 IN 538 (Prntdiag.a51, LINE 538): BAD RELOCATABLE EXPRESSION

What is going on and how can I fix it?

ANSWER

The problem is that the calculation must be in parentheses. If you change your assembler code to the following:

MOV   R0,#HIGH (NONDES_END - NONDES_STRING)

the assembler will correctly calculate the high order byte and will no longer generate an error.

Last Reviewed: Friday, February 08, 2002


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