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

OPSYN Instruction ,ERROR, SEV 1 An asterisk in the severity code subfield causes the message and the asterisk to be generated as a comment statement. Example: MNOTE ,'NO ERROR' The generated result is: ,NO ERROR If the severity code subfield is omitted, including the comma separating it from the message, the assembler generates the message as a comment statement. Notes: Example: MNOTE 'NO ERROR' The generated result is: NO ERROR 1. An MNOTE instruction causes a message to be printed, if the current PRINT option is ON, even if the PRINT NOGEN option is specified. 2. The statement number of the message generated from an MNOTE instruction with a severity code is listed among any other error messages for the current source module. However, the message is printed only if the severity code specified is greater than or equal to the severity code nnn specified in the FLAG(nnn) assembler option. 3. The statement number of the comments generated from an MNOTE instruction without a severity code is not listed among other error messages. OPSYN Instruction The OPSYN instruction defines or deletes symbolic operation codes. The OPSYN instruction has two formats. The first format defines a new operation code to represent an existing operation code, or to redefine an existing operation code for: Machine and extended mnemonic branch instructions Assembler instructions, including conditional assembly instructions Macro instructions Define Operation Code ►►──┬─symbol───────────┬──OPSYN──operation_code_2──────────────────►◄ └─operation_code_1─┘ The second format deletes an existing operation code for: Machine and extended mnemonic branch instructions Assembler instructions, including conditional assembly instructions Macro instructions 198 HLASM V1R5 Language Reference

OPSYN Instruction Delete Operation Code ►►──operation_code_1──OPSYN────────────────────────────────────────►◄ symbol is one of the following: An ordinary symbol that is not the same as an existing operation code A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol and is not the same as an existing operation code operation_code_1 is one of the following: An operation code described in this chapter, or in Chapter 4, “Machine Instruction Statements” on page 78, or Chapter 9, “How to Write Conditional Assembly Instructions” on page 318 The operation code defined by a previous OPSYN instruction The name of a previously defined macro. operation_code_2 is one of the following: An operation code described in this chapter, or in Chapter 4, “Machine Instruction Statements” on page 78, or Chapter 9, “How to Write Conditional Assembly Instructions” on page 318 The operation code defined by a previous OPSYN instruction In the first format, the OPSYN instruction assigns the properties of the operation code denoted by operation_code_2 to the ordinary symbol denoted by symbol or the operation code denoted by operation_code_1. In the second format, the OPSYN instruction causes the operation code specified in operation_code_1 to lose its properties as an operation code. The OPSYN instruction can be coded anywhere in the program to redefine an operation code. The symbol in the name field can represent a valid operation code. It loses its current properties as if it had been defined in an OPSYN instruction with a space-filled operand field. In the following example, L and LR both possess the properties of the LR machine instruction operation code: L OPSYN LR When the same symbol appears in the name field of two OPSYN instructions, the latest definition takes precedence. In the example below, STORE now represents the STH machine operation: STORE OPSYN ST STORE OPSYN STH Note: OPSYN is not processed during lookahead mode (see “Lookahead” on page 340). Therefore it cannot be used during lookahead to replace an opcode that must be processed during lookahead, such as COPY. For example, assuming Chapter 5. Assembler Instruction Statements 199

OPSYN Instruction<br />

Delete Operation Code<br />

►►──operation_code_1──OPSYN────────────────────────────────────────►◄<br />

symbol<br />

is one of the following:<br />

An ordinary symbol that is not the same as an existing operation code<br />

A variable symbol that has been assigned a character string with a value<br />

that is valid for an ordinary symbol and is not the same as an existing<br />

operation code<br />

operation_code_1<br />

is one of the following:<br />

An operation code described in this chapter, or in Chapter 4, “Machine<br />

Instruction Statements” on page 78, or Chapter 9, “How to Write<br />

Conditional Assembly Instructions” on page 318<br />

The operation code defined by a previous OPSYN instruction<br />

The name of a previously defined macro.<br />

operation_code_2<br />

is one of the following:<br />

An operation code described in this chapter, or in Chapter 4, “Machine<br />

Instruction Statements” on page 78, or Chapter 9, “How to Write<br />

Conditional Assembly Instructions” on page 318<br />

The operation code defined by a previous OPSYN instruction<br />

In the first format, the OPSYN instruction assigns the properties of the operation<br />

code denoted by operation_code_2 to the ordinary symbol denoted by symbol or<br />

the operation code denoted by operation_code_1.<br />

In the second format, the OPSYN instruction causes the operation code specified in<br />

operation_code_1 to lose its properties as an operation code.<br />

The OPSYN instruction can be coded anywhere in the program to redefine an<br />

operation code.<br />

The symbol in the name field can represent a valid operation code. It loses its<br />

current properties as if it had been defined in an OPSYN instruction with a<br />

space-filled operand field. In the following example, L and LR both possess the<br />

properties of the LR machine instruction operation code:<br />

L OPSYN LR<br />

When the same symbol appears in the name field of two OPSYN instructions, the<br />

latest definition takes precedence. In the example below, STORE now represents the<br />

STH machine operation:<br />

STORE OPSYN ST<br />

STORE OPSYN STH<br />

Note: OPSYN is not processed during lookahead mode (see “Lookahead” on<br />

page 340). Therefore it cannot be used during lookahead to replace an opcode that<br />

must be processed during lookahead, such as COPY. For example, assuming<br />

Chapter 5. Assembler Instruction Statements 199

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

Saved successfully!

Ooh no, something went wrong!