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

| in linker control statements for section ordering and replacement, and for | linkage between source modules Unnamed common control sections or dummy control sections can be defined if the name entry is omitted from a COM or DSECT instruction. If you include an AMODE or RMODE instruction in the assembly and leave the name field blank, you must provide an unnamed control section. Reference Control Sections A reference control section is one you initiate by using the DSECT, COM, or DXD instruction, as follows: You can use the DSECT instruction to initiate or continue a dummy control section. For more information about dummy sections, see “Dummy Control Sections.” You can use the COM instruction to initiate or continue a common control section. For more information about common sections, see “Common Control Sections” on page 57. You can use the DXD instructions to define an external dummy section. For more information about external dummy sections, see “External Dummy Sections” on page 57. At assembly time, reference control sections are not assembled into object code. You can use a reference control section either to reserve storage areas or to describe data to which you can refer from executable control sections. These reference control sections are considered empty at assembly time, and the actual binary data to which they refer is not available until execution time. Dummy Control Sections A dummy control section is a reference control section that describes the layout of data in a storage area without actually reserving any virtual storage. You may want to describe the format of an area whose storage location is not determined until the program is run. You can do so by describing the format of the area in a dummy section, and using symbols defined in the dummy section in the operands of machine instructions. The DSECT instruction initiates a dummy control section or indicates its continuation. For more information about the DSECT instruction, see “DSECT Instruction” on page 178. How to use a dummy control section: A dummy control section (dummy section) lets you write a sequence of assembler language statements to describe the layout of data located elsewhere in your source module. The assembler produces no object code for statements in a dummy control section, and it reserves no storage in the object module for it. Rather, the dummy section provides a symbolic format that is empty of data. However, the assembler assigns location values to the symbols you define in a dummy section, relative to its beginning. Therefore, to use a dummy section, you must: Reserve a storage area for the data 56 HLASM V1R5 Language Reference

Ensure that the locations of the symbols in the dummy section actually correspond to the locations of the data being described Establish the addressability of the dummy section in combination with the storage area You can then refer to the data symbolically by using the symbols defined in the dummy section. Common Control Sections A common control section is a reference control section that lets you reserve a storage area that can be used by one or more source modules. One or more common sections can be defined in a source module. The COM instruction initiates a common control section, or indicates its continuation. For more information about the COM instruction, see “COM Instruction” on page 121. How to use a common control section: A common control section (common section) lets you describe a common storage area in one or more source modules. When the separately assembled object modules are linked as one program, the required storage space is reserved for the common control section. Thus, two or more modules may share the common area. Only the storage area is provided; the assembler does not assemble the source statements that make up a common control section into object code. You must provide the data for the common area at execution time. The assembler assigns locations to the symbols you define in a common section relative to the beginning of that common section. This lets you refer symbolically to the data that is placed in the common section at execution time. If you want to refer to data in a common control section, you must establish the addressability of the common control section in each source module that contains references to it. If you code identical common sections in two or more source modules, you can communicate data symbolically between these modules through this common section. | Communicating with Modules in Other Languages: Some high-level languages | such as COBOL, PL/I, C, and FORTRAN use common control sections. This lets | you communicate between assembler language modules and modules written in | those languages. External Dummy Sections An external dummy section is a reference control section that lets you describe storage areas for one or more source modules, to be used as: Work areas for each source module Communication areas between two or more source modules | Note: External dummy sections are also called “pseudo-registers” in other contexts. When the assembled object modules are linked and loaded, you can dynamically allocate the storage required for all your external dummy sections at one time from one source module (for example, by using the MVS GETMAIN macro instruction). Chapter 3. Program Structures and Addressing 57

| in linker control statements for section ordering and replacement, and for<br />

| linkage between source modules<br />

Unnamed common control sections or dummy control sections can be defined if the<br />

name entry is omitted from a COM or DSECT instruction.<br />

If you include an AMODE or RMODE instruction in the assembly and leave the<br />

name field blank, you must provide an unnamed control section.<br />

<strong>Reference</strong> Control Sections<br />

A reference control section is one you initiate by using the DSECT, COM, or DXD<br />

instruction, as follows:<br />

You can use the DSECT instruction to initiate or continue a dummy control<br />

section. For more information about dummy sections, see “Dummy Control<br />

Sections.”<br />

You can use the COM instruction to initiate or continue a common control<br />

section. For more information about common sections, see “Common Control<br />

Sections” on page 57.<br />

You can use the DXD instructions to define an external dummy section. For<br />

more information about external dummy sections, see “External Dummy<br />

Sections” on page 57.<br />

At assembly time, reference control sections are not assembled into object code.<br />

You can use a reference control section either to reserve storage areas or to<br />

describe data to which you can refer from executable control sections. These<br />

reference control sections are considered empty at assembly time, and the actual<br />

binary data to which they refer is not available until execution time.<br />

Dummy Control Sections<br />

A dummy control section is a reference control section that describes the layout of<br />

data in a storage area without actually reserving any virtual storage.<br />

You may want to describe the format of an area whose storage location is not<br />

determined until the program is run. You can do so by describing the format of the<br />

area in a dummy section, and using symbols defined in the dummy section in the<br />

operands of machine instructions.<br />

The DSECT instruction initiates a dummy control section or indicates its<br />

continuation. For more information about the DSECT instruction, see “DSECT<br />

Instruction” on page 178.<br />

How to use a dummy control section: A dummy control section (dummy<br />

section) lets you write a sequence of assembler language statements to describe<br />

the layout of data located elsewhere in your source module. The assembler<br />

produces no object code for statements in a dummy control section, and it reserves<br />

no storage in the object module for it. Rather, the dummy section provides a<br />

symbolic format that is empty of data. However, the assembler assigns location<br />

values to the symbols you define in a dummy section, relative to its beginning.<br />

Therefore, to use a dummy section, you must:<br />

Reserve a storage area for the data<br />

56 <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!