Specifications

Saturn Macros 5-3
Psy-Q Development System
Macro Parameters
Parameters Macro parameters obey the following rules:
The parameters listed on the macro invocation line may appear at any point in the
code declared between the MACRO and ENDM statements. Each parameter is
introduced by a backslash (\); where this may be confused with text from an
EQUS, a backslash may also follow the parameter.
Up to thirty two different parameters are allowed, numbered \0 to \31. \0 is a
special parameter which gives the contents of the size field of the macro directive
when it was invoked, that is, the text after the point symbol (.) This includes not
only .b, .h or .w, but also any text:
Example zed macro
\0
endm
...
zed.nop
will generate a NOP instruction.
Instead of the \0 to \31 format, parameters can be given symbolic names, by their
inclusion as operands to the MACRO directive. The preceding backslash (\) is not
mandatory; however, if there is the possibility of confusion with the surrounding text,
a backslash may be used before and after the symbol name to ensure the expression is
expanded correctly:
Example Position macro A,B,C,Pos,Time
dc.w \Time*(\A*\Pos+\B*\Pos+\C*\Pos)
endm
Surrounding the operand of an invoked macro with greater than and less than signs
(<...>), allows the use of comma and space characters. This does not apply to
Assemblers which use angle brackets as address mode specifiers; in these instances,
backward single quote is used.