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.

Data attributes|||||||||||&B SETC ’B’AB DC C’A&B’ Valid in ordinary assemblyLAB DC AL1(L’A&B) Valid in ordinary assembly&N SETA L’A&B Invalid in conditional assembly&T1 SETB (L’A&B EQ 2) Invalid in conditional assembly&T2 SETB (2 EQ L’A&B) Invalid in conditional assemblyThe two SETB statements receive different diagnostic messages, because the errorsare detected during different parts of the assembler’s analysis of the SETBexpressions.In conditional assembly statements, the operand of a length attribute referencemust be an ordinary or variable symbol, and not a character expression.The length attribute can also be specified outside conditional assembly instructions.Then, the length attribute value is not available for conditional assemblyprocessing, but is used as a value at assembly time.Figure 38 is an example showing the evaluation of the length attribute for anassembler instruction in statement 1 and for a conditional assembly instruction instatement 8.000000 E740 1 CSYM DC CL(L’ZLOOKAHEAD)’X’ Length resolved later2 &LEN SETA L’CSYM** ASMA042E Length attribute of symbol is unavailable; default=13 DC C’&LEN ’ REAL LENGTH NOT AVAILABLE000002 F140 + DC C’1 ’ REAL LENGTH NOT AVAILABLE4 &TYP SETC T’CSYM5 DC C’&TYP ’ TYPE IS KNOWN000004 C340 + DC C’C ’ TYPE IS KNOWN6 &DEF SETA D’CSYM7 DC C’&DEF ’ SYMBOL IS DEFINED000006 F140 + DC C’1 ’ SYMBOL IS DEFINED8 &LEN SETA L’zlookahead Length resolved immediately9 CSYM2 DC CL(&len)’X’000008 E740 +CSYM2 DC CL(2)’X’10 &LEN SETA L’CSYM211 DC C’&LEN ’ REAL LENGTH NOW AVAILABLE00000A F240 + DC C’2 ’ REAL LENGTH NOW AVAILABLE00000C 0001 12 ZLOOKAHEAD DC H’1’13 ENDFigure 38. Evaluation of length attribute referencesIn statement 2 the length of CSYM has not been established because the definition ofCSYM in statement 1 is not complete. The reference to the length attribute results ina length of 1 and error message ASMA042E. However, statement 5 shows that thetype attribute is assigned, and statement 7 shows that the defined attribute isassigned. In comparison, the length attribute for symbol CSYM2 is availableimmediately, as it was retrieved indirectly using the conditional assemblyinstruction in statement 8.During conditional assembly, an ordinary symbol used in the name field of anEQU instruction has a length attribute value that depends on the order of thesymbol’s definition and the reference to its length attribute.v If the first operand of the EQU instruction is a self-defining term, the lengthattribute value is 1.Chapter 9. How to write conditional assembly instructions 329

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

Saved successfully!

Ooh no, something went wrong!