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

Model Statements generated from that model statement. You can also substitute values into model statements in open code. A model statement consists of one or more fields, separated by one or more spaces, in columns 1 to 71. The fields are called the name, operation, operand, and remarks fields. Each field or subfield can consist of: An ordinary character string composed of alphanumeric and special characters A variable symbol as a point of substitution, except in remarks fields and comment statements Any combination of ordinary character strings and variable symbols to form a concatenated string The statements generated from model statements during conditional assembly must be valid machine or assembler instructions, but must not be conditional assembly instructions. They must follow the coding rules described in “Rules for Model Statement Fields” on page 251 or they are flagged as errors at assembly time. Examples: LABEL L 3,AREA LABEL2 L 3,2(4,5) &LABEL L 3,&AREA FIELD&A L 3,AREA&C Variable Symbols as Points of Substitution Values can be substituted for variable symbols that appear in the name, operation, and operand fields of model statements; thus, variable symbols represent points of substitution. The three main types of variable symbol are: Symbolic parameters (positional or keyword) System variable symbols (see “System Variable Symbols” on page 262) SET symbols (global-scope or local-scope SETA, SETB, or SETC symbols) Examples: &PARAM(3) &SYSLIST(1,3) &SYSLIST(2) &SETA(1) &SETC(15) Symbols That Can Be Subscripted: Symbolic parameters, SET symbols, and the system variable symbols &SYSLIST and &SYSMAC, can all be subscripted. All remaining system variable symbols contain only one value. Listing of Generated Fields The different fields in a macro-generated statement or a statement generated in open code appear in the listing in the same column as they are coded in the model statement, with the following exceptions: If the substituted value in the name or operation field is too large for the space available, the next field is moved to the right with one space separating the fields. 248 HLASM V1R5 Language Reference

Model Statements If the substituted value in the operand field causes the remarks field to be displaced, the remarks field is written on the next line, starting in the column where it is coded in the model statement. If the substituted value in the operation field of a macro-generated statement contains leading spaces, the spaces are ignored. If the substituted value in the operation field of a model statement in open code contains leading spaces, the spaces are used to move the field to the right. If the substituted value in the operand field contains leading spaces, the spaces are used to move the field to the right. If the substituted value contains trailing spaces, the spaces are ignored. Listing of Generated Fields Containing Double-Byte Data: If the DBCS assembler option is specified, then the following differences apply: Any continuation indicators present in the model statement are discarded. Double-byte data that must be split at a continuation point is always readable on a device capable of presenting DBCS characters—SI and SO are inserted at the break point, and the break-point always occurs between double-byte characters. The continuation indicator is extended to the left, if necessary, to fill space that cannot be filled with double-byte data because of alignment and delimiter considerations. The maximum number of columns filled is 3. If continuation is required and the character to the left of the continuation indicator is X, then + is used as the continuation indicator so as to clearly distinguish the position of the end column. This applies to any generated field, regardless of its contents, to prevent ambiguity. Redundant SI/SO pairs may be present in a field after substitution. If they occur at a continuation point, the assembler does not distinguish them from SI and SO inserted in the listing by the assembler to preserve readability. Refer to the generated object code to resolve this ambiguity. For more information, see Figure 64 on page 250. Rules for Concatenation If a symbolic parameter in a model statement is immediately preceded or followed by other characters or another symbolic parameter, the characters that correspond to the symbolic parameter are combined in the generated statement with the other characters, or with the characters that correspond to the other symbolic parameter. This process is called concatenation. When variable symbols are concatenated to ordinary character strings, the following rules apply to the use of the concatenation character (a period). The concatenation character is mandatory when: ▌1▐ ▌2▐ An alphanumeric character follows a variable symbol. A left parenthesis that does not enclose a subscript follows a variable symbol. ▌3▐—▌4▐ A period (.) is to be generated. Two periods must be specified in the concatenated string following a variable symbol. The concatenation character is not required when: Chapter 7. How to Specify Macro Definitions 249

Model Statements<br />

generated from that model statement. You can also substitute values into model<br />

statements in open code.<br />

A model statement consists of one or more fields, separated by one or more<br />

spaces, in columns 1 to 71. The fields are called the name, operation, operand,<br />

and remarks fields.<br />

Each field or subfield can consist of:<br />

An ordinary character string composed of alphanumeric and special characters<br />

A variable symbol as a point of substitution, except in remarks fields and<br />

comment statements<br />

Any combination of ordinary character strings and variable symbols to form a<br />

concatenated string<br />

The statements generated from model statements during conditional assembly must<br />

be valid machine or assembler instructions, but must not be conditional assembly<br />

instructions. They must follow the coding rules described in “Rules for Model<br />

Statement Fields” on page 251 or they are flagged as errors at assembly time.<br />

Examples:<br />

LABEL L 3,AREA<br />

LABEL2 L 3,2(4,5)<br />

&LABEL L 3,&AREA<br />

FIELD&A L<br />

3,AREA&C<br />

Variable Symbols as Points of Substitution<br />

Values can be substituted for variable symbols that appear in the name, operation,<br />

and operand fields of model statements; thus, variable symbols represent points of<br />

substitution. The three main types of variable symbol are:<br />

Symbolic parameters (positional or keyword)<br />

System variable symbols (see “System Variable Symbols” on page 262)<br />

SET symbols (global-scope or local-scope SETA, SETB, or SETC symbols)<br />

Examples:<br />

&PARAM(3)<br />

&SYSLIST(1,3)<br />

&SYSLIST(2)<br />

&SETA(1)<br />

&SETC(15)<br />

Symbols That Can Be Subscripted: Symbolic parameters, SET symbols, and<br />

the system variable symbols &SYSLIST and &SYSMAC, can all be subscripted. All<br />

remaining system variable symbols contain only one value.<br />

Listing of Generated Fields<br />

The different fields in a macro-generated statement or a statement generated in<br />

open code appear in the listing in the same column as they are coded in the model<br />

statement, with the following exceptions:<br />

If the substituted value in the name or operation field is too large for the space<br />

available, the next field is moved to the right with one space separating the<br />

fields.<br />

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