Professional Documents
Culture Documents
Macro
Macro
www.tutors161.com
Definition
2
Abbreviation for a group of statements Concept of re-usability Saves time of developer Saves space for developer Causes extra processing Separate processor module is required
www.tutors161.com
Structure of Macro
3
www.tutors161.com
Termnology
4
www.tutors161.com
Macro Call
5
at particular location can be defined as macro call. Example: Using 100 A DS 10 Macro_Name End
www.tutors161.com
Macro Expansion
6
AIF
AIF
is a conditional branch pseudo-op which performs an arithmetic test and branches only if the tested condition is true. is unconditional branch pseudo-op. It is similar to GOTO statement. Which is used to jump to particular instruction label in the program.
AGO
AGO
www.tutors161.com
Example:
MACRO ADD1&ARG L A ST MEND MACRO ADDS ADD1&ARG1 ADD1&ARG2 ADD1&ARG3 MEND
www.tutors161.com
Example of MACRO DEFINITION within Another MACRO DEFINITION MACRO DEFINE &SUB MACRO &SUB &Y CNOP 0,4 BAL 1,*+8 DC A(&Y) L 15,=V(&SUB) BALR 14,15 MEND MEND Example of MACRO CALL defining MACRO DEFINE COS
www.tutors161.com