Page 101 - DCAP507_SYSTEM_SOFTWARE
P. 101
Unit 7: Macro Language
Arguments from the macro invocation are replaced for the parameters in the macro prototype. Notes
The arguments and parameters are related with one another according to their
positions.
The first argument in the macro invocation communicates to the first parameter
in the macro prototype, etc.
Comment lines inside the macro body have been deleted, but comments on individual
statements have been preserved.
Did u know? Macro invocation statement itself has been incorporated as a comment line.
Example of a macro expansion
In expanding the macro invocation on line 190, the argument F1 is replaced for the
parameter and INDEV wherever it appears in the body of the macro.
Likewise BUFFER is substituted for BUFADR and LENGTH is substituted for RECLTH.
Lines 190a via 190m show the complete expansion of the macro invocation on line 190.
The label on the macro invocation statement CLOOP has been preserved as a label on the
first statement generated in the macro expansion.
This permits the programmer to use a macro instruction in exactly the same manner as an
assembler language mnemonic.
After macro processing the expanded file can be used as input to assembler.
The macro invocation statement will be considered as comments and the statements
produced from the macro expansions will be assembled precisely as though they had been
written directly by the programmer.
LOVELY PROFESSIONAL UNIVERSITY 95