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 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

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>

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

Saved successfully!

Ooh no, something went wrong!