Op Code (Hex) | Extender | Operand 1 | Operand 2 | Operand 3 [4] |
---|---|---|---|---|
CMPPTRAB 1CD2 | Branch options | Compare operand 1 | Compare operand 2 | Branch targets |
| ||||
CMPPTRAI 18D2 | Indicator options | Compare operand 1 | Compare operand 2 | Indicator targets |
Operand 1: Data pointer, space pointer, system pointer, instruction pointer, or label pointer.
Operand 2: Data pointer, space pointer, system pointer, instruction pointer, or label pointer.
Operand 3 [4]:
Bound program access | ||||||
---|---|---|---|---|---|---|
The return code will be set as follows:
This built-in function is used to provide support for the branch and indicator forms of the CMPPTRA operation. The user must specify code to process the return code and perform the desired branching or indicator setting. |
Description: The object addressed by operand 1 is compared with the object addressed by operand 2 to determine if both operands are addressing the same object. 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).
If operand 1 is a data pointer, a space pointer, or a system pointer, operand 2 may be a data pointer, a space pointer, or a system pointer in any combination. An equal condition occurs if the pointers are addressing the same object. For space pointers and data pointers, only the space they are addressing is considered in the comparison. That is, the space offset portion of the pointer is ignored. All implicit process spaces and teraspace are considered part of an active PCS (Process Control Space) object. Thus a pointer to teraspace or to an implicit process space addresses the same object as any other pointer which addresses the PCS of the process which contains the currently executing thread. Further, since any teraspace reference is local to a process, any two pointers to teraspace used within the same process are defined to address the same object.
For system pointer compare operands, an equal condition occurs if the system pointer is compared with a space pointer or data pointer that addresses the space that is associated with the object that is addressed by the system pointer. For example, a space pointer that addresses a byte in a space associated with a system object compares equal with a system pointer that addresses the system object.
For instruction pointer comparisons, both operands must be instruction pointers; otherwise, a pointer type invalid (hex 2402) exception is signaled. An equal condition occurs when both instruction pointers are addressing the same instruction in the same program. A not equal condition occurs if the instruction pointers are not addressing the same instruction in the same program.
For label pointer comparisons, both operands must be label pointers; otherwise, a pointer type invalid (hex 2402) exception is signaled. An equal condition occurs when both label pointers are addressing the same label in the same procedure. A not equal condition occurs if the label pointers are not addressing the same label in the same procedure.
A pointer does not exist (hex 2401) exception is signaled if a pointer does not exist in either of the operands.
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
36 Space Management
44 Protection Violation