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

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

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

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

Saved successfully!

Ooh no, something went wrong!