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.

LookaheadLookahead mode ends when the desired symbol or sequence symbol is found, orwhen the END statement or end of file is reached. All statements read bylookahead are saved on an internal file, and are fully processed when thelookahead scan ends.If a COPY instruction is encountered during lookahead, it is fully processed at thattime, the assembler copies the statements from the library, scans them, and savesthem on the lookahead file. When lookahead mode has ended any COPYinstructions saved to the lookahead file are ignored, as the statements from thecopy member have already been read and saved to the lookahead file.If a variable symbol is used for the member name of a COPY that is expandedduring lookahead, the value of the variable symbol at the time the COPY isexpanded is used.For purposes of attribute definition, a symbol is considered partially defined if itdepends in any way upon a symbol not yet defined. For example, if the symbol isdefined by a forward EQU that is not yet resolved, that symbol is assigned a typeattribute of U.In this case, it is quite possible that, by the end of the assembly, the type attributehas changed to some other value.Generating END statementsBecause no variable symbol substitution is carried out during lookahead, youshould consider the following effects of using macro, AINSERT or open codesubstitution to generate END statements that separate source modules assembledin one job step (BATCH assembler option). If a symbol is undefined within amodule, lookahead might read statements past the point where the END statementis to be generated. Lookahead stops when:1. It finds the symbol2. It finds an END statement3. It reaches the end of the source input data setLookaheadIn the first two cases, the assembler begins the next module at the statement afterlookahead stopped, which could be after the point where you wanted to generatethe END statement.restrictionsThe assembler analyzes the statements it processes during lookahead, only toestablish attributes of symbols in their name fields.Variable symbols are not replaced. Modifier expressions are evaluated only if allsymbols involved were defined prior to lookahead. Possible multiple orinconsistent definition of the same symbol is not diagnosed during lookaheadbecause conditional assembly may eliminate one (or more) of the definitions.Lookahead does not check undefined operation codes against library macro names.If the name field contains an ordinary symbol and the operation code cannot bematched with one in the current operation code table, then the ordinary symbol isassigned the type attribute of M. If the operation code contains special charactersor is a variable symbol, a type attribute of U is assumed. This may be wrong if theundefined operation code is later substituted with a known operation code or isChapter 9. How to write conditional assembly instructions 337

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

Saved successfully!

Ooh no, something went wrong!