11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

SourcemoduleA source module is composed of source statements in the assembler language. Youcan include these statements in the source module in two ways:v You can enter them directly into the file that contains your source program.v You specify one or more COPY instructions among the source statements beingentered. When High Level Assembler encounters a COPY instruction, it replacesthe COPY instruction with a predetermined set of source statements from alibrary. These statements then become a part of the source module. See “COPYinstruction” on page 120 for more details.Beginning of a source moduleThe first statement of a source module can be any assembler language statement,except MEXIT and MEND. You can initiate the first control section of a sourcemodule by using the START instruction. However, you can write some sourcestatements before the beginning of the first control statement. See “First section” onpage 53 for more details.End of a source moduleThe END instruction marks the end of a source module. However, you can codeseveral END instructions; conditional assembly processing can determine which ofseveral coded or substituted END instructions is to be processed. Also, specifyingthe BATCH option allows you to supply more than one source module in a singleinput stream; when BATCH is specified, the assembler completes assembling asource module when an END statement is encountered, and if further statementsare found in the input stream, assembly of a new source module is begun. See“END instruction” on page 181 for more details, and the section “BATCH” in the<strong>HLASM</strong> Programmer’s Guide for information about the BATCH option.Conditional Assembly: Conditional assembly processing can determine which ofseveral coded or substituted END instructions is to be processed.Sections, elements, and partsIn the load module model, a control section is the smallest subdivision of a programthat can be relocated as a unit. The assembled control sections contain the objectcode for machine instructions, data constants, and areas.In the program object model, elements and parts are the smallest subdivisions of aprogram that can be relocated as a unit. Sections allow grouping all element andpart contributions under a single name. The assembled sections, elements, andparts contain the object code for the machine instructions, data, and areas.Consider the concept of a control section at different processing times:Source moduleAt coding timeYou create a control section or an element or part when you write theinstructions it contains. In addition, you establish the addressability of eachcomponent within the source module, and provide any symbolic linkagesbetween components that lie in different source modules. You also writethe linker control statements to combine sections into a load module orprogram object, and to provide an entry point address for the beginning ofprogram execution.At assembly timeHigh Level Assembler translates the source statements into object code.Each source module is assembled into one object module. The contents ofthe object module are relocatable.Chapter 3. Program structures and addressing 51

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

Saved successfully!

Ooh no, something went wrong!