11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

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

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

Sequence symbolsparameter wherever it is used in the macro definition. The value of thesymbolic parameter is a null character string.Example:MACRO&NAME MOVE &TO,&FROM Statement 1&NAME ST 2,SAVEAREA Statement 2L2,&FROMST2,&TOL2,SAVEAREAMEND------------------------------------------------------------------.SYM MOVE FIELDA,FIELDB Statement 3------------------------------------------------------------------+ ST 2,SAVEAREA Statement 4+ L 2,FIELDB+ ST 2,FIELDA+ L 2,SAVEAREAThe symbolic parameter &NAME is used in the name field of the prototypestatement (Statement 1) and the first model statement (Statement 2). In themacro instruction (Statement 3), a sequence symbol (.SYM) corresponds tothe symbolic parameter &NAME. &NAME is not replaced by .SYM and, therefore,the generated statement (Statement 4) does not contain an entry in thename field.LookaheadSymbol attributes are established in either definition mode or lookahead mode.Definition mode occurs whenever a previously undefined symbol is encountered inthe name field of a statement, or in the operand field of an EXTRN or WXTRNstatement during open code processing. Symbols within a macro definition aredefined when the macro is expanded.Lookahead mode is entered:v When the assembler processes a conditional assembly instruction and encountersan attribute reference (other than D' and O') to an ordinary symbol that is notyet defined.v When the assembler encounters a forward AGO or AIF branch in open code to asequence symbol that is not yet defined.Lookahead is a sequential, statement-by-statement, forward scan over the sourcetext.If the attribute reference is made in a macro, forward scan begins with the firstsource statement following the outermost macro instruction. During lookahead theassembler:v Bypasses macro definition and generationv Does not generate object textv Does not perform open-code variable substitutionv Ignores AIF and AGO branch instructionsv Establishes interim data attributes for undefined symbols it encounters inoperand fields of instructions. The data attributes are replaced when a symbol issubsequently encountered in definition mode.336 <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!