Ax51 User's Guide

Extended Relocatable Expressions

The extended relocatable expressions have generally the same rules that apply to simple relocatable expressions. Segment and external symbols are allowed in extended relocatable expressions. Extended relocatable expressions may be used only in statements that generate code as operands; these are:

  • As an operand to a data initialization directive (DB or DW)
  • As an operand to a machine instruction
Examples for extended relocatable expressions
REL1 + ABS1 * 10
EXT1   ABS1
LOW (REL1 + ABS1)
WORD2 (SEG1)
Invalid form of simple relocatable expressions
(SEG1 + ABS1) * 10      relocatable value may not be multiplied.
(EXT1   REL1)     you can add/subtract only absolute quantities

LOW (REL1) + ABS1       LOW may be applied only to the
                          final relocatable expression