The assembler evaluates arithmetic expressions during conditional
assembly processing as follows:
- It evaluates each arithmetic term.
- It carries out arithmetic operations from left to right. However,
- It carries out unary operations before binary operations.
- It carries out the binary operations of multiplication and division
before the binary operations of addition and subtraction.
- It carries out the binary operations of addition and subtraction
before the bitwise logical operations.
- It carries out the bitwise logical operations before shift operations.
- In division, it gives an integer result; any fractional portion
is dropped. Division by zero gives a 0 result.
- In parenthesized arithmetic expressions, the assembler evaluates
the innermost expressions first, and then considers them as arithmetic
terms in the next outer level of expressions. It continues this process
until the outermost expression is evaluated.
- The computed result, including intermediate values, must lie in
the range -231 through +231-1. (If the value
-231 is substituted in a SETC expression, its magnitude,
2147483648, is invalid if substituted in a SETA expression.)