22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

LOCTR Instruction<br />

A CSECT , See note 1<br />

LR 12,15<br />

USING A,12<br />

.<br />

B LOCTR , See note 2<br />

.<br />

C LOCTR ,<br />

.<br />

B LOCTR , See note 3<br />

.<br />

A LOCTR , See note 4<br />

.<br />

DUM DSECT , See note 1<br />

C LOCTR , See note 5<br />

.<br />

END<br />

LOCTRs are ordered by their definition order. So in the previous example, the<br />

ordering is A, B and C. When there are statements in LOCTR groups, the code is<br />

generated using currently active USINGs and then moved to the final location.<br />

Notes:<br />

1. The first location counter of a section, class or part is defined by the name of<br />

the START, CSECT, DSECT, RSECT, CATTR or COM instruction defining the<br />

section.<br />

2. The LOCTR instruction defines a location counter.<br />

3. The LOCTR continues a previously defined location counter. A location<br />

counter remains in use until it is interrupted by a LOCTR, CSECT, DSECT, or<br />

COM instruction.<br />

4. A LOCTR instruction with the same name as a control section continues the<br />

first location counter of that section. However, an unnamed LOCTR cannot be<br />

used to continue an unnamed (private code) control section.<br />

5. A LOCTR instruction with the same name as a LOCTR instruction in a previous<br />

control section causes that control section to be continued using the location<br />

counter specified, even though the LOCTR instruction may follow the definition<br />

(or resumption) of a different section.<br />

6. To continue a location counter in an unnamed section, a named location<br />

counter must first be specified for the section by a LOCTR in the unnamed<br />

section.<br />

A control section cannot have the same name as a previous LOCTR instruction. A<br />

LOCTR instruction placed before the first control section definition initiates an<br />

unnamed control section before the LOCTR instruction is processed.<br />

The length attribute of a LOCTR name is 1.<br />

LOCTR instructions do not force alignment; code assembled under a location<br />

counter other than the first location counter of a control section is assembled<br />

starting at the next available byte after the previous segment.<br />

| A LOCTR name may be referenced as an ordinary symbol. If the LOCTR name<br />

| does not match a section name, its value is the location counter value assigned to<br />

| its first appearance, and it may have arbitrary alignment and other attributes. If the<br />

192 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!