All operators evaluate from left to right except for the unary operators, which evaluate from right to left.
The assembler provides the following unary operators:
|~||one's complement (unary)|
The assembler provides the following binary operators:
||||bitwise inclusive or|
|^||bitwise exclusive or|
Parentheses can be used in expressions to change the order in which the assembler evaluates the expression. Operations within parentheses are performed before operations outside parentheses. Where nested parentheses are involved, processing starts with the innermost set of parentheses and proceeds outward.
Operator precedence for 32-bit expressions is shown in the following figure.
In 32-bit mode, all the operators perform 32-bit signed integer operations. In 64-bit mode, all computations are performed using 64-bit signed integer operations.
The division operator produces an integer result; the remainder has the same sign as the dividend. For example:
The left shift (<) and right shift (>) operators take an integer bit value for the right-hand operand. For example:
.set newdata,mydata<2 # Shifts 1 left 2 bits. # Assigns the result to newdata.
The atof subroutine.
The .comm pseudo-op, .csect pseudo-op, .double pseudo-op, .dsect pseudo-op, .float pseudo-op, .lcomm pseudo-op, .tc pseudo-op, .toc pseudo-op, .tocof pseudo-op.