Copy Bits Arithmetic (CPYBTA)


Op Code (Hex) Operand 1 Operand 2 Operand 3 Operand 4
102C Receiver Source Offset Length
Operand 1: Character variable scalar or numeric variable scalar.

Operand 2: Character variable scalar or numeric variable scalar.

Operand 3: Signed or unsigned binary immediate.

Operand 4: Signed or unsigned binary immediate.

Description  This instruction copies the signed bit string source operand starting at the specified offset for a specified length right adjusted to the receiver and pads on the left with the sign of the bit string source.

The selected bits from the source operand are treated as a signed bit string and copied to the receiver value.

The source operand can be character or numeric. The leftmost bytes of the source operand are used in the operation. The source operand is interpreted as a bit string with the bits numbered left to right from 0 to the total number of bits in the string minus 1.

The offset operand indicates which bit of the source operand is to be copied, with a offset of zero indicating the leftmost bit of the leftmost byte of the source operand.

The length operand indicates the number of bits that are to be copied.

If the sum of the offset plus the length exceeds the length of the source, an invalid operand length  (hex 2A0A) exception is signalled.

Limitations (Subject to Change)

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

2E Resource Control Limit

36 Space Management

44 Protection Violation