HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Assembler Language Coding Conventions Translation Table In addition to the standard EBCDIC set of characters, High Level Assembler can use a user-specified translation table to convert the characters contained in character (C-type) data constants (DCs) and literals. High Level Assembler provides a translation table to convert the EBCDIC character set to the ASCII character set. You can supply a translation table using the TRANSLATE assembler | option described in the HLASM Programmer's Guide. Self-defining Terms: Self-defining terms are not translated when a translation table is used. See “How to Generate a Translation Table” in the HLASM Programmer's Guide. Assembler Language Coding Conventions Figure 6 shows the standard format used to code an assembler language statement. │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 1 │ ... │ 71 │ 72 │ 73 │ 74 │ 75 │ 76 │ ... │ 8 │ │ │ │ │ │ └──────────────────Statement Field──────────────────┴ │ ─┴─Identification-Sequence Field──┘ ▼ Continuation- Indicator Field Figure 6. Standard Assembler Coding Format Field Boundaries Assembler language statements usually occupy one 80-character record, or line. For information about statements that occupy more than 80 characters, see “Continuation Lines” on page 15. Each line is divided into three main fields: Statement field Continuation-indicator field Identification-sequence field If it can be printed, any character coded into any column of a line, or otherwise entered as a position in a source statement, is reproduced in the listing printed by the assembler. Whether it can be printed or not depends on the printer. Uppercase Printing: Use the FOLD assembler option to instruct the assembler to convert lowercase alphabetic characters to uppercase alphabetic characters before they are printed. Statement Field The instructions and comment statements must be written in the statement field. The statement field starts in the begin column and ends in the end column. The continuation-indicator field always lies in the column after the end column, unless the end column is column 80, in which case no continuation is possible. The identification-sequence field usually lies in the field after the continuation-indicator field. Any continuation lines needed must start in the continue column and end in the end column. Blank lines are acceptable. For more information, see “Blank Lines” on page 18. 14 HLASM V1R5 Language Reference
Assembler Language Coding Conventions The assembler assumes the following standard values for these columns: The begin column is column 1 The end column is column 71 The continue column is column 16 These standard values can be changed by using the Input Format Control (ICTL) assembler instruction. The ICTL instruction can, for example, be used to reverse the order of the statement field and the identification-sequence field by changing the standard begin, end, and continue columns. However, all references to the begin, end, and continue columns in this manual refer to the standard values described above. Continuation-Indicator Field The continuation-indicator field occupies the column after the end column. Therefore, the standard position for this field is column 72. A non-space character in this column indicates that the current statement is continued on the next line. This column must be a space character on the last (or only) line of a statement. If this column is not a space, the assembler treats the statement that follows on the next line as a continuation line of the current statement. If the DBCS assembler option is specified, then: When an SI is placed in the end column of a continued line, and an SO is placed in the continue column of the next line, the SI and SO are considered redundant and are removed from the statement before statement analysis is done. An extended continuation-indicator provides the ability to extend the end column to the left on a line-by-line basis, so that any alignment of double-byte data in a source statement can be supported. The double-byte delimiters SO and SI cannot be used as continuation-indicators. Identification-Sequence Field The identification-sequence field can contain identification characters or sequence numbers or both. If the ISEQ instruction has been specified to check this field, the assembler verifies whether or not the source statements are in the correct sequence. The columns checked by the ISEQ function are not restricted to columns 73 through 80, or by the boundaries determined by any ICTL instruction. The columns specified in the ISEQ instruction can be anywhere on the input statement, including columns that are occupied by the statement field. Continuation Lines To continue a statement on another line, follow these rules: 1. Enter a non-space character in the continuation-indicator field (column 72). This non-space character must not be part of the statement coding. When more than one continuation line is needed, enter a non-space character in column 72 of each line that is to be continued. 2. Continue the statement on the next line, starting in the continue column (column 16). Columns to the left of the continue column must be spaces. Comment statements may be continued after column 16. Chapter 2. Coding and Structure 15
- 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 36 and 37: Assembler Language Coding Conventio
- Page 38 and 39: 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
Assembler <strong>Language</strong> Coding Conventions<br />
Translation Table<br />
In addition to the standard EBCDIC set of characters, High Level Assembler can<br />
use a user-specified translation table to convert the characters contained in<br />
character (C-type) data constants (DCs) and literals. High Level Assembler<br />
provides a translation table to convert the EBCDIC character set to the ASCII<br />
character set. You can supply a translation table using the TRANSLATE assembler<br />
| option described in the <strong>HLASM</strong> Programmer's Guide.<br />
Self-defining Terms: Self-defining terms are not translated when a translation<br />
table is used. See “How to Generate a Translation Table” in the <strong>HLASM</strong><br />
Programmer's Guide.<br />
Assembler <strong>Language</strong> Coding Conventions<br />
Figure 6 shows the standard format used to code an assembler language<br />
statement.<br />
│<br />
│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 1 │ ... │ 71 │ 72 │ 73 │ 74 │ 75 │ 76 │ ... │ 8 │<br />
│ │ │ │ │<br />
└──────────────────Statement Field──────────────────┴ │ ─┴─Identification-Sequence Field──┘<br />
▼<br />
Continuation-<br />
Indicator Field<br />
Figure 6. Standard Assembler Coding Format<br />
Field Boundaries<br />
Assembler language statements usually occupy one 80-character record, or line.<br />
For information about statements that occupy more than 80 characters, see<br />
“Continuation Lines” on page 15. Each line is divided into three main fields:<br />
Statement field<br />
Continuation-indicator field<br />
Identification-sequence field<br />
If it can be printed, any character coded into any column of a line, or otherwise<br />
entered as a position in a source statement, is reproduced in the listing printed by<br />
the assembler. Whether it can be printed or not depends on the printer.<br />
Uppercase Printing: Use the FOLD assembler option to instruct the assembler to<br />
convert lowercase alphabetic characters to uppercase alphabetic characters before<br />
they are printed.<br />
Statement Field<br />
The instructions and comment statements must be written in the statement field.<br />
The statement field starts in the begin column and ends in the end column. The<br />
continuation-indicator field always lies in the column after the end column, unless<br />
the end column is column 80, in which case no continuation is possible. The<br />
identification-sequence field usually lies in the field after the continuation-indicator<br />
field. Any continuation lines needed must start in the continue column and end in<br />
the end column.<br />
Blank lines are acceptable. For more information, see “Blank Lines” on page 18.<br />
14 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>