This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

The nature of BAD RELOCATABLE EXPRESSION

hi,

Let assume that one .asm file contains next definitions:

PUBLIC FLAG1,FLAG2
FLAG1	EQU	00000001b
FLAG2	EQU	00000010b

and the second file contains next line:
	MOV	A,#(FLAG1 OR FLAG2)

When compiling, it produces A14 error:

BAD RELOCATABLE EXPRESSION:
A relocatable expression may contain only one relocatable symbol which may be a egment symbol, external symbol, or a symbol belonging to a relocatable segment.
Mathematical operations cannot be carried out on more than one relocatable symbol.

I understand the mean of this error and have found some workarounds. But could I ask: what is the nature of this limitation? Is it just from pure compiler or the reason is more complex?

Thanks,
Oleg

Parents Reply Children
No data