HLASM Language Reference
HLASM Language Reference HLASM Language Reference
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
- Page 18 and 19: ▌C▐ The item referred to by ▌
- Page 20 and 21: Miscellany The ASCII translation t
- Page 22 and 23: Part 1. Assembler Language—Struct
- Page 24 and 25: Language Compatibility Language Com
- Page 26 and 27: Assembler Program Assembler Program
- Page 28 and 29: Relationship of Assembler to Operat
- Page 30 and 31: Coding Made Easier Linkage between
- Page 32 and 33: Character Set Compatibility with Ea
- Page 34 and 35: Assembler Language Coding Conventio
- Page 36 and 37: Assembler Language Coding Conventio
- Page 38 and 39: Assembler Language Coding Conventio
- Page 40 and 41: Assembler Language Coding Conventio
- Page 42 and 43: Assembler Language Structure Condit
- Page 44 and 45: Assembler Language Structure Machin
- Page 46 and 47: Assembler Language Structure Condit
- Page 48 and 49: Terms, Literals, and Expressions Te
- Page 50 and 51: Terms, Literals, and Expressions -
- Page 52 and 53: Terms, Literals, and Expressions As
- Page 54 and 55: Terms, Literals, and Expressions Se
- Page 56 and 57: Terms, Literals, and Expressions Fo
- Page 58 and 59: Terms, Literals, and Expressions I
- Page 60 and 61: Terms, Literals, and Expressions Th
- Page 62 and 63: Terms, Literals, and Expressions 1.
- Page 64 and 65: Terms, Literals, and Expressions
- Page 66 and 67: Terms, Literals, and Expressions
- Page 70 and 71: | Chapter 3. Program Structures and
- Page 72 and 73: Source Module A source module is co
- Page 74 and 75: The CSECT instruction can be used a
- Page 76 and 77: | in linker control statements for
- Page 78 and 79: This is not only convenient, but it
- Page 80 and 81: | SECT_A CSECT , Define section SEC
- Page 82 and 83: | For executable sections, the loca
- Page 84 and 85: Addressing | The System/390® and z
- Page 86 and 87: Addressing | Parts must always be r
- Page 88 and 89: Addressing Literal Pools ALPHA LR 3
- Page 90 and 91: Addressing If the symbol is the nam
- Page 92 and 93: Addressing External Symbol Dictiona
- Page 94 and 95: Addressing 74 HLASM V1R5 Language R
- Page 96 and 97: Part 2. Machine and Assembler Instr
- Page 98 and 99: General Instructions Chapter 4. Mac
- Page 100 and 101: Input/Output Operations For further
- Page 102 and 103: Branching with Extended Mnemonic Co
- Page 104 and 105: Symbolic Operation Codes variations
- Page 106 and 107: Operand Entries Registers You can s
- Page 108 and 109: Operand Entries “Program Structur
- Page 110 and 111: Operand Entries Format │ Coded or
- Page 112 and 113: Examples of Coded Machine Instructi
- Page 114 and 115: Examples of Coded Machine Instructi
- Page 116 and 117: Examples of Coded Machine Instructi
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