Redefining conditional assembly instructions
A redefinition of a conditional assembly instruction only comes into effect in macro definitions occurring after the OPSYN instruction. The original definition is always used when a macro instruction calls a macro that was defined and edited before the OPSYN instruction.
MACRO Macro header
MAC ... Macro prototype
AIF ...
MVC ...
.
MEND Macro trailer
.
AIF OPSYN AGO Assign AGO properties to AIF
MVC OPSYN MVI Assign MVI properties to MVC
.
MAC ... Macro call
(AIF interpreted as AIF instruct-
ion; generated AIFs not printed)
+ MVC ... Interpreted as MVI instruction
.
. Open code started at this point
AIF ... Interpreted as AGO instruction
MVC ... Interpreted as MVI instruction
In this example, AIF and MVC instructions are used in a macro definition. AIF is a conditional assembly instruction, and MVC is a machine instruction. OPSYN instructions are used to assign the properties of AGO to AIF and to assign the properties of MVI to MVC. In subsequent calls of the macro MAC, AIF is still defined, and used, as an AIF operation, but the generated MVC is treated as an MVI operation. In open code following the macro call, the operations of both instructions are derived from their new definitions assigned by the OPSYN instructions. If the macro is redefined (by another macro definition), the new definitions of AIF and MVC (that is, AGO and MVI) are used for further generations.