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.

COM Instruction<br />

COM Instruction<br />

The COM instruction identifies the beginning or continuation of a common control<br />

section.<br />

►►──┬────────┬──COM────────────────────────────────────────────────►◄<br />

└─symbol─┘<br />

symbol<br />

is one of the following:<br />

An ordinary symbol<br />

A variable symbol that has been assigned a character string with a value<br />

that is valid for an ordinary symbol<br />

A sequence symbol<br />

The COM instruction can be used anywhere in a source module after the ICTL<br />

instruction.<br />

If symbol denotes an ordinary symbol, the ordinary symbol identifies the common<br />

control section. If several COM instructions within a source module have the same<br />

symbol in the name field, the first occurrence initiates the common section and the<br />

rest indicate the continuation of the common section. The ordinary symbol denoted<br />

by symbol represents the address of the first byte in the common section, and has<br />

a length attribute value of 1.<br />

If symbol is not specified, or if name is a sequence symbol, the COM instruction<br />

initiates, or indicates the continuation of, the unnamed common section.<br />

See “CSECT Instruction” on page 123 for a discussion on the interaction between<br />

COM and the GOFF assembler option.<br />

The location counter for a common section is always set to an initial value of 0.<br />

However, when an interrupted common control section is continued using the COM<br />

instruction, the location counter last specified in that control section is continued.<br />

If a common section with the same name (or unnamed) is specified in two or more<br />

source modules, the amount of storage reserved for this common section is equal<br />

to that required by the longest common section specified.<br />

The source statements that follow a COM instruction belong to the common section<br />

identified by that COM instruction.<br />

Notes:<br />

1. The assembler language statements that appear in a common control section<br />

are not assembled into object code.<br />

2. When establishing the addressability of a common section, the symbol in the<br />

name field of the COM instruction, or any symbol defined in the common<br />

section, can be specified in a USING instruction.<br />

3. An AMODE cannot be assigned to a common section.<br />

Chapter 5. Assembler Instruction Statements 121

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

Saved successfully!

Ooh no, something went wrong!