Specifications

15-6 Programmer’s Guide Sega
Psy-Q Development System
Macros A macro is a symbolic name which is equated to a piece of text. A reference to that
name can then be made and will be expanded to the assigned text. Macros take the
form:
name
=
text
The text of the macro starts at the first non-blank character after the equals sign (
= ), and ends at the end of the line.
Case is significant in macro names.
Macro names may be redefined at any point.
If a macro definition refers to another macro, expansion takes place at time of
usage.
A macro used in a rule is expanded immediately.
Examples FLAGS = /p /s
...
.68K.bin:
ASM68K $(FLAGS) /p $*,$*
The $(FLAGS) in the ASM68K command will be replaced with /p /s.
Pre-defined macros:
The following pre-defined macros all begin with a dollar sign and are intended to aid
file usage:
$d Defined Test Macro, e.g.:
!if $d(MODEL)
# if MODEL is defined ...
$* Base file name with path, e.g. C:\PSYQ\TEST
$< full file name with path, e.g. C:\PSYQ\TEST.S
$: path only, e.g. C:\PSYQ
$. full file name, no path, e.g. TEST.S
$& base file name, no path, e.g. TEST
The filename pre-defined macros can only be used in command lists of dependency
and implicit rules.