Function 11h (17)        Search for First Matching File, Using FCBs

Searches the current directory for the first matching filename.

On entry:      AH         11h
DS:DX      Pointer to an unopened FCB

Returns:       AL         00h       If filename match found
FFh       If no filename match found

                                                                          

Notes:         The intended use of this service is to handle
filenames that include '?' wildcard characters. This
function begins the process, and Function 12h (18)
continues the search for subsequent files.

Function 29h (Parse Filename) is useful for creating
an unopened FCB in preparation for searching.

If a file is found, an unopened FCB will be set up
at the current Disk Transfer Address. Before calling
this function, you should therefore ensure that
there is enough room reserved at the DTA for the
FCB; if necessary, use Function 1Ah to set the DTA.

If the FCB is an extended FCB, you can specify the
attributes of the file you wish to search for. If
you specify any combination of the hidden, system,
or directory attribute bits, the search will match
normal files and also any files with the specified
attributes. If you specify the volume-label
attribute, however, the function will search only
for a volume-label entry. The archive and read-only
attributes cannot be used as search criteria.

If the search uses an extended FCB, and extended FCB
is put in the DTA with the 0FFh signature byte
(offset -7) at the start of the DTA.

File Control Blocks are a holdover from DOS 1. It is
preferable to search for files using functions 4Eh
(Find First) and 4Fh (Find Next).

See also: 12h
See also: 1Ah
See also: 29h
See also: 4Eh
See also: 4Fh
See also: FCB
See also: File Attributes

11h (17) Search for First Matching File, Using FCBs