Add Logical Character (ADDLC)


Op Code (Hex) Extender Operand 1 Operand 2 Operand 3 Operand [4-7]
ADDLC 1023
Sum Addend 1 Addend 2


ADDLCI 1823 Indicator options Sum Addend 1 Addend 2 Indicator targets


ADDLCB 1C23 Branch options Sum Addend 1 Addend 2 Branch targets
Operand 1: Character variable scalar.

Operand 2: Character scalar.

Operand 3: Character scalar.

Operand 4-7:

Short forms


Op Code (Hex) Extender Operand 1 Operand 2 Operand [3-6]
ADDLCS 1123
Sum/Addend 1 Addend 2


ADDLCIS 1923 Indicator options Sum/Addend 1 Addend 2 Indicator targets


ADDLCBS 1D23 Branch options Sum/Addend 1 Addend 2 Branch targets
Operand 1: Character variable scalar.

Operand 2: Character scalar.

Operand 3-6:

Description  The unsigned binary value of the addend 1 operand is added to the unsigned binary value of the addend 2 operand and the result is placed in the sum operand.

If the short form is not used and if neither source operand is an immediate value, then operands 2 and 3 must be the same length. The length can be a maximum of 256 bytes. In the case that the short form is not used and operand 2 or 3 is an immediate operand, it is treated as a character value and extended on the right with hex 00 bytes to match the length of the other operand.

The addition operation is performed according to the rules of algebra. 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 byte value of hex 00.

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.

Resultant Conditions  The logical sum of the character scalar operands is:

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