Compare Pointer Type (CMPPTRT)

Instruction Syntax

Op Code (Hex) Extender Operand 1 Operand 2 Operand 3 [4]
CMPPTRTB 1CE2 Branch options Compare operand 1 Compare operand 2 Branch targets
CMPPTRTI 18E2 Indicator options Compare operand 1 Compare operand 2 Indicator targets

Operand 1: Data pointer, space pointer, system pointer, instruction pointer, invocation pointer, procedure pointer, label pointer, suspend pointer, synchronization pointer, or field pointer.

Operand 2: Character(1) scalar or null.

Operand 3 [4]:

  • Branch Form-Instruction number, relative instruction number, branch point, or instruction pointer.
  • Indicator Form-Numeric variable scalar or character variable scalar.

Bound Program Access
Built-in number for CMPPTRT is 140.
CMPPTRT (
         pointer_type   : aggregate(1,2,4) OR
                          signed binary(1,2,4) OR
                          unsigned binary(1,2,4)
         pointer        : pointer(16)
) :   signed binary(4) /* return_code */

The return code will be set as follows:

Return code
Meaning
1
Pointer is of specified type.
0
Pointer is not of specified type.

The pointer type operand corresponds to operand 2 on the CMPPTRT operation. The pointer operand corresponds to operand 1 on the CMPPTRT operation.

This built-in function is used to provide support for the branch and indicator forms of the CMPPTRT operation. The user must specify code to process the return code and perform the desired branching or indicator setting.

Description:

The instruction compares the pointer type currently in operand 1 with the character scalar identified by operand 2. Based on the comparison, the resulting condition is used with the extender to transfer control (branch form) or to assign a value to each of the indicator operands (indicator form).

Operand 1 can specify a space pointer machine object only when operand 2 is null.

An unresolved operand 1 pointer is not resolved by this instruction.

If operand 2 is null or if operand 2 specifies a comparison value of hex 00, an equal condition occurs if a pointer does not exist in the storage area identified by operand 1.

Following are the allowable values for operand 2:

  • Hex 00 - A pointer does not exist at this location
  • Hex 01 - System pointer
  • Hex 02 - Space pointer
  • Hex 03 - Data pointer
  • Hex 04 - Instruction pointer
  • Hex 05 - Invocation pointer
  • Hex 06 - Procedure pointer
  • Hex 07 - Label pointer
  • Hex 08 - Suspend pointer
  • Hex 09 - Synchronization pointer
  • Hex 0B - Field pointer

Resultant Conditions

  • Equal
  • Not equal

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
  • 0A Authorization
    • 0A01 Unauthorized for Operation
  • 10 Damage Encountered
    • 1004 System Object Damage State
    • 1005 Authority Verification Terminated Due to Damaged Object
    • 1044 Partial System Object Damage
  • 1A Lock State
    • 1A01 Invalid Lock State
  • 1C Machine-Dependent
    • 1C03 Machine Storage Limit Exceeded
  • 20 Machine Support
    • 2002 Machine Check
    • 2003 Function Check
  • 22 Object Access
    • 2201 Object Not Found
    • 2202 Object Destroyed
    • 2203 Object Suspended
    • 2207 Authority Verification Terminated Due to Destroyed Object
    • 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
  • 32 Scalar Specification
    • 3203 Scalar Value Invalid
  • 36 Space Management
    • 3601 Space Extension/Truncation
  • 44 Protection Violation
    • 4401 Object Domain or Hardware Storage Protection Violation