Compare Pointer Type (CMPPTRT)


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]:

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 

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

0A Authorization

10 Damage Encountered

1A Lock State

1C Machine-Dependent

20 Machine Support

22 Object Access

24 Pointer Specification

2E Resource Control Limit

32 Scalar Specification

36 Space Management

44 Protection Violation