INT 21 - DOS 2+ - "FINDFIRST" - FIND FIRST MATCHING FILE AH = 4Eh AL = special flag for use by APPEND (refer to note below) CX = file attribute mask (see #01420 at AX=4301h) (bits 0 and 5 ignored) 0088h (Novell DOS 7) find first deleted file DS:DX -> ASCIZA NUL-terminated ASCII string. The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h. Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. file specification (may include path and wildcards) Return: CF clear if successful Disk Transfer Area filled with FindFirst data block (see #01626) CF set on error AX = error code (02h,03h,12h) (see #01680 at AH=59h/BX=0000h) Notes: for search attributes other than 08h, all files with at MOST the specified combination of hidden, system, and directory attributes will be returned. Under DOS 2.x, searching for attribute 08h (volume label) will also return normal files, while under DOS 3.0+ only the volume label (if any) will be returned. this call also returns successfully if given the name of a character device without wildcards. DOS 2.x returns attribute 00h, size 0, and the current date and time. DOS 3.0+ returns attribute 40h and the current date and time. immediately after an INT 2F/AX=B711h (APPEND return found name), the name at DS:DX will be overwritten; if AL=00h on entry, the actual found pathname will be stored, otherwise, the actual found path will be prepended to the original filespec without a path. under LANtastic, this call may be used to obtain a list of a server's shared resources by searching for "\\SERVER\*.*"; a list of printer resources may be obtained by searching for "\\SERVER\@*.*" under the FlashTek X-32 DOS extender, the filespec pointer is in DS:EDX BUGS: under DOS 3.x and 4.x, the second and subsequent calls to this function with a character device name (no wildcards) and search attributes which include the volume-label bit (08h) will fail unless there is an intervening DOS call which implicitly or explicity performs a directory search without the volume-label bit. Such implicit searches are performed by CREATE (AH=3Ch), OPEN (AH=3Dh), UNLINK (AH=41h), and RENAME (AH=56h) DR DOS 3.41 and 5.0 return the Directory attribute for the volume label SeeAlso: AH=11h,AH=4Fh,AX=4301h,AX=714Eh,AX=71A1h,AX=F257h/SF=02h SeeAlso: INT 2F/AX=111Bh,INT 2F/AX=B711h Format of FindFirst data block: Offset Size Description (Table 01626) ---PC-DOS 3.10, PC-DOS 4.01, MS-DOS 3.2/3.3/5.0--- 00h BYTE drive letter (bits 0-6), remote if bit 7 set 01h 11 BYTEs search template 0Ch BYTE search attributes ---DOS 2.x (and some DOS 3.x???)--- 00h BYTE search attributes 01h BYTE drive letter 02h 11 BYTEs search template ---WILDUNIX.COM--- 00h 12 BYTEs 15-character wildcard search pattern and drive letter (packed) 0Ch BYTE search attributes ---DOS 2.x and most 3.x--- 0Dh WORD entry count within directory 0Fh DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. pointer to DTAsee Disk Transfer Address??? 13h WORD cluster number of start of parent directory ---PC-DOS 4.01, MS-DOS 3.2/3.3/5.0--- 0Dh WORD entry count within directory 0Fh WORD cluster number of start of parent directory 11h 4 BYTEs reserved ---OS/2 MVDM--- 00h WORD "OS2_BMP_handle" 02h WORD "OS2_LastEnt" 04h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. "OS2_Checksum" 08h BYTE "OS2_usi_flag" 09h DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. used by DOS emulator for second pass for volume-label searches 0Dh WORD (ret) "DOS_LastEnt" entry count within directory 0Fh BYTE OS/2 Processed-FindFirst flag 00h FindFirst processed by DOS 42h FindFirst processed by OS/2 10h 5 BYTEs reserved for future use ---all versions, documented fields--- 15h BYTE attribute of file found 16h WORD file time (see #01665 at AX=5700h) 18h WORD file date (see #01666 at AX=5700h) 1Ah DWORDDoubleword; four bytes. Commonly used to hold a 32-bit segment:offset or selector:offset address. file size 1Eh 13 BYTEs ASCIZA NUL-terminated ASCII string. The ASCIZ string "ABC" consists of the four bytes 41h, 42h, 43h, and 00h. Unless otherwise specified, maximum lengths given in the interrupt list do not include the terminating NUL. filename+extension