HLASM Language Reference
HLASM Language Reference HLASM Language Reference
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
- Page 1: High Level Assembler for MVS & VM &
- Page 4 and 5: Note! Before using this information
- Page 6 and 7: Contents Source Module . . . . . .
- Page 8 and 9: Contents Ordinary USING Instruction
- Page 10 and 11: Contents Sublists in Operands . . .
- Page 12 and 13: About this Manual This manual descr
- Page 14 and 15: IBM High Level Assembler for MVS &
- Page 16 and 17: | The Internet. You can access IBM
- Page 18 and 19: ▌C▐ The item referred to by ▌
- Page 20 and 21: Miscellany The ASCII translation t
- Page 22 and 23: Part 1. Assembler Language—Struct
- Page 24 and 25: Language Compatibility Language Com
- Page 26 and 27: Assembler Program Assembler Program
- Page 28 and 29: Relationship of Assembler to Operat
- Page 30 and 31: Coding Made Easier Linkage between
- Page 32 and 33: Character Set Compatibility with Ea
- Page 34 and 35: Assembler Language Coding Conventio
- Page 36 and 37: Assembler Language Coding Conventio
- Page 40 and 41: Assembler Language Coding Conventio
- Page 42 and 43: Assembler Language Structure Condit
- Page 44 and 45: Assembler Language Structure Machin
- Page 46 and 47: Assembler Language Structure Condit
- Page 48 and 49: Terms, Literals, and Expressions Te
- Page 50 and 51: Terms, Literals, and Expressions -
- Page 52 and 53: Terms, Literals, and Expressions As
- Page 54 and 55: Terms, Literals, and Expressions Se
- Page 56 and 57: Terms, Literals, and Expressions Fo
- Page 58 and 59: Terms, Literals, and Expressions I
- Page 60 and 61: Terms, Literals, and Expressions Th
- Page 62 and 63: Terms, Literals, and Expressions 1.
- Page 64 and 65: Terms, Literals, and Expressions
- Page 66 and 67: Terms, Literals, and Expressions
- Page 68 and 69: Terms, Literals, and Expressions Th
- Page 70 and 71: | Chapter 3. Program Structures and
- Page 72 and 73: Source Module A source module is co
- Page 74 and 75: The CSECT instruction can be used a
- Page 76 and 77: | in linker control statements for
- Page 78 and 79: This is not only convenient, but it
- Page 80 and 81: | SECT_A CSECT , Define section SEC
- Page 82 and 83: | For executable sections, the loca
- Page 84 and 85: Addressing | The System/390® and z
- Page 86 and 87: Addressing | Parts must always be r
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