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

Assembler Language Coding Conventions DBCS2: The DBCS2 constant contains an EBCDIC string which is followed by a double-byte string. Because there is no space for any double-byte data on the first line, the end column is extended three columns to the left and the double-byte data started on the next line. The assembled value of DBCS2 is: abcdefghijklmnopqrstuvwxyz123456789 DBCS3: The DBCS3 constant contains 22 EBCDIC characters followed by 9 double-byte characters. Alignment of the double-byte data requires that the end column be extended one column to the left. The SI and SO at the continuation point are not assembled into the operand. The assembled value of DBCS3 is: abcdefghijklmnopqrstuv Source Listing Considerations For source that does not contain substituted variable symbols, the listing exactly reflects the source input. Double-byte data input from code-generation programs, that contain no substituted variables, are not readable in the listing if the source input was not displayable on a device capable of presenting DBCS characters. Refer to “Listing of Generated Fields Containing Double-Byte Data” on page 249 for details of extended continuation and macro-generated statements. Blank Lines Blank lines are accepted in source programs. In open code, each blank line is treated as equivalent to a SPACE 1 statement. In the body of a macro definition, each blank line is treated as equivalent to an ASPACE 1 statement. Comment Statement Format Comment statements are not assembled as part of the object module, but are only printed in the assembly listing. You can write as many comment statements as you need, provided you follow these rules: Comment statements require an asterisk in the begin column. Internal macro definition comment statements require a period in the begin column, followed by an asterisk. Internal macro comments are accepted as comment statements in open code. Any characters of the EBCDIC character set, or double-byte character set can be used (see “Character Set” on page 11). Comment statements must lie within the statement field. If the comment extends into the continuation-indicator field, the statement following the comment statement is considered a continuation line of that comment statement. Comment statements must not appear between an instruction statement and its continuation lines. 18 HLASM V1R5 Language Reference

Assembler Language Coding Conventions Instruction Statement Format Instruction statements must consist of one to four entries in the statement field. They are: A name entry An operation entry An operand entry A remarks entry These entries must be separated by one or more spaces, and must be written in the order stated. Statement Coding Rules The following general rules apply to the coding of an instruction statement: The entries must be written in the following order: name, operation, operand, and remarks. The entries must be contained in the begin column (1) through the end column (71) of the first line and, if needed, in the continue column (16) through the end column (71) of any continuation lines. The entries must be separated from each other by one or more spaces. If used, a name entry must start in the begin column. The name and operation entries, each followed by at least one space, must be contained in the first line of an instruction statement. The operation entry must begin at least one column to the right of the begin column. Statement Example: The following example shows the use of name, operation, operand, and remarks entries. The symbol COMP names a compare instruction, the operation entry (CR) is the mnemonic operation code for a register-to-register compare operation, and the two operands (5,6) designate the two general registers whose contents are to be compared. The remarks entry reminds readers that this instruction compares NEW SUM to OLD. COMP CR 5,6 NEW SUM TO OLD Descriptions of the name, operation, operand, and remarks entries follow: Name Entry: The name entry is a symbol created by you to identify an instruction statement. A name entry is usually optional. Except for two instances, the name entry, when provided, must be a valid symbol at assembly time (after substituting variable symbols, if specified). For a discussion of the exceptions to this rule, see “TITLE Instruction” on page 215 and “Macro Instruction Format” on page 297. | The symbol must consist of 63 or fewer alphanumeric characters, the first of which must be alphabetic. It must be entered with the first character appearing in the begin column. If the begin column is a space, the assembler program assumes no name has been entered. No spaces or double-byte data may appear in the symbol. Operation Entry: The operation entry is the symbolic operation code specifying the machine, assembler, or macro instruction operation. The following rules apply to the operation entry: Chapter 2. Coding and Structure 19

Assembler <strong>Language</strong> Coding Conventions<br />

Instruction Statement Format<br />

Instruction statements must consist of one to four entries in the statement field.<br />

They are:<br />

A name entry<br />

An operation entry<br />

An operand entry<br />

A remarks entry<br />

These entries must be separated by one or more spaces, and must be written in<br />

the order stated.<br />

Statement Coding Rules<br />

The following general rules apply to the coding of an instruction statement:<br />

The entries must be written in the following order: name, operation, operand,<br />

and remarks.<br />

The entries must be contained in the begin column (1) through the end column<br />

(71) of the first line and, if needed, in the continue column (16) through the end<br />

column (71) of any continuation lines.<br />

The entries must be separated from each other by one or more spaces.<br />

If used, a name entry must start in the begin column.<br />

The name and operation entries, each followed by at least one space, must be<br />

contained in the first line of an instruction statement.<br />

The operation entry must begin at least one column to the right of the begin<br />

column.<br />

Statement Example: The following example shows the use of name, operation,<br />

operand, and remarks entries. The symbol COMP names a compare instruction, the<br />

operation entry (CR) is the mnemonic operation code for a register-to-register<br />

compare operation, and the two operands (5,6) designate the two general registers<br />

whose contents are to be compared. The remarks entry reminds readers that this<br />

instruction compares NEW SUM to OLD.<br />

COMP CR 5,6 NEW SUM TO OLD<br />

Descriptions of the name, operation, operand, and remarks entries follow:<br />

Name Entry: The name entry is a symbol created by you to identify an instruction<br />

statement. A name entry is usually optional. Except for two instances, the name<br />

entry, when provided, must be a valid symbol at assembly time (after substituting<br />

variable symbols, if specified). For a discussion of the exceptions to this rule, see<br />

“TITLE Instruction” on page 215 and “Macro Instruction Format” on page 297.<br />

| The symbol must consist of 63 or fewer alphanumeric characters, the first of which<br />

must be alphabetic. It must be entered with the first character appearing in the<br />

begin column. If the begin column is a space, the assembler program assumes no<br />

name has been entered. No spaces or double-byte data may appear in the<br />

symbol.<br />

Operation Entry: The operation entry is the symbolic operation code specifying<br />

the machine, assembler, or macro instruction operation. The following rules apply<br />

to the operation entry:<br />

Chapter 2. Coding and Structure 19

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

Saved successfully!

Ooh no, something went wrong!