Or (OR)


Op Code (Hex) Extender Operand 1 Operand 2 Operand 3 Operand [4-5]
OR 1097
Receiver Source 1 Source 2


ORI 1897 Indicator options Receiver Source 1 Source 2 Indicator targets


ORB 1C97 Branch options Receiver Source 1 Source 2 Branch targets
Operand 1: Character variable scalar or numeric variable scalar.

Operand 2: Character scalar or numeric scalar.

Operand 3: Character scalar or numeric scalar.

Operand 4-5:

Short forms


Op Code (Hex) Extender Operand 1 Operand 2 Operand [3-4]
ORS 1197
Receiver/Source 1 Source 2


ORIS 1997 Indicator options Receiver/Source 1 Source 2 Indicator targets


ORBS 1D97 Branch options Receiver/Source 1 Source 2 Branch targets
Operand 1: Character variable scalar or numeric variable scalar.

Operand 2: Character scalar or numeric scalar.

Operand 3-4:

Description  The Boolean or operation is performed on the string values in the source operands. The resulting string is placed in the receiver operand.

The operands may be character or numeric scalars. They are both interpreted as bit strings. Substringing is supported for both character and numeric operands.

The length of the operation is equal to the length of the longer of the two source operands. The shorter of the two operands is logically padded on the right with hex 00. The excess bytes in the longer operand are assigned to the results.

The bit values of the result are determined as follows:

Source 1 Bit Source 2 Bit Result Bit
0 0 0
0 1 1
1 0 1
1 1 1
The result value is then placed (left-adjusted) in the receiver operand with truncating or padding taking place on the right. The pad value used in this instruction is a hex 00.

Substring operand references that allow for a null substring reference (a length value of zero) may be specified for operands 1, 2, and 3. The effect of specifying a null substring reference for one source operand is that the other source operand is ored with an equal length string of all hex 00s. This causes the value of the other operand to be assigned to the result. When a null substring reference is specified for both source operands, the result is all zero and the instruction's resultant condition is zero. When a null substring reference is specified for the receiver, a result is not set and the instruction's resultant condition is zero regardless of the values of the source operands.

If operands overlap but do not share all of the same bytes, results of operations performed on these operands are not predictable. If overlapped operands share all of the same bytes, the results are predictable when direct addressing is used. If indirect addressing is used (that is, based operands, parameters, strings with variable lengths, and arrays with variable subscripts), the results are not always predictable.

When the receiver operand is a numeric variable scalar, it is possible that the result produced will not be a valid value for the numeric type. This can occur due to padding with hex 00, due to truncation, or due to the resultant bit string produced by the instruction. The instruction completes normally and signals no exceptions for these conditions.

Resultant Conditions 

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

10 Damage Encountered

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2C Program Execution

2E Resource Control Limit

36 Space Management

44 Protection Violation