Copy Bits Arithmetic (CPYBTA)

Instruction Syntax

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)

  • The length of the receiver cannot exceed four bytes.

  • The offset must have a non-negative value.

  • The length operand must be an immediate value between 1 and 32.

Authorization Required

  • None

Lock Enforcement

  • None

Exceptions

  • 06 Addressing
    • 0601 Space Addressing Violation
    • 0602 Boundary Alignment
    • 0603 Range
  • 08 Argument/Parameter
    • 0801 Parameter Reference Violation
  • 10 Damage Encountered
    • 1004 System Object Damage State
    • 1044 Partial System Object Damage
  • 1C Machine-Dependent
    • 1C03 Machine Storage Limit Exceeded
  • 20 Machine Support
    • 2002 Machine Check
    • 2003 Function Check
  • 22 Object Access
    • 2202 Object Destroyed
    • 2203 Object Suspended
    • 2208 Object Compressed
    • 220B Object Not Available
  • 24 Pointer Specification
    • 2401 Pointer Does Not Exist
    • 2402 Pointer Type Invalid
  • 2E Resource Control Limit
    • 2E01 User Profile Storage Limit Exceeded
  • 36 Space Management
    • 3601 Space Extension/Truncation
  • 44 Protection Violation
    • 4401 Object Domain or Hardware Storage Protection Violation
    • 4402 Literal Values Cannot Be Changed