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 instructions
- Assembler instructions, including conditional assembly instructions
- Macro instructions
If operation_code_2 has been previously defined as both a machine instruction and as a macro, both are copied to the definition of operation_code_1.
The second format deletes an existing operation code for:
- Machine and extended mnemonic instructions
- Assembler instructions, including conditional assembly instructions
- Macro instructions
- 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
- Any machine instruction (such as those described in Machine instruction statements or How to write conditional assembly instructions)
- The operation code defined by a previous OPSYN instruction
- The name of a previously defined macro.
- operation_code_2
- Is one of these:
- An operation code described in this chapter
- Any machine instruction (such as those described in Machine instruction statements or How to write conditional assembly instructions)
- The operation code defined by a previous OPSYN instruction
- The name of a previously defined macro.
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, following an ICTL instruction, if any.
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 this example,
STORE
now
represents the STH machine operation: STORE OPSYN ST
STORE OPSYN STH
Note: OPSYN is not processed during lookahead mode (see Lookahead). Therefore it cannot be used
during lookahead to replace an opcode that must be processed during
lookahead, such as COPY. For example, assuming AFTER is defined in
COPYBOOK, the following code gives an ASMA042E error (Length attribute
of symbol is unavailable):
AIF (L'AFTER LT 2).BEYOND
OPCOPY OPSYN COPY OPSYN not processed during look ahead
OPCOPY COPYBOOK OPCOPY fails
.BEYOND ANOP ,