Operators
Propeller Assembly code can contain expressions using any operators that are allowed in constant expressions. The table below summarizes all the operators allowed in Propeller Assembly code. Please refer to the Spin Language Reference Operators section on page for detailed descriptions of their functions; page numbers are given in the table.
Constant Expression Math/Logic Operators | ||
---|---|---|
Normal Operator | Is Unary | Description, Page Number |
+ |
| |
+ | ✓ | |
- |
| |
- | ✓ | |
* |
| Multiply, Return Low '*', '*=, multiply and return lower 32 bits (signed) |
** |
| Multiply, Return High '**', '**=', multiply and return upper 32 bits (signed) |
/ |
| Divide '/', '/=' (signed) |
// |
| Modulus '//', '//=' (signed) |
# > |
| Limit Minimum '#>', '#>=' (signed) |
< # |
| Limit Maximum '<#', '<#=' (signed) |
^ ^ | ✓ | |
| | | ✓ | Absolute Value '| |' |
~> |
| |
< | ✓ | Bitwise Decode '|<', decode value (0 - 31) into single-high-bit long |
> | ✓ | Bitwise Encode '>|', encode long into value (0 - 32) as high-bit priority |
<< |
| |
>> |
| |
<- |
| |
-> |
| |
>< |
| |
& |
| |
| | Bitwise OR '|', '|=' | |
^ |
| |
! | ✓ | |
AND |
| Boolean AND 'AND', 'AND=' (promotes non-0 to -1) |
OR |
| Boolean OR 'OR', 'OR=' (promotes non-0 to -1) |
NOT | ✓ | Boolean NOT 'NOT' (promotes non-0 to -1) |
== |
| |
<> |
| |
< |
| Boolean Is Less Than '<', '<=' (signed) |
> |
| Boolean Is Greater Than '>', '>=' (signed) |
=< |
| Boolean Is Equal or Less '=<', '=<=' (signed) |
=> |
| |
@ | ✓ |
Unless otherwise noted, content on this site is licensed under the
Creative Commons Attribution-ShareAlike 4.0 International License.