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.

Prototype Statement<br />

Macros that are defined inline may use any ordinary symbol, up to 63<br />

characters in length, for the operation field. However, operating system rules<br />

may prevent some of these macros from being stored as member names.<br />

The assembler requires that the library member name and macro name be the<br />

same; otherwise error diagnostic message ASMA126S Library macro name<br />

incorrect is issued.<br />

symbolic_parameter<br />

The symbolic parameters are used in the macro definition to represent the<br />

operands of the corresponding macro instruction. A description of symbolic<br />

parameters appears under “Symbolic Parameters” on page 253.<br />

The operand field in a prototype statement lets you specify positional or<br />

keyword parameters. These parameters represent the values you can pass<br />

from the calling macro instruction to the statements within the body of a macro<br />

definition.<br />

The operand field of the macro prototype statement must contain 0 to 32000<br />

symbolic parameters separated by commas. They can be positional<br />

parameters or keyword parameters, or both.<br />

If no parameters are specified in the operand field and if the absence of the<br />

operand entry is indicated by a comma preceded and followed by one or more<br />

spaces, remarks are allowed.<br />

The following is an example of a prototype statement:<br />

&NAME MOVE &TO,&FROM<br />

Alternative Formats for the Prototype Statement<br />

The prototype statement can be specified in one of the following three ways:<br />

The normal way, with all the symbolic parameters preceding any remarks<br />

An alternative way, allowing remarks for each parameter<br />

A combination of the first two ways<br />

The continuation rules for macro instructions are different from those for machine or<br />

assembler instruction statements. This difference is important for those who write<br />

macros that override a machine/assembler mnemonic.<br />

The following examples show the normal statement format (&NAME1), the alternative<br />

statement format (&NAME2), and a combination of both statement formats (&NAME3):<br />

Opera-<br />

Name tion Operand Comment Cont.<br />

&NAME1 OP1 &OPERAND1,&OPERAND2,&OPERAND3 This is the normal X<br />

statement format<br />

&NAME2 OP2 &OPERAND1, This is the alter- X<br />

&OPERAND2<br />

native statement format<br />

&NAME3 OP3 &OPERAND1, This is a combination X<br />

&OPERAND2,&OPERAND3, of both X<br />

&OPERAND4<br />

246 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!