11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

Create successful ePaper yourself

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

Terms, literals, and expressions4. In parenthesized expressions, the assembler evaluates the innermostexpressions first and then considers them as terms in the next outer level ofexpressions. It continues this process until the outermost expression isevaluated.5. A term or expression’s intermediate value and computed result must lie in therange of −2 31 through +2 31 −1.The assembler evaluates paired relocatable terms at each level of expressionnesting.Absolute and relocatable expressionsAn expression is absolute if its value is unaffected by program relocation. Anexpression is relocatable if its value depends upon program relocation. The twotypes of expressions, absolute and relocatable, take on these characteristics fromthe term or terms composing them. A description of the factors that determinewhether an expression is absolute or relocatable follows.Absolute expression: An absolute expression is one whose value remains thesame after program relocation. The value of an absolute expression is called anabsolute value.||An expression is absolute, and is reduced to a single absolute value if theexpression:1. Comprises a symbol with an absolute value, a self-defining term, or a symbollength attribute reference, or any arithmetic combination of absolute terms.The absolute terms may include Integer and Scale attributes, but not Typeattributes.2. Contains relocatable terms alone or in combination with absolute terms, and ifall these relocatable terms are paired.Relocatability attribute: The relocatability attribute describes the attribute of arelocatable term. If a pair of terms are defined in the same control section, they arecharacterized as having the same relocatability attribute.If the terms are defined in different control sections, or have different relocatabilityattributes, the expression is said to be “complex relocatable”.The relocatability attribute is the same as the ESDID for external symbols, and the“Relocation ID” in the listing.Paired relocatable terms: An expression can be absolute even though it containsrelocatable terms, provided that all the relocatable terms are paired. The pairing ofrelocatable terms cancels the effect of relocation.The assembler reduces paired terms to single absolute terms in the intermediatestages of evaluation. The assembler considers relocatable terms as paired under thefollowing conditions:v The paired terms must have the same relocatability attribute.v The paired terms must have opposite signs after all unary operators areresolved. In an expression, the paired terms do not have to be contiguous (thatis, other terms can come between the paired terms).The following examples show absolute expressions. A is an absolute term; X and Yare relocatable terms with the same relocatability:46 <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!