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 If an operand is continued after column 16, it is taken to be a comment. Also, if the continuation-indicator field is filled in on one line and you try to start a new statement after column 16 on the next line, this statement is taken as a comment belonging to the previous statement. Specify the FLAG(CONT) assembler option to instruct the assembler to issue warning messages when it suspects a continuation error in a macro call instruction. Refer to the FLAG option description in the HLASM Programmer's Guide for details about the situations that might be flagged as continuation errors. Unless it is one of the statement types listed below, nine continuation lines are allowed for a single assembler language statement. Alternative Statement Format The alternative statement format, which allows as many continuation lines as are needed, can be used for the following instructions: AGO conditional assembly statement, see “Alternative Format for AGO Instruction” on page 393 AIF conditional assembly statement, see “Alternative Format for AIF Instruction” on page 392 GBLA, GBLB, and GBLC conditional assembly statements, see “Alternative Format for GBLx Statements” on page 345 LCLA, LCLB, and LCLC conditional assembly statements, see “Alternative Format for LCLx Statements” on page 347 Macro instruction statement, see “Alternative Formats for a Macro Instruction” on page 298 Prototype statement of a macro definition, see “Alternative Formats for the Prototype Statement” on page 246 SETA, SETB, SETAF, SETCF and SETC conditional assembly statements, see “Alternative Statement Format” on page 388 Examples of the alternative statement format for each of these instructions are given with the description of the individual instruction. Continuation of double-byte data No special considerations apply to continuation: Where double-byte data is created by a code-generation program, and There is no requirement for double-byte data to be readable on a device capable of presenting DBCS characters A double-byte character string may be continued at any point, and SO and SI must be balanced within a field, but not within a statement line. Where double-byte data is created by a workstation that has the capability of presenting DBCS characters, such as the IBM 5550 multistation, or where readability of double-byte data in High Level Assembler source input or listings is required, special features of the High Level Assembler language may be used. When the DBCS assembler option is specified, High Level Assembler provides the flexibility to cater for any combination of double-byte data and single-byte data. The special features provided are: Removal of redundant SI/SO at continuation points. When an SI is placed in the end column of a continued line, and an SO is placed in the continue 16 HLASM V1R5 Language Reference

Assembler Language Coding Conventions column of the next line, the SI and SO are considered redundant and are removed from the statement before statement analysis. An extended continuation-indicator provides a flexible end column on a line-by-line basis to support any alignment of double-byte data in a source statement. The end column of continued lines may be shifted to the left by extending the continuation-indicator. To guard against accidental continuation caused by double-byte data ending in the continuation-indicator column, neither SO nor SI is regarded as a continuation-indicator. If either is used, the following warning message is issued: ASMA21W SO or SI in continuation column - no continuation assumed The examples below show the use of these features. Refer to “Double-Byte Character Set Notation” on page xvi for the notation used in the examples. Source Input Considerations Extended continuation-indicators may be used in any source statement, including macro statements and statements included by the COPY instruction. | This feature is intended for source lines containing double-byte data, however it | becomes available to all lines when the DBCS option is set. On a line with a non-space continuation-indicator, the end column is the first column to the left of the continuation-indicator which has a value different from the continuation-indicator. When converting existing programs for assembly with the DBCS option, ensure that continuation-indicators are different from the adjacent data in the end column. The extended continuation-indicators must not be extended into the continue column, otherwise the extended continuation-indicators are treated as data, and the assembler issues the following error message: ASMA25E Extended continuation column must not extend into continue column For SI and SO to be removed at continuation points, the SI must be in the end column, and the SO must be in the continue column of the next line. Examples: Name Operation Operand Continuation │ ▼ DBCS1 DC C'XXXXXXXXXXXXXXXXXXXX ' DBCS2 DC C'abcdefghijklmnopqrstuvwxyz123456789XXXX ' DBCS3 DC C'abcdefghijklmnopqrstuvXX ' DBCS1: The DBCS1 constant contains 11 double-byte characters bracketed by SO and SI. The SI and SO at the continuation point are not assembled into the operand. The assembled value of DBCS1 is: Chapter 2. Coding and Structure 17

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

If an operand is continued after column 16, it is taken to be a comment. Also, if the<br />

continuation-indicator field is filled in on one line and you try to start a new<br />

statement after column 16 on the next line, this statement is taken as a comment<br />

belonging to the previous statement.<br />

Specify the FLAG(CONT) assembler option to instruct the assembler to issue<br />

warning messages when it suspects a continuation error in a macro call instruction.<br />

Refer to the FLAG option description in the <strong>HLASM</strong> Programmer's Guide for details<br />

about the situations that might be flagged as continuation errors.<br />

Unless it is one of the statement types listed below, nine continuation lines are<br />

allowed for a single assembler language statement.<br />

Alternative Statement Format<br />

The alternative statement format, which allows as many continuation lines as are<br />

needed, can be used for the following instructions:<br />

AGO conditional assembly statement, see “Alternative Format for AGO<br />

Instruction” on page 393<br />

AIF conditional assembly statement, see “Alternative Format for AIF Instruction”<br />

on page 392<br />

GBLA, GBLB, and GBLC conditional assembly statements, see “Alternative<br />

Format for GBLx Statements” on page 345<br />

LCLA, LCLB, and LCLC conditional assembly statements, see “Alternative<br />

Format for LCLx Statements” on page 347<br />

Macro instruction statement, see “Alternative Formats for a Macro Instruction”<br />

on page 298<br />

Prototype statement of a macro definition, see “Alternative Formats for the<br />

Prototype Statement” on page 246<br />

SETA, SETB, SETAF, SETCF and SETC conditional assembly statements, see<br />

“Alternative Statement Format” on page 388<br />

Examples of the alternative statement format for each of these instructions are<br />

given with the description of the individual instruction.<br />

Continuation of double-byte data<br />

No special considerations apply to continuation:<br />

Where double-byte data is created by a code-generation program, and<br />

There is no requirement for double-byte data to be readable on a device<br />

capable of presenting DBCS characters<br />

A double-byte character string may be continued at any point, and SO and SI must<br />

be balanced within a field, but not within a statement line.<br />

Where double-byte data is created by a workstation that has the capability of<br />

presenting DBCS characters, such as the IBM 5550 multistation, or where<br />

readability of double-byte data in High Level Assembler source input or listings is<br />

required, special features of the High Level Assembler language may be used.<br />

When the DBCS assembler option is specified, High Level Assembler provides the<br />

flexibility to cater for any combination of double-byte data and single-byte data.<br />

The special features provided are:<br />

Removal of redundant SI/SO at continuation points. When an SI is placed in<br />

the end column of a continued line, and an SO is placed in the continue<br />

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