Chapter 11 Writing Macro Control Statements
Purging Macro Definitions (purge) 217
11.7 Purging Macro Definitions (purge)
Syntax
purge macro_name (, macro_name)...
Functional description
The purge directive purges the definitions of the specified macro names.
Coding rules
The macro names specified with the purge directive are valid for previously defined macro names.
After the purge directive, purged macros will not be expanded even if they are called. They will be
processed as instructions or symbols.
The purge directive cannot be used within macro definitions.
When multiple macro names are specified, they are delimited by commas (,).
Usage example
The following example illustrates the use of the purge control statement.
The above example contains two definitions for the same macro name. The first instance of mac1 ex-
pands to a mov instruction. After the purge control statement, the second definition for mac1 takes ef-
fect.
mac1 macro p1, p2
mov p1, p2
endm
_TEXT section CODE, PUBLIC, 1
mac1 0, A1
purge mac1
mac1 macro p1, p2
add p1, p2
endm
mac1 1, A1