Instruction statement format

Instruction statements must consist of one to four entries in the statement field. They are:

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:

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 and Macro instruction format.

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:

Operand entries

Operand entries contain zero or more operands that identify and describe data to be acted upon by the instruction, by indicating such information as storage locations, masks, storage area lengths, or types of data. The following rules apply to operands:

The following instruction is correctly coded:

         LA              R1,4+5              No space

The following instruction may appear to be the same, but is not:

         LA              R1,4 + 5            Spaces included

In this example, the embedded space means that the operand finishes after "4". There is no assembler error, but the result is a LA   R1,4, which may not be what you intended.

A space inside unquoted parentheses is an error, and leads to a diagnostic. The following instruction is correctly coded:

         DC              CL(L'STRLEN)' '     Space within quotes

The following instruction, with an extra space, is not correct:

         DC              CL(L'STRLEN )' '    Space not within quotes

The following example shows a space enclosed in quotes, as part of a string. This space is properly accounted for:

         MVC             AREA1,=C'This Area' Space inside quotes

In quotes, spaces and parentheses can occur in any quantity and in any order:

         LA              R1,=C'This is OK (isn''t it)'
Remarks entries

Remarks are used to describe the current instruction. The following rules apply to remarks:


[ Top of Page | Previous Page | Next Page | Contents | Index ]