Compare Null-Terminated Strings Constrained (STRNCMPNULL)
Instruction Syntax
Bound Program Access |
---|
|
Description:
A compare is done of the storage specified by null terminated string1 and null terminated string2. If the first byte of null terminated string1 is less than the first byte of null terminated string2, the function returns -1; if the byte is greater the function returns 1. If the bytes are equal the function continues with the next byte. This process is repeated until either:
- The end of null terminated string1 (ie. a null character) and null terminated string2 is reached. The function returns 0.
- The end of null terminated string1 is reached. The function returns -1.
- The end of null terminated string2 is reached. The function returns 1.
- The number of characters specified by maximum compare length have been compared. The function returns 0.
Authorization Required
- None
Lock Enforcement
- None
Exceptions
- 06 Addressing
- 0601 Space Addressing Violation
- 0602 Boundary Alignment
- 24 Pointer Specification
- 2401 Pointer Does Not Exist
- 44 Protection Violation
- 4401 Object Domain or Hardware Storage Protection Violation