Compare To Pad (CMPTOPAD)
Instruction Syntax
Bound Program Access |
---|
|
Description:
A logical (character) compare is done between the storage specified by string and the pad byte, which is logically replicated as necessary. If the first byte of the string is less than the pad byte value, the result is -1; if the string byte is greater the result is 1. If the bytes are equal the operation continues with the next byte of the string. This process is repeated until an inequality result is returned, or the number of bytes specified by string length have been compared. If all bytes compare equal, the result is 0. If the string length has a value of zero, the result is 0.
The string operand can point to storage containing values of any data type. The values will be interpreted as a logical character string. If the string operand points to storage which contains pointers, any pointer tags will not be taken into account, since this is strictly a byte comparison.
Authorization Required
- None
Lock Enforcement
- None
Exceptions
- 06 Addressing
- 0601 Space Addressing Violation
- 0602 Boundary Alignment
- 08 Argument/Parameter
- 0801 Parameter Reference Violation
- 22 Object Access
- 2202 Object Destroyed
- 220B Object Not Available
- 24 Pointer Specification
- 2401 Pointer Does Not Exist
- 2402 Pointer Type Invalid
- 44 Protection Violation
- 4401 Object Domain or Hardware Storage Protection Violation