Test and Replace Bytes (TESTRPL)

Bound program access

Built-in number for TESTRPL is 413. TESTRPL ( source : address of an aggregate which is the source for tested bytes and the receiver for replaced bytes source_length : is an unsigned binary(4) value which specifies the length of the source aggregate being tested and optionally modified position : address of an aggregate which provides relative position information within the replacement operand for byte values which match source values replacement : address of an aggregate which provides replacement byte values for source values which matched a position operand value other_length : unsigned binary(4) value which specifies the lengths of the relative position and replacement bytes aggregates )

Description

Bytes in the source are tested for matching values in the position aggregate. If a match is found, the byte value from the same relative offset within the replacement aggregate, as the matching value is within the position aggregate, is used to change the source byte value.

The operation proceeds byte by byte from left to right until each byte in the source has been tested and optionally modified.

Each byte of the source is compared with the individual byte values in the position aggregate. If a byte of equal value does not exist in the position aggregate, the source byte value is left unchanged. If a byte of equal value is found in the position aggregate, the corresponding byte in the same relative location within the replacement aggregate is used to modify the original source value. If a byte value in the position aggregate is duplicated, the first occurrence (leftmost) is used.

If any of the other operands overlap with the source aggregate but do not share all of the same bytes, results of this operation are unpredictable.

Authorization Required

Lock Enforcement

Exceptions

06 Addressing

08 Argument/Parameter

22 Object Access

24 Pointer Specification

44 Protection Violation