Keil Logo

AX51: ERROR A14: IS SUBTRACTION IMPOSSIBLE?


Information in this knowledgebase article applies to:

  • Ax51 Macro Assembler any Version
  • A251 Macro Assembler any Version
  • A166 Macro Assembler any Version

QUESTION

I am getting an Error A14: Bad Relocatable Expression on the following code.

extern number (value)
  :
       mov A,#0 - value

Is it not possible to use subtraction with program symbols.

ANSWER

There are several restrictions with relocatable symbols. You can only subtract two relocatable symbols when the belong to the same segment. These symbols must be defined within the program module so that the assembler can calculate the offset of this symbols as absolute number.

As a solution to your problem you may define the negative number in the module that defines the symbol value in the above example.

MORE INFORMATION

Last Reviewed: Thursday, November 19, 2009


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.