Category: DOS kernel
INT 21 - DOS 1+ - FIND FIRST MATCHING FILE USING FCB
AH = 11h
DS:DX -> unopened FCB (see #01345), may contain '?' wildcards
Return: AL = status
00h successful
[DTA] unopened FCB for first matching file
FFh no matching filename, or bad FCB
Notes: the type of the returned FCB depends on whether the input FCB was a
normal or an extended FCB
the data returned in the DTA (disk transfer area) is actually the
drive number (or extended FCB header and drive number) followed by
the file's directory entry (see #01352); this format happens to be
compatible with an unopened FCB
for extended FCBs with search attribute 08h, the volume label (if any)
will be returned even if the current directory is not the root dir.
DOS 3.0+ also allows the '*' wildcard
the search FCB at DS:DX must not be modified if AH=12h will be used to
continue searching; DOS 3.3 has set the following parts of the FCB:
0Ch BYTE ???
0Dh WORD directory entry number of matching file
0Fh WORD cluster number of current directory
11h 4 BYTEs ???
15h BYTE drive number (1=A:)
this function is used by many copy protection schemes to obtain the
starting cluster of a file
BUG: under Windows95, if a .EXE program ("MZ" header) rather than a true
.COM calls this function from a DOS box, the ten bytes of the
directory entry from 0Ch to 15h may be filled with zeros rather than
the additional file times
SeeAlso: AH=12h,AH=1Ah,AH=4Eh,INT 2F/AX=111Bh