22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Levels of Macro Call Nesting<br />

▌2▐<br />

MACRO ┌────┴────┐<br />

OUTER &P1,&P2,&P3<br />

.<br />

.<br />

.<br />

INNER &P1,&P2,&P3<br />

. └────┬────┘<br />

. ▌1▐<br />

.<br />

MEND<br />

MACRO<br />

INNER &Q,&R,&S<br />

.<br />

. ┐<br />

L 3,&Q(1) │<br />

A 3,&Q(2) ├ ▌4▐<br />

ST 3,&Q(3) │<br />

. ┘<br />

.<br />

MVC &R,&S<br />

.<br />

.<br />

MEND<br />

────────────────────────────────────────────────────────────────<br />

START <br />

. ▌5▐<br />

. ┌──┴──┐<br />

OUTER (AREA,F2,SUM),TO,FROM<br />

. └──────┬──────┘<br />

. ▌3▐<br />

.<br />

+ L 3,AREA<br />

+ A 2,F2<br />

+ ST 3,SUM<br />

.<br />

.<br />

+ MVC TO,FROM<br />

.<br />

.<br />

END<br />

Notes:<br />

1. The following inner macro call statement is generated, but not listed unless the<br />

PCONTROL(MCALL) option is specified, or the assembler instruction<br />

ACONTROL MCALL is active:<br />

INNER (AREA,F2,SUM),TO,FROM<br />

Figure 85. Passing Values Through Nesting Levels<br />

Chapter 8. How to Write Macro Instructions 315

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!