English
Language : 

45111 Datasheet, PDF (62/184 Pages) List of Unclassifed Manufacturers – 14-DAY MONEY BACK GUARANTEE
7 The SASM Assembler
If the ZSTR format is used, the Watch window will display all bytes up to a byte equal to zero, or up to
the maximum length (specified by the count argument).
The values in the Watch window can be modified just like registers in the Registers window. See
Modifying Registers During Debugging in Chapter 5.1.5 for more information.
7.4 Macros
Macros enhance the capabilities of the assembly language by allowing a user to collect useful sequences
of instructions such that they may be inserted in a program easily. These sequences may include
parameters that are specified at each invocation to modify the inserted instructions to suit a purpose.
Before a macro can be used, it must be defined. Each macro has a unique name, and may include named
formal parameters, unnamed parameters, or no parameters at all.
A macro is defined with the MACRO, EXITM, and ENDM directives. The MACRO directive names the
macro and describes its parameters. The ENDM directive marks the end of the definition. An EXITM
directive may optionally appear in the macro body to mark a point at which later the use or insertion of
the body will be terminated. The macro body consists of all lines extending from the MARCO directive
to the next ENDM directive.
Macro definitions may not be nested. That is, it is not possible to write a macro which, when invoked,
defines another macro.
7.4.1 The MACRO Directive
The MACRO directive takes one of three forms:
<label>
<label>
<label>
MACRO
MACRO
MACRO
<formal1>[, <formal2>, …]
<count>
In all forms, the label names the macro. Macro names must be unique and follow the rules for any
symbol name.
In the first form, the macro requires a specific number of parameters, which are given symbolic names.
Every invocation must match the number of parameters used in the declaration.
In the second form, requires a specific number of parameters, none of which are named. Use zero for
the count to declare a macro which must not take any parameters when invoked. Every invocation must
match the specified number of parameters.
In the third form, the macro allows a variable number of parameters, none of which are named. Within
the macro body, \0 will be replaced by the number of parameters actually supplied by the invocation.
Page 62 • SX-Key/Blitz Development System Manual 2.0 • Parallax, Inc.