22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

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

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

Terms, Literals, and Expressions<br />

Terms, Literals, and Expressions<br />

The most basic element of the assembler language is the term. Terms may be<br />

used alone, or in combination with other terms in expressions. This section<br />

describes the different types of terms used in the assembler language, and how<br />

they can be used.<br />

Terms<br />

A term is the smallest element of the assembler language that represents a distinct<br />

and separate value. It can, therefore, be used alone or in combination with other<br />

terms to form expressions. Terms are classified as absolute or relocatable,<br />

depending on the effect of program relocation upon them. Program relocation is<br />

the loading of the object program into storage locations other than those originally<br />

assigned by the assembler. Terms have absolute or relocatable values that are<br />

assigned by the assembler or that are inherent in the terms themselves.<br />

A term is absolute if its value does not change upon program relocation. A term is<br />

relocatable if its value changes by n if the origin of the control section in which it<br />

appears is relocated by n bytes.<br />

Terms in Parentheses: Terms in parentheses are reduced to a single value; thus<br />

the terms in parentheses, in effect, become a single term.<br />

You can use arithmetically combined terms, enclosed in parentheses, in<br />

combination with terms outside the parentheses, as follows:<br />

14+BETA-(GAMMA-LAMBDA)<br />

When the assembler encounters terms in parentheses in combination with other<br />

terms, it first reduces the combination of terms inside the parentheses to a single<br />

value which may be absolute or relocatable, depending on the combination of<br />

terms. This value is then used in reducing the rest of the combination to another<br />

single value.<br />

You can include terms in parentheses within a set of terms in parentheses:<br />

A+B-(C+D-(E+F)+1)<br />

The innermost set of terms in parentheses is evaluated first. Any number of levels<br />

of parentheses are allowed. A level of parentheses is a left parenthesis and its<br />

corresponding right parenthesis. An arithmetic combination of terms is evaluated<br />

as described in “Expressions” on page 44. Figure 12 summarizes the various<br />

types of terms, and gives a reference to the page number that discusses the term<br />

and the rules for using it.<br />

Figure 12 (Page 1 of 2). Summary of Terms<br />

Terms<br />

Term<br />

can be<br />

absolute<br />

Term can<br />

be<br />

relocatable<br />

Value is<br />

assigned<br />

by<br />

assembler<br />

Value is<br />

inherent<br />

in term<br />

Symbols X X X 29<br />

| Literals<br />

X<br />

X<br />

X<br />

41<br />

Self-defining terms X X 34<br />

Page<br />

reference<br />

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