Absolute expression

An absolute expression is an expression involving constants or known absolute labels or expressions. An expression containing an operation between an absolute expression and a constant value is also an absolute expression.

See the following listing for an example of an absolute expression.

Listing: Absolute expression

Base:  SET $100
Label: EQU Base * $5 + 3

Expressions involving the difference between two relocatable symbols defined in the same file and in the same section evaluate to an absolute expression. An expression as label2-label1 can be translated as:

Listing: Interpretation of label2-label1: difference between two relocatable symbols

(<offset label2> + <start section address >) -
(<offset label1> + <start section address >)

This can be simplified to the following listing:

Listing: Simplified result for the difference between two relocatable symbols

<offset label2> + <start section address > -
<offset label1> - <start section address>

= <offset label2> - <offset label1>