76 Assembly Language Fundamentals An expression is a list of elements each pair of which is separated by one of the following operators - ·:1':· meaning addition, subtraction, division, and multiplication, respectively, as in BASIC. The result of an expression is either absolute or relocatable depending upon the following rules: An absolute expression is any expression which contains ~ • Only absolute elements. • An even number of relocatable elements, paired in sequence and by sign (Le., for each These pairs may be in combination with absolute elements. relocatable element there is another relocatable element adjacent to it, of opposite sign).
A relocatable expression is any expression which contains - • An odd number of relocatable elements, paired in sequence and by sign, except the last, which must be positive. • An odd number of relocatable elements, as above, in combination with any number of absolute elements. Any combination of absolute or relocatable elements which does not result in either an abso- lute or relocatable value, by the rules above, results in an error. These rules and the rules for using ::-1 and ......
can be summarized as - The expression is - The type is- Example absolute ± absolute absolute absolute + relocatable relocatable relocatable ± absolute relocatable relocatable - relocatable absolute relocatable + relocatable error absolute * absolute absolute absolute - relocatable error absolute / absolute absolute absolute * relocatable error relocatable * absolute error relocatable / absolute error absolute / relocatable error