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

| SECT_A CSECT , Define section SECT_A | CLASS_X CATTR RMODE(ANY) Define class CLASS_X | - - - Statements for CLASS_X | CLASS_Y CATTR RMODE(24) Define class CLASS_Y | - - - Statements for CLASS_Y | SECT_A CSECT , Resume section SECT_A | - - - Statements for class B_TEXT | CLASS_X CATTR , Resume class CLASS_X | - - - More statements for CLASS_X | Class Binding and Loading Attributes | Each class is bound into a separately relocatable loadable segment, using one of | two binding attributes. | Classes containing parts use merge binding (described at “Parts (MVS and | CMS)” on page 61). Parts are the smallest independently relocatable | components of a merge class. | Classes not containing parts use concatenation binding, in which elements, | after suitable alignment, are placed one after another. Zero-length elements are | retained but take no space in the program object. Elements are the smallest | independently relocatable components of a concatenation class | Each class must have uniform binding and loading attributes. More than one class | may have identical attributes, and the binder may put such classes into one | segment. The most usual class attributes are RMODE, alignment, and Loadability; | see “CATTR Instruction (MVS and CMS)” on page 112 for further information. | Class loading attributes determine the load-time placement of segments in virtual | storage. Loadable segments are loaded as separately relocated non-contiguous | entities at different origin addresses. | Default Class Assignments | High Level Assembler provides compatible behavior with “load module” model | object files generated when the NOGOFF option is active. When the GOFF option | is specified, the assembler automatically follows each CSECT, RSECT, and START | statement by defining two classes: B_TEXT and B_PRV. | B_TEXT contains the machine language text associated with the section name, | and is assigned the RMODE of the section name. The section name is | assigned to an entry point at the origin of the class. If a subsequent CATTR | statement declares a class name before any other statements have defined | storage, the element defined by the section name and the B_TEXT class name | will be empty. | B_PRV contains any external dummy sections defined by DXD instructions, or by | DSECTs named in Q-type address constants. If none are defined, the | elements in this class will be empty. (“PRV” is the binder's term for a “Pseudo | Register Vector,” the cumulative collection of external dummy sections.) | High Level Assembler assigns the name of the section as an entry name at the | initial byte of B_TEXT, and assigns to it the AMODE of the section name. | These two classes are bound in the same way as ordinary control sections and | dummy external sections are bound in the load module model, and can be used to | generate a load module if certain restrictions are satisfied. 60 HLASM V1R5 Language Reference

| You may declare other classes in addition to the defaults, but the resulting program | object will not be convertible to a load module. | Parts (MVS and CMS) | Parts are the smallest externally named and independently relocatable subdivisions | of elements in a merge class. A class containing parts may contain only parts, and | a class containing anything other than parts may not contain any parts. | ENTRY statements may not define an entry point in a part. | You define a part with the CATTR instruction, which must follow the initiation of an | executable section. The name of the class to which the part belongs is provided in | the name entry of the CATTR instruction, and the name of the part is specified as | an operand. The first definition of a class name may also specify the attributes of | the class. (See “CATTR Instruction (MVS and CMS)” on page 112 for further | information.) | For example, suppose you define two parts in a class: | SECT_B CSECT , Define section SECT_B | PClass CATTR Part(Part_R),RMODE(ANY) Define class PClass, part Part_R | - - - Statements included in Part_R | PClass CATTR Part(Part_S) Define part Part_S in class PClass | - - - Statements included in Part_S | PClass CATTR Part(Part_R) Resume class PClass and part Part_R | - - - More statements included in Part_R | These statements define a “merge” class PClass containing two parts, Part_R and | Part_S. If other classes or other object files declare parts with the same names in | the same class, the binder will merge their contents to determine the final part | definition in the program object. | You may provide additional statements for a part by specifying a CATTR statement | with the class name in the name entry and the part name specified as the operand. | No other class attributes may be specified following the first CATTR statement | declaring the class. | Parts are automatically assigned a “merge” attribute, meaning that more than one | identically named part may appear in a class defined in other assemblies or | compilations. The binder will assign the longest length and strictest alignment of all | such identically-named parts, and will merge the machine language text | contributions of each to form the final text belonging to that part. The order of text | merging depends on the sequence of parts processing by the binder. | Note: During linking, parts may be arranged in any order, depending on their | priority attribute. Do not assume any ordering relationship among parts. Location Counter Setting | The assembler maintains a separate location counter for each section, element, | and part. The location counter setting for the first section starts at 0, except when | an initial section is started with a START instruction that specifies a nonzero | location counter value. The location values assigned to the instructions and other | data in a section, element, or part are, therefore, relative to the location counter | setting at the beginning of that section, element, or part. Chapter 3. Program Structures and Addressing 61

| You may declare other classes in addition to the defaults, but the resulting program<br />

| object will not be convertible to a load module.<br />

| Parts (MVS and CMS)<br />

| Parts are the smallest externally named and independently relocatable subdivisions<br />

| of elements in a merge class. A class containing parts may contain only parts, and<br />

| a class containing anything other than parts may not contain any parts.<br />

| ENTRY statements may not define an entry point in a part.<br />

| You define a part with the CATTR instruction, which must follow the initiation of an<br />

| executable section. The name of the class to which the part belongs is provided in<br />

| the name entry of the CATTR instruction, and the name of the part is specified as<br />

| an operand. The first definition of a class name may also specify the attributes of<br />

| the class. (See “CATTR Instruction (MVS and CMS)” on page 112 for further<br />

| information.)<br />

| For example, suppose you define two parts in a class:<br />

| SECT_B CSECT , Define section SECT_B<br />

| PClass CATTR Part(Part_R),RMODE(ANY) Define class PClass, part Part_R<br />

| - - - Statements included in Part_R<br />

| PClass CATTR Part(Part_S) Define part Part_S in class PClass<br />

| - - - Statements included in Part_S<br />

| PClass CATTR Part(Part_R) Resume class PClass and part Part_R<br />

| - - - More statements included in Part_R<br />

| These statements define a “merge” class PClass containing two parts, Part_R and<br />

| Part_S. If other classes or other object files declare parts with the same names in<br />

| the same class, the binder will merge their contents to determine the final part<br />

| definition in the program object.<br />

| You may provide additional statements for a part by specifying a CATTR statement<br />

| with the class name in the name entry and the part name specified as the operand.<br />

| No other class attributes may be specified following the first CATTR statement<br />

| declaring the class.<br />

| Parts are automatically assigned a “merge” attribute, meaning that more than one<br />

| identically named part may appear in a class defined in other assemblies or<br />

| compilations. The binder will assign the longest length and strictest alignment of all<br />

| such identically-named parts, and will merge the machine language text<br />

| contributions of each to form the final text belonging to that part. The order of text<br />

| merging depends on the sequence of parts processing by the binder.<br />

| Note: During linking, parts may be arranged in any order, depending on their<br />

| priority attribute. Do not assume any ordering relationship among parts.<br />

Location Counter Setting<br />

| The assembler maintains a separate location counter for each section, element,<br />

| and part. The location counter setting for the first section starts at 0, except when<br />

| an initial section is started with a START instruction that specifies a nonzero<br />

| location counter value. The location values assigned to the instructions and other<br />

| data in a section, element, or part are, therefore, relative to the location counter<br />

| setting at the beginning of that section, element, or part.<br />

Chapter 3. Program Structures and Addressing 61

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

Saved successfully!

Ooh no, something went wrong!