Specifications

Saturn Macros 5-5
Psy-Q Development System
Special Parameters
There are a number of special parameter formats available in macros, as follows:
Converting Integers to Text
The parameters \# and \$ replace the decimal (#) or hex ($) value of the symbol
following them, with their character representation. Commonly, this technique is used
to access Run Date and Time:
Example org $1006
RunTime dc.b "\#_hours:\#_minutes:&
\#_seconds"
this expands to the form hh:mm:ss, as follows
RunTime dc.b "21:08:49"
Generating Unique Labels
The parameter \@ can be used as the last characters of a label name in a macro.
When the macro is invoked, this will be expanded to an underscore followed by a
decimal number; this number is increased on each subsequent invocation to give a
unique label.
Example Slots macro
moveq #0,d0
move.1 r1,\1
beq.s dun@
next\@ addq.w #1, d0
bgt.s
dun\@ move.w d0,2
endm
...
Slots freeob1,numslot1w
Each time the Slots macro is used, new labels in the form next_001 and dun_001 will
be generated.