22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Terms, Literals, and Expressions<br />

It can also be specified in literal constants. See “Literals” on page 40. For<br />

example:<br />

| THERE L =3A()<br />

| generates three identical address constants, each with value A(THERE).<br />

| The value of the location counter reference (*) is the same as the value of the<br />

| symbol THERE, the current value of the location counter of the control section<br />

in which the asterisk (*) is specified as a term. The asterisk has the same<br />

value as the address of the first byte of the instruction in which it appears. For<br />

example:<br />

HERE B +8<br />

where the value of is the value of HERE.<br />

For the value of the asterisk in address constants with duplication factors, see<br />

“Subfield 1: Duplication Factor” on page 132 of “DC Instruction” on page 126, and<br />

| “Address Constants—A and Y” on page 153. For a discussion of location counter<br />

| references in literals, see “Subfield 1: Duplication Factor” on page 132.<br />

Symbol Length Attribute <strong>Reference</strong><br />

The length attribute of a symbol may be used as a term. <strong>Reference</strong> to the attribute<br />

is made by coding L' followed by the symbol, as in:<br />

L'BETA<br />

The length attribute of BETA is substituted for the term. When you specify a symbol<br />

length attribute reference, you obtain the length of the instruction or data named by<br />

a symbol. You can use this reference as a term in instruction operands to:<br />

Specify assembler-determined storage area lengths<br />

Cause the assembler to compute length specifications for you<br />

Build expressions to be evaluated by the assembler<br />

The symbol length attribute reference must be specified according to the following<br />

rules:<br />

| The format must be L' immediately followed by a valid symbol (L'SYMBOL), an<br />

| expression (L'SYMBOL+SYMBOL2-SYMBOL7), or the location counter reference (L').<br />

| If the operand is an expression, the length attribute of its leftmost term is used.<br />

| Symbols must be defined in the same source module in which the symbol<br />

length attribute reference is specified.<br />

The symbol length attribute reference can be used in the operand of any<br />

instruction that requires an absolute term. However, it cannot be used in the<br />

form L' in any instruction or expression that requires a previously defined<br />

symbol.<br />

The value of the length attribute is normally the length in bytes of the storage area<br />

required by an instruction, constant, or field represented by a symbol. The<br />

assembler stores the value of the length attribute in the symbol table along with the<br />

address value assigned to the symbol.<br />

When the assembler encounters a symbol length attribute reference, it substitutes<br />

the value of the attribute from the symbol table entry for the symbol specified.<br />

38 <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!