HLASM Language Reference
HLASM Language Reference HLASM Language Reference
LTORG Instruction If symbol is an ordinary symbol or a variable symbol that has been assigned an ordinary symbol, the ordinary symbol is assigned the value of the address of the | first byte of the literal pool. This symbol is aligned on a boundary specified by the | SECTALGN option, and has a length attribute of 1. If bytes are skipped after the end of a literal pool to achieve alignment for the next instruction, constant, or area, | the bytes are not filled with zeros. If the literal pool includes any items that require | quadword alignment and the SECTALGN value defaults to 8, then the assemble of | the literal causes the issue of an ASMA500W message. The assembler ignores the borders between control sections when it collects literals into pools. Therefore, you must be careful to include the literal pools in the control sections to which they belong (for details, see “Addressing Considerations” on page 195). The creation of a literal pool gives the following advantages: Automatic organization of the literal data into sections that are correctly aligned and arranged so that minimal space is wasted in the literal pool. Assembling of duplicate data into the same area. Because all literals are cross-referenced, you can find the literal constant in the pool into which it has been assembled. Literal Pool A literal pool is created under the following conditions: Immediately after a LTORG instruction. If no LTORG instruction is specified, and no LOCTRs are used in the first control section, a literal pool generated after the END statement is created at the end of the first control section, and appears in the listing after the END statement. If no LTORG instruction is specified, and LOCTRs are used in the first control section, a literal pool generated after the END statement is created at the end of the most recent LOCTR segment of the first section, and appears in the listing after the END statement. To force the literal pool to the end of the control section when using LOCTRs, you must resume the last LOCTR of the CSECT before the LTORG statement (or before the END statement if no LTORG statement is specified). Each literal pool has five segments into which the literals are stored (a) in the order that the literals are specified, and (b) according to their assembled lengths, which, for each literal, is the total explicit or implied length, as described below. | The first segment contains all literal constants whose assembled lengths are a | multiple of 16. The second segment contains those whose assembled lengths are a multiple of 8, but not of 16. The third segment contains those whose assembled lengths are a multiple of 4, but not a multiple of 8. The fourth segment contains those whose assembled lengths are even, but not a multiple of 4. 194 HLASM V1R5 Language Reference
LTORG Instruction The fifth segment contains all the remaining literal constants whose assembled lengths are odd. | Since each literal pool is aligned on a SECTALGN alignment, this guarantees that | all literals in the second segment are doubleword aligned; in the third segment, | fullword aligned; and, in the fourth, halfword aligned. The minimum value of | SECALGN is doubleword, so quadword alignment is not guaranteed. No space is wasted except, possibly, at the origin of the pool, and in aligning to the start of the statement following the literal pool. Literals from the following statements are in the pool, in the segments indicated by the parenthesized numbers: FIRST START . MVC TO,=3F'9' (3) AD 2,=D'7' (2) IC 2,=XL1'8' (5) MVC MTH,=CL3'JAN' (5) LM 4,5,=2F'1,2' (2) AH 5,=H'33' (4) L 2,=A(ADDR) (3) MVC FIVES,=XL16'5' (1) Addressing Considerations If you specify literals in source modules with multiple control sections, you should: Write a LTORG instruction at the end of each control section, so that all the literals specified in the section are assembled into the one literal pool for that section. If a control section is divided and interspersed among other control sections, you should write a LTORG instruction at the end of each segment of the interspersed control section. When establishing the addressability of each control section, make sure (a) that all of the literal pool for that section is also addressable, by including it within a USING range, and (b) that the literal specifications are within the corresponding USING domain. The USING range and domain are described in “USING Instruction” on page 218. All the literals specified after the last LTORG instruction, or, if no LTORG instruction is specified, all the literals in a source module are assembled into a literal pool at the end of the first control section. You must then make this literal pool addressable, along with the addresses in the first control section. This literal pool is printed in the program listing after the END instruction. Duplicate Literals If you specify duplicate literals within the part of the source module that is controlled by a LTORG instruction, only one literal constant is assembled into the pertinent literal pool. This also applies to literals assembled into the literal pool at the end of the first or only control section of a source module that contains no LTORG instructions. Literals are duplicates only if their specifications are identical, not if the object code assembled happens to be identical. Chapter 5. Assembler Instruction Statements 195
- Page 164 and 165: DC Instruction—Character Constant
- Page 166 and 167: DC Instruction—Graphic Constant r
- Page 168 and 169: DC Instruction—Fixed-Point Consta
- Page 170 and 171: DC Instruction—Fixed-Point Consta
- Page 172 and 173: DC Instruction—Decimal Constants
- Page 174 and 175: DC Instruction—Address Constants
- Page 176 and 177: DC Instruction—Address Constants
- Page 178 and 179: DC Instruction—Offset Constant re
- Page 180 and 181: DC Instruction—Length Constant Le
- Page 182 and 183: DC Instruction—Hexadecimal Floati
- Page 184 and 185: DC Instruction—Hexadecimal Floati
- Page 186 and 187: DC Instruction—Hexadecimal Floati
- Page 188 and 189: DC Instruction—Binary Floating-Po
- Page 190 and 191: DC Instruction—Binary Floating-Po
- Page 192 and 193: DROP Instruction DROP Instruction T
- Page 194 and 195: DS Instruction USING DSECTA,14 ALBL
- Page 196 and 197: DS Instruction The size of a storag
- Page 198 and 199: DSECT Instruction DSECT Instruction
- Page 200 and 201: DXD Instruction ASEMBLY2 CSECT USIN
- Page 202 and 203: END Instruction change but no addit
- Page 204 and 205: EQU Instruction EQU Instruction The
- Page 206 and 207: EQU Instruction 5. The length attri
- Page 208 and 209: EXITCTL Instruction sequence_symbol
- Page 210 and 211: ISEQ Instruction must be greater th
- Page 212 and 213: LOCTR Instruction A CSECT , See not
- Page 216 and 217: MNOTE Instruction When two literals
- Page 218 and 219: OPSYN Instruction ,ERROR, SEV 1 An
- Page 220 and 221: ORG Instruction AFTER is defined in
- Page 222 and 223: ORG Instruction If you specify mult
- Page 224 and 225: POP Instruction POP Instruction The
- Page 226 and 227: PRINT Instruction Note: If the next
- Page 228 and 229: Process Statement Process Statement
- Page 230 and 231: REPRO Instruction NOPRINT instructs
- Page 232 and 233: RSECT Instruction 4. AMODE or RMODE
- Page 234 and 235: START Instruction START Instruction
- Page 236 and 237: TITLE Instruction The name value is
- Page 238 and 239: USING Instruction Only the characte
- Page 240 and 241: USING Instruction Base Registers fo
- Page 242 and 243: USING Instruction If register 0 is
- Page 244 and 245: USING Instruction A variable symbo
- Page 246 and 247: USING Instruction In this MVC instr
- Page 248 and 249: USING Instruction Range of a Depend
- Page 250 and 251: XATTR Instruction external_symbol i
- Page 252 and 253: XATTR Instruction SCOPE ►►─
- Page 254 and 255: XATTR Instruction 234 HLASM V1R5 La
- Page 256 and 257: Part 3. Macro Language &SYSDATC Sys
- Page 258 and 259: Introduction to Macro Language Chap
- Page 260 and 261: Introduction to Macro Language The
- Page 262 and 263: Introduction to Macro Language Macr
LTORG Instruction<br />
The fifth segment contains all the remaining literal constants whose assembled<br />
lengths are odd.<br />
| Since each literal pool is aligned on a SECTALGN alignment, this guarantees that<br />
| all literals in the second segment are doubleword aligned; in the third segment,<br />
| fullword aligned; and, in the fourth, halfword aligned. The minimum value of<br />
| SECALGN is doubleword, so quadword alignment is not guaranteed. No space is<br />
wasted except, possibly, at the origin of the pool, and in aligning to the start of the<br />
statement following the literal pool.<br />
Literals from the following statements are in the pool, in the segments indicated by<br />
the parenthesized numbers:<br />
FIRST START <br />
.<br />
MVC TO,=3F'9' (3)<br />
AD 2,=D'7' (2)<br />
IC 2,=XL1'8' (5)<br />
MVC MTH,=CL3'JAN' (5)<br />
LM 4,5,=2F'1,2' (2)<br />
AH 5,=H'33' (4)<br />
L 2,=A(ADDR) (3)<br />
MVC FIVES,=XL16'5' (1)<br />
Addressing Considerations<br />
If you specify literals in source modules with multiple control sections, you should:<br />
Write a LTORG instruction at the end of each control section, so that all the<br />
literals specified in the section are assembled into the one literal pool for that<br />
section. If a control section is divided and interspersed among other control<br />
sections, you should write a LTORG instruction at the end of each segment of<br />
the interspersed control section.<br />
When establishing the addressability of each control section, make sure (a) that<br />
all of the literal pool for that section is also addressable, by including it within a<br />
USING range, and (b) that the literal specifications are within the corresponding<br />
USING domain. The USING range and domain are described in “USING<br />
Instruction” on page 218.<br />
All the literals specified after the last LTORG instruction, or, if no LTORG instruction<br />
is specified, all the literals in a source module are assembled into a literal pool at<br />
the end of the first control section. You must then make this literal pool<br />
addressable, along with the addresses in the first control section. This literal pool<br />
is printed in the program listing after the END instruction.<br />
Duplicate Literals<br />
If you specify duplicate literals within the part of the source module that is<br />
controlled by a LTORG instruction, only one literal constant is assembled into the<br />
pertinent literal pool. This also applies to literals assembled into the literal pool at<br />
the end of the first or only control section of a source module that contains no<br />
LTORG instructions.<br />
Literals are duplicates only if their specifications are identical, not if the object code<br />
assembled happens to be identical.<br />
Chapter 5. Assembler Instruction Statements 195