GN_Wfn, Fetch next match for wildcard string

Register parameters

RST 20H, DEFW $5609
IN:
     DE = 0,1,2; not allowed
     DE = pointer to buffer for explicit name (should be > 255)
     C = buffer size (limit of space to use)
     IX = wildcard handle (previosly allocated with GN_Opw)

OUT, if call successful:
     Fc = 0
     DE = pointer to null-terminator of explicit name
     B = number of segments in filename
     C = number of characters in explicit filename
     A = DOR type (DN_FIL = file, DN_DIR = directory or DM_DEV = device)
     If the wildcard contained :ROM.*//* then DN_APL would be returned.

OUT, if call failed:
     Fc = 1
     A = error code:
          RC_BAD ($04), bad arguments
          RC_EOF ($09), no more matches
          RC_HAND ($08), bad handle

Registers changed after return:
     ...C..HL/IXIY same
     AFB.DE../.... different 

Notes

The DOR type is useful to find a particular type of information, eg. directories.

Bugs

Please refer to GN_Opw.

Related calls

GN_Esa, read & write to filename segments
GN_Fcm, compress a filename
GN_Fex, expand a filename
GN_Opw, open wildcard handler
GN_Pfs, parse filename segment
GN_Prs, parse filename
GN_Wcl, close wildcard handle
GN_Wsm, match filename segment to wildcard string

web analytics