22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Instructions that establish the first section: Any instruction that affects the<br />

location counter, or uses its current value, establishes the beginning of the first<br />

executable section. The instructions that establish the first section include any<br />

machine instruction and the following assembler instructions:<br />

| CCW CCW CCW1 CNOP CSECT CXD<br />

| DC DS EQU LOCTR LTORG ORG<br />

| RSECT START USING<br />

| CSECT, RSECT, and START start a possibly named control section. The other<br />

| statements start an unnamed control section.<br />

These instructions are always considered a part of the control section in which they<br />

appear.<br />

The statements copied into a source module by a COPY instruction determine<br />

whether it initiates the first control section. The PROFILE option causes the<br />

assembler to generate a COPY statement as the first statement after any ICTL or<br />

*PROCESS statements.<br />

The DSECT, COM, and DXD instructions initiate reference control sections and do<br />

not establish the first executable section.<br />

Any instructions copied by a COPY instruction, or generated by the processing of a<br />

macro instruction before the first section, must belong exclusively to one of the<br />

groups of instructions shown above. Any other instructions cause the assembler to<br />

establish the first section.<br />

All the instructions or groups of instructions listed above can also appear as part of<br />

a section.<br />

If you specify the PROFILE assembler option the assembler generates a COPY<br />

statement as the first statement in the assembly after any ICTL or *PROCESS<br />

statements. The copy member should not contain any ICTL or *PROCESS<br />

statements.<br />

Unnamed Section<br />

The unnamed section is an executable section that can be initiated in one of the<br />

following two ways:<br />

By coding a START, CSECT, or RSECT instruction without a name entry<br />

By coding any instruction, other than the START, CSECT, or RSECT<br />

instruction, that initiates the first executable section<br />

| An unnamed control section is sometimes referred to as private code. Private code<br />

| sections are sometimes difficult to manage with other system components such as<br />

| linkers and configuration management tools. Avoiding their use is recommended.<br />

| (Zero-length private code sections are sometimes ignored or discarded by system<br />

| linkers.)<br />

All sections should be given names so they can be referred to symbolically:<br />

Within a source module<br />

In EXTRN and WXTRN instructions<br />

Chapter 3. Program Structures and Addressing 55

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

Saved successfully!

Ooh no, something went wrong!