III.11.1 Simple Callable Macros
Macros must first be defined, before they can be called in a program.
A simple macro definition consists of the macro name, which can be defined
with the keyword MACRO, the macro body, and a final ENDM (end macro)
<macro name> MACRO
<body line 1>
<body line 2>
<body line m>
The macro name must be a valid, unique symbol. It cannot be redefined later.
Keywords cannot be used as macro names.
The macro body may comprise any number of lines. Body lines may be all kinds
of assembler instructions, pseudo instructions, controls, meta instructions,
macro calls and even further macro definitions.
The macro body and the whole macro definition is terminated with the ENDM
Macros must be defined, before they can be called. Forward references to
macros are not allowed. Once defined, a macro can be called by its name in
the subsequent program as often as desired. Whenever a macro is called, the
macro body will be "inserted" into the program and then assembled as normal
source lines. This process is called macro expansion.
MY_FIRST MACRO ;definition
After the call of the macro MY_FIRST, the body lines
are inserted into the program and assembled.