English
Language : 

45111 Datasheet, PDF (53/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
7 The SASM Assembler
7.3.11 The ID Directive
The ID (identification) directive is used to write up to eight bytes of text into the ID word of the SX chip.
This is used to record a version number or other unique identification for the code. This ID word can be
read out of the SX chip at any time, regardless of the code protect setting. The line below will write
GPXv2.1 into the ID word:
ID
‘GPXv2.1’
7.3.12 The IF…ELSE…ENDIF Directive
The IF...ELSE directive is used to create conditional assembly blocks. A conditional assembly block is
source code that is assembled only if the specified condition is true; otherwise, the code block is ignored
by the assembler. Conditional assembly allows for easy code customization for multiple applications.
For example, it might be necessary to produce a number of related products all based upon the same
main source code but each having a small portion of unique code. The syntax for the IF...ELSE directive
is:
IF
{ELSE
ENDIF
condition
codeblock
codeblock}
Note that the ELSE block is optional and the ENDIF is required to end the conditional block. The
comparison operators for the condition argument are listed in Table 8 – Comparison Operators, below.
Table 8 – Comparison Operators
Symbol
=
<>
<
>
<=
>=
Operation
Equal
Not equal
Less than
Greater than
Less than or equal
Greater than or equal
SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc. • Page 53