HLASM Language Reference
HLASM Language Reference HLASM Language Reference
LOCTR Instruction A CSECT , See note 1 LR 12,15 USING A,12 . B LOCTR , See note 2 . C LOCTR , . B LOCTR , See note 3 . A LOCTR , See note 4 . DUM DSECT , See note 1 C LOCTR , See note 5 . END LOCTRs are ordered by their definition order. So in the previous example, the ordering is A, B and C. When there are statements in LOCTR groups, the code is generated using currently active USINGs and then moved to the final location. Notes: 1. The first location counter of a section, class or part is defined by the name of the START, CSECT, DSECT, RSECT, CATTR or COM instruction defining the section. 2. The LOCTR instruction defines a location counter. 3. The LOCTR continues a previously defined location counter. A location counter remains in use until it is interrupted by a LOCTR, CSECT, DSECT, or COM instruction. 4. A LOCTR instruction with the same name as a control section continues the first location counter of that section. However, an unnamed LOCTR cannot be used to continue an unnamed (private code) control section. 5. A LOCTR instruction with the same name as a LOCTR instruction in a previous control section causes that control section to be continued using the location counter specified, even though the LOCTR instruction may follow the definition (or resumption) of a different section. 6. To continue a location counter in an unnamed section, a named location counter must first be specified for the section by a LOCTR in the unnamed section. A control section cannot have the same name as a previous LOCTR instruction. A LOCTR instruction placed before the first control section definition initiates an unnamed control section before the LOCTR instruction is processed. The length attribute of a LOCTR name is 1. LOCTR instructions do not force alignment; code assembled under a location counter other than the first location counter of a control section is assembled starting at the next available byte after the previous segment. | A LOCTR name may be referenced as an ordinary symbol. If the LOCTR name | does not match a section name, its value is the location counter value assigned to | its first appearance, and it may have arbitrary alignment and other attributes. If the 192 HLASM V1R5 Language Reference
LTORG Instruction | LOCTR name is also a control section name, the value assigned is that of the | origin of the control section. So a LOCTR with the same name as the CSECT will | resume the first location counter within the CSECT. A CSECT instruction will | resume the last location counter used. Figure 55. LOCTR behavior with NOGOFF option LOCTR name Section Other Effect Resumes assembling with the first location counter of that section If the LOCTR name was previously declared, resumes assembling with the location counter of that LOCTR group If the LOCTR name was not previously declared, begins processing a new LOCTR group of statements to be assembled following the most recently processed section or LOCTR group Figure 56. LOCTR behavior with GOFF option LOCTR name Effect | Section Resumes assembling with the first location counter of the element in the | B_TEXT class of that section | Class Not allowed | Part Resumes assembling with the first location counter of the part | Other If the LOCTR name was previously declared, resumes assembling with | the location counter of that LOCTR group | If the LOCTR name was not previously declared, begins processing | statements in a new LOCTR group to be assembled following the most | recently processed class, part, or LOCTR group. LTORG Instruction Use the LTORG instruction so that the assembler can collect and assemble literals into a literal pool. A literal pool contains the literals you specify in a source module either after the preceding LTORG instruction, or after the beginning of the source module. If a control section has not been established, LTORG will initiate an unnamed (private) control section. ►►──┬────────┬──LTORG──────────────────────────────────────────────►◄ └─symbol─┘ symbol is one of the following: An ordinary symbol A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol A sequence symbol Chapter 5. Assembler Instruction Statements 193
- Page 162 and 163: DC Instruction—Character Constant
- 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 214 and 215: LTORG Instruction If symbol is an o
- 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
LTORG Instruction<br />
| LOCTR name is also a control section name, the value assigned is that of the<br />
| origin of the control section. So a LOCTR with the same name as the CSECT will<br />
| resume the first location counter within the CSECT. A CSECT instruction will<br />
| resume the last location counter used.<br />
Figure 55. LOCTR behavior with NOGOFF option<br />
LOCTR<br />
name<br />
Section<br />
Other<br />
Effect<br />
Resumes assembling with the first location counter of that section<br />
If the LOCTR name was previously declared, resumes assembling with<br />
the location counter of that LOCTR group<br />
If the LOCTR name was not previously declared, begins processing a<br />
new LOCTR group of statements to be assembled following the most<br />
recently processed section or LOCTR group<br />
Figure 56. LOCTR behavior with GOFF option<br />
LOCTR<br />
name<br />
Effect<br />
| Section Resumes assembling with the first location counter of the element in the<br />
| B_TEXT class of that section<br />
| Class Not allowed<br />
| Part<br />
Resumes assembling with the first location counter of the part<br />
| Other<br />
If the LOCTR name was previously declared, resumes assembling with<br />
| the location counter of that LOCTR group<br />
| If the LOCTR name was not previously declared, begins processing<br />
| statements in a new LOCTR group to be assembled following the most<br />
| recently processed class, part, or LOCTR group.<br />
LTORG Instruction<br />
Use the LTORG instruction so that the assembler can collect and assemble literals<br />
into a literal pool. A literal pool contains the literals you specify in a source module<br />
either after the preceding LTORG instruction, or after the beginning of the source<br />
module.<br />
If a control section has not been established, LTORG will initiate an unnamed<br />
(private) control section.<br />
►►──┬────────┬──LTORG──────────────────────────────────────────────►◄<br />
└─symbol─┘<br />
symbol<br />
is one of the following:<br />
An ordinary symbol<br />
A variable symbol that has been assigned a character string with a value<br />
that is valid for an ordinary symbol<br />
A sequence symbol<br />
Chapter 5. Assembler Instruction Statements 193