The assembler uses 32-bit signed arithmetic to evaluates expressions; it does not check for arithmetic overflow.
As different processors use different operators, the assembler uses an expression syntax similar to that of the C language. Expressions use C operators and follow C rules for parentheses and associativity.
Expression Operators lists the expression operators that the assembler supports.
| Category | Operator | Description |
|---|---|---|
| Binary | + | add |
| - | subtract | |
| * | multiply | |
| / | divide | |
| % | modulo | |
| || | logical OR | |
| && | logical AND | |
| | | bitwise OR | |
| & | bitwise AND | |
| ^ | bitwise XOR | |
| << | shift left | |
| >> | shift right (zeros are shifted into high order bits) | |
| == | equal to | |
| != | not equal to | |
| <= | less than or equal to | |
| >= | greater than or equal to | |
| >= | greater than or equal to | |
| < | less than | |
| @ | at | |
| Unary | + | unary plus |
| - | unary minus | |
| ~ | unary bitwise complement | |
| Alternate | <> | not equal to |
| % | modulo | |
| | | logical OR | |
| || | logical XOR |
Operator precedence is: