7Bh UT$XCAT display all filenames of a given type
Input UTW_S0 (least significant byte only): record type of filename ($81-8F, 0 for all file types)
Output - none -

Displays all filenames of the given record type (in the byte UTW_S0+1) on the current device.

A record type of $81 in UTW_S0+1 will do a directory of data files, as in the OPL DIR$ function, and any other value up to $8F inclusive will do a directory of block files of the given type.

Waits for EXE or ON/CLEAR to be pressed after displaying each filename. If EXE is pressed the next filename is displayed, while ON/CLEAR exits UT$XCAT.

Displays "END OF PACK" (or on the LZ "NO MORE ENTRIES") message when no more filenames found, and then pressing EXE displays the first filename again, and ON/CLEAR exits.

Other error messages possibly reported are for

  1. no pack in slot
  2. bad or damaged pack in slot
  3. an invalid pack selected

after any of which UT$XCAT is exited.

See also FL$BCAT.

Example Display names of all diary files saved.
        LDAA    #BDIATYP   ; BDIATYP ($82) is diary filename record type 
        STAA    UTW_S0+1   ; Store in LSB of UTW_S0
        OS      UT$XCAT
Errors - none -