ARM Technical Support Knowledge Articles

ERROR A14: IS SUBTRACTION IMPOSSIBLE?

Applies to: AX51 Macro Assembler

Answer


Information in this knowledgebase article applies to:


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

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2009-11-19 01:19:12

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential