73h UT$ISBF find as string in memory
Input X register - Address of major buffer.
UTW_S0 - Address of minor buffer.
A register - Length of major buffer.
B register - Length of minor buffer.
Output B register - Position within major buffer, of found minor buffer, or length of major buffer if not found.
Description

Finds the occurrence of the minor buffer at UTW_S0 within the major buffer at X.

If found, the return value is the index within the major buffer at which the minor buffer occurs; otherwise the length of the major buffer is returned. The index of the first letter of the major buffer is 0.

For example, if the major buffer contains "APPLYING",
1. "PLYING" occurs at index 2
2. "APPLY" occurs at index 0
3. "APPLE" occurs at index 8 (the length of the "APPLYING")

LZ users, see also UT$WILD.

Example The following finds and saves the index of MINOR_BUFFER within MAJOR_BUFFER, and then if found, makes the X register point to the found position in MAJOR_BUFFER.
MAJOR_BUFFER:
        .ASCII  "APPLYING"      ; 8-character major buffer

MINOR_BUFFER:
        .ASCII  "PLYING"        ; this buffer's at index 2 in MAJOR_BUFFER


        LDX     #MAJOR_BUFFER
        PSHX                    ; save address of MAJOR_BUFFER
        LDD     #MINOR_BUFFER   ; point to minor buffer
        STD     UTW_S0:
        LDD     #0805h          ; A=8, B=5
        OS      UT$ISBF
        PULX                    ; restore address of MAJOR_BUFFER
        STAB    INDEX
        CMP     B,#8
        BEQ     NOT_FOUND
FOUND:                          ; here if found
        ABX                     ; X points to found position
Errors - none -