English
Language : 

45111 Datasheet, PDF (71/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
7 The SASM Assembler
All expressions are evaluated at assemble-time only; they are never reevaluated during run-time. This
means symbols for unknowns, such as registers (which change at runtime), can not be included inside
expressions.
All constants and symbols within expressions may be 32-bit numbers and the result of the
expression is a 32-bit number. Since the SX is only an 8-bit processor, care must be taken to extract
the appropriate portion of the result for any particular operation. Table 11 – Unary Operators and
Table 12 – Binary Operators describe the available unary and binary operators for use within expres-
sions.
Table 11 - Unary Operators
Symbol
||
-
~
\
Unary Operation
Absolute value
Negative
Not
Macro assignment
Table 12 - Binary Operators
Symbol
+
-
*
/
//
&
|
^
<<
>>
><
.
()
Binary Operation
Addition
Subtraction
Multiplication
Division
Modulus
Logical AND
Logical OR
Logical XOR
Shift left
Shift right
Reverse bits
Bit address
Sub-expression
Expressions are evaluated strictly from left-to-right, except when parentheses are present. The following
code demonstrates some simple expression usage.
loop_count
table
mov
equ 5*3
ds 5+(2*3)
loop_count+10/5, #%01101
SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc. • Page 71