|9Dh||FL$NCAT||file list with wildcards|
Gets the S2'th match of a wildcard file name in the list of the files on a device.
The match string can contain the wild card characters:
* match any number of any characters.
It can also contain any of the following file extensions:
Wild cards cannot be used in file extensions except * on its own so that "MAIN.*" will give all types of file called "MAIN".
"*.*" will give all files of all types.
If no file extension is supplied, .* will be assumed, so that "M*" will give all files of all types starting with "M".
Note that the file extension .OPL will match and file which has Text or object and .OPO and .OPT work in exactly the same way as .OPL.
If the top bit of UTW_S0+1 is set, it means that there is no extension in the filespec, but the file type to use is in UTW_S0.
Returns error 238 when there are no directory entries which match the string supplied.
If the top bit of A is set, returns sizes in UTW_S0.
See also FL$NCAT.
This call is not available on CM/XP machines.
The following procedure will provide a catalog of all saved CM/XP
diary files that begin with "D".
LDAA #1 ;A=1 first time LDX #MATCH LDAB 0,X STAB UTW_S0+1: ;length of match string INX STX UTW_S1: ;Point to match string LDAB #MY_DEVICE ;which device : 0 - 3 for A: to D: BRA FIRST LOOP: LDX #TEMP ;print byte string in TEMP PSHX ;pass address to UT$DISP OS UT$DISP ASCII "%s" ;leading byte count string DB 13,10 ; CR LF DB 0 ;terminator for format string CLRA ;A=0 on subsequent calls to FL$WCAT FIRST: LDX #TEMP ;filenames placed in TEMP by FL$WCAT OS FL$WCAT BCC LOOP ;repeat until error returned CMPB #238 ;eof err means normal BEQ DONE ERROR: ... ;otherwise report error DONE: ... MATCH: ASCIC "D*.DIA"
|Errors||238 - No more entries (normal completion)
246 - no pack in slot
245 - bad or damaged pak in slot
243 - selected an invalid pak.
236 - Bad file name.