Table of Contents

Search List (SLT)/OP=64

Format

OP AF BF A Syllable B Syllable C Syllable

OP = 64

AF Unused and reserved. AF can be indirect, but a literal flag causes an invalid instruction fault (IEX=21).
BF Search variant. Can be specified as an indirect field length. The following variants can be specified by this field after any indirect field length has resolved:

BF MSD (BIT) Meaning
3 Reserved
2 Store IX2 (Delink)
1 Pointer and Links length
0 Reserved
BF LSD (DIGIT) Meaning
9 Search Lowest
8 Search Highest
7 No bit equal
6 Any bit equal
5 A greater than or equal to B
4 A greater than B
3 A less than or equal to B
2 A less than B
1 A not equal to B
0 A equal to B

All other BF values are reserved and cause an invalid instruction fault (IEX=26).

A Syllable - Address of the key field can be indexed, indirect, or extended. The final address controller specifies the data type for both the key (A) and the comparison. The address controller must specify UN or UA. An SN controller causes an invalid instruction fault (IEX=03).
B Syllable - Address of the list entry pointer can be indexed, indirect, or extended. The final address controller must equal UN or cause an invalid instruction fault (IEX=03). This six digit field contains an address that is relative to the same memory area as the B-address. This address is a pointer to the first list entry. A value of EEEEEE indicates an empty or NULL list.
C Syllable - Address of the list descriptor can be indexed, indirect, or extended. The final address controller must equal UN or an invalid instruction fault (IEX=03) occurs. The length of this field is always 18 digits and in the following format:

Digits Information
00-05 Link Offset (digits)
06-11 Comparison Offset (digits)
12-17 Key Length (digits)

Note: The lowest memory address is 00.

Function

SLT is a general search instruction for linked lists that can reside in more than one memory area.

The B-address specifies a location in memory that contains the address of the list entry pointer. The list entry link field is located in the list entry at an offset specified by the link offset field in the list descriptor.

The list entry pointer and link fields describe addresses that can be of two different formats and are controlled by BF MSD bit 1. If the bit is reset, the format is a 6-digit field, AAAAAA. The address is relative to the same area base as the B-address. If the bit is set, the format is an 8-digit field, CiAAAAAA, where i represents a base indicant with a value that can be from 0 through 7, and C is the positive sign.

If the initial value of the list field entry pointer (B) is equal to EEEEEE or CiEEEEEE, the list is empty. If BF MSD bit 1 is reset, the value CiEEEEEE, where i represents the base indicant of the resolved B-operand, is stored in IX1, and the comparison flags are set to NULL. If BF MSD bit 1 is set, the list entry pointer itself (CiEEEEEE) is stored in IX1, and the comparison flags are set to NULL. If the store of IX2 is specified by BF MSD bit 2, the address of the list entry pointer (B), relative to the same base as the resolved B-operand, is stored in IX2 (format = CiAAAAAA).

If the list is not empty, the data contained in the key (A) with a length as specified by the key length (C 12:6), is compared with the data located in a specified list entry key field. This list entry key field is found by adding the comparison offset (C 06:6) to the value of the list field entry pointer. The result of the comparison causes one of two actions.

  1. Except in the case of search lowest or search highest, if the selected comparison condition is met, the list entry pointer is stored in IX1 (format = CiAAAAAA). If BF MSD bit 1 is set, the value stored is the 8-digit list entry pointer itself. If BF MSD bit 1 is reset, AAAAAA is the list entry pointer, i is the base indicant of the resolved B-operand, and C is the positive sign.

    In the case of search lowest or search highest, the entire list is examined before the address of the entry with the lowest or highest value is stored in IX1.

    If the store of IX2 is specified by BF MSD bit 2 and this is the first comparison, the address of the list entry pointer is stored in IX2 (format = CiAAAAAA); i is the base indicant of the resolved B-operand.
    If it is other than the first comparison, the address of the previous link entry field is stored in IX2 (format = CiAAAAAA).
    If BF MSD bit 1 is set, the value stored is the 8-digit address of the previous list entry link field.

    If BF MSD is reset, AAAAAA is the address of the previous link address field, i is the base indicant of the resolved B-operand, and C is the positive sign.
  2. If the selected comparison condition is not met, the list entry link field contains the address of the next list entry to be examined. This procedure is repeated until the comparison condition is met or the link address is equal to EEEEEE of CiEEEEEE.

    If the link address is EEEEEE or CiEEEEEE, the NULL list value (CiEEEEEE) is stored in IX1. If the store of IX2 is specified by BF MSD bit 2, the address of the previous list entry link is stored in IX2.

    Refer to 1 for details on the format of data stored in IX1 and IX2.

Variants

The variants are described as follows:

Comparison Flags

Set the Comparison Flags to HIGH if the A-string is of greater value than the B-String.

If the comparison condition is met on the first entry, the Comparison Flags are set LOW. If the comparison condition is met on other than the first entry, the comparison flags set to EQUAL. If the comparison condition is not met, the comparison flags set to HIGH.

If the list is empty, the Comparison Flags are set to NULL.