HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

Terms, Literals, and Expressions The following examples show absolute expressions. are relocatable terms with the same relocatability: A-Y+X A AA X-Y+A | (+)-(+) | - A is an absolute term; X and Y A reference to the location counter must be paired with another relocatable term from the same control section; that is, with the same relocatability. For example: -Y Relocatable Expression: A relocatable expression is one whose value changes by n if the origin of the control section in which it appears is relocated n bytes. A relocatable expression can be a single relocatable term. The assembler reduces a relocatable expression to a single relocatable value if the expression: 1. Is composed of a single relocatable term, or 2. Contains relocatable terms, alone or in combination with absolute terms, and a. All the relocatable terms but one are paired. Note that the unpaired term gives the expression a relocatable value; the paired relocatable terms and other absolute terms constitute increments or decrements to the value of the unpaired term. b. The relocatability attribute of the whole expression is that of the unpaired term. c. The sign preceding the unpaired relocatable term must be positive, after all unary operators have resolved. The following examples show relocatable expressions. A is an absolute term, W and X are relocatable terms with the same relocatability attribute, and Y is a relocatable term with a different relocatability attribute. Y–32A W–X+ =F'1234' (literal) (reference to W–X+W Y location counter) W–X+Y AA+W–W+Y Complex Relocatable Expressions: Complex relocatable expressions, unlike relocatable expressions, can contain: Two or more unpaired relocatable terms An unpaired relocatable term preceded by a negative sign | Using the same symbols, the following are examples of complex relocatable | expressions: | W+X + | X-Y A-W+Y Complex relocatable expressions are used in A-type and Y-type address constants to generate address constant values. For more details, refer to “Complex Relocatable Expressions”, and “Address Constants—A and Y” on page 153. V-type and S-type constants may not contain complex relocatable expressions. 48 HLASM V1R5 Language Reference

Terms, Literals, and Expressions You can assign a complex relocatable value to a symbol using the EQU instruction, as described on page 184. Chapter 2. Coding and Structure 49

Terms, Literals, and Expressions<br />

You can assign a complex relocatable value to a symbol using the EQU instruction,<br />

as described on page 184.<br />

Chapter 2. Coding and Structure 49

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

Saved successfully!

Ooh no, something went wrong!