11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Prototype statement|||||specified operation code has been defined earlier in the program as a macro, inthe operation code of a library macro, or defined in an OPSYN instruction asequivalent to another operation code.Macros that are defined inline may use any ordinary symbol, up to 63characters in length, for the operation field. However, operating system rulesmay prevent some of these macros from being stored as member names in alibrary.The assembler requires that the library member name and macro name be thesame; otherwise error diagnostic message ASMA126S Library macro nameincorrect is issued.symbolic_parameterThe symbolic parameters are used in the macro definition to represent theoperands of the corresponding macro instruction. A description of symbolicparameters appears under “Symbolic parameters” on page 250.The operand field in a prototype statement lets you specify positional orkeyword parameters. These parameters represent the values you can pass fromthe calling macro instruction to the statements within the body of a macrodefinition.The operand field of the macro prototype statement must contain 0 to 32000symbolic parameters separated by commas. They can be positional parametersor keyword parameters, or both.If no parameters are specified in the operand field and if the absence of theoperand entry is indicated by a comma preceded and followed by one or morespaces, remarks are allowed.The following is an example of a prototype statement:&NAME MOVE &TO,&FROMAlternative formats for the prototype statementThe prototype statement can be specified in one of the following three ways:v The normal way, with all the symbolic parameters preceding any remarksv An alternative way, allowing remarks for each parameterv A combination of the first two waysThe continuation rules for macro instructions are different from those for machineor assembler instruction statements. This difference is important for those whowrite macros that override a machine/assembler mnemonic.The following examples show the normal statement format (&NAME1), the alternativestatement format (&NAME2), and a combination of both statement formats (&NAME3):Opera-Name tion Operand Comment Cont.&NAME1 OP1 &OPERAND1,&OPERAND2,&OPERAND3 This is the normal Xstatement format&NAME2 OP2 &OPERAND1, This is the alter- X&OPERAND2 native statement format&NAME3 OP3 &OPERAND1, This is a combination X&OPERAND2,&OPERAND3, of both X&OPERAND4244 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!