English
Language : 

45111 Datasheet, PDF (72/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
7 The SASM Assembler
The second expression, above, will evaluate to 11; the expression within parentheses is evaluated first.
The third expression, loop_count+10/5, will evaluate to 5; 15 + 10 = 25 / 5 = 5.
7.8 Data Types
The assembler “understands” four data types: decimal, binary, hexadecimal and ASCII. Table 13 – Data
Types, below, describes these data types and their syntax.
For compatibility reasons, the notations xxxxb and xxxxh are also accepted for the binary and
hexadecimal data types, respectively. It is suggested that all new SX assembly code use the notation
listed in Table 13 – Data Types.
Any numbers that evaluate to a result greater than 32-bits wide will cause an error at assemble time.
The largest number allowed is
4_294_967_295 decimal,
$FFFF_FFFF hexadecimal, or
%1111_1111_1111_1111_1111_1111_1111_1111 binary.
Table 13 - Data Types
Data Type
Decimal
Binary
Hexadecimal
ASCII
Syntax
Xxxx
%xxxx
$xxxx
‘x’
Example
1250
%01101010
$1AC6
‘S’
7.9 The __SASM Pre-Defined Constant
SASM has an internal pre-defined constant named
__SASM
(note that there are two leading underscores in the name). This allows the preparation of source code
that can contain SASM-specific code, and code that might be relevant for another SX assembler (like the
Parallax assembler) by using an IFDEF…ELSE…ENDIF block. Here is an example:
ifdef __SASM
DEVICE STACKX
IRC_CAL IRC_SLOW
else
DEVICE STACKX_OPTIONX
endif
Page 72 • SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc.