as: Infix Ops
1
1 6.2.4 Infix Operators
1 ---------------------
1
1 "Infix operators" take two arguments, one on either side. Operators
1 have precedence, but operations with equal precedence are performed left
1 to right. Apart from '+' or '-', both arguments must be absolute, and
1 the result is absolute.
1
1 1. Highest Precedence
1
1 '*'
1 "Multiplication".
1
1 '/'
1 "Division". Truncation is the same as the C operator '/'
1
1 '%'
1 "Remainder".
1
1 '<<'
1 "Shift Left". Same as the C operator '<<'.
1
1 '>>'
1 "Shift Right". Same as the C operator '>>'.
1
1 2. Intermediate precedence
1
1 '|'
1
1 "Bitwise Inclusive Or".
1
1 '&'
1 "Bitwise And".
1
1 '^'
1 "Bitwise Exclusive Or".
1
1 '!'
1 "Bitwise Or Not".
1
1 3. Low Precedence
1
1 '+'
1 "Addition". If either argument is absolute, the result has
1 the section of the other argument. You may not add together
1 arguments from different sections.
1
1 '-'
1 "Subtraction". If the right argument is absolute, the result
1 has the section of the left argument. If both arguments are
1 in the same section, the result is absolute. You may not
1 subtract arguments from different sections.
1
1 '=='
1 "Is Equal To"
1 '<>'
1 '!='
1 "Is Not Equal To"
1 '<'
1 "Is Less Than"
1 '>'
1 "Is Greater Than"
1 '>='
1 "Is Greater Than Or Equal To"
1 '<='
1 "Is Less Than Or Equal To"
1
1 The comparison operators can be used as infix operators. A
1 true results has a value of -1 whereas a false result has a
1 value of 0. Note, these operators perform signed comparisons.
1
1 4. Lowest Precedence
1
1 '&&'
1 "Logical And".
1
1 '||'
1 "Logical Or".
1
1 These two logical operations can be used to combine the
1 results of sub expressions. Note, unlike the comparison
1 operators a true result returns a value of 1 but a false
1 results does still return 0. Also note that the logical or
1 operator has a slightly lower precedence than logical and.
1
1 In short, it's only meaningful to add or subtract the _offsets_ in an
1 address; you can only have a defined section in one of the two
1 arguments.
1