
Some necessary stuff about DOS  data structures you can find
below.

Format of File Control Block:

Offset      Size      Description      (Table 0648)
 -7     BYTE       extended FCB if FFh
 -6   5 BYTEs      reserved
 -1     BYTE       file attribute if extended FCB
 00h    BYTE       drive number (0 = default, 1 = A, etc)
 01h  8 BYTEs      blank-padded file name
 09h  3 BYTEs      blank-padded file extension
 0Ch    WORD       current block number
 0Eh    WORD       logical record size
 10h    DWORD      file size
 14h    WORD       date of last write (see #0952 at AX=5700h)
 16h    WORD       time of last write (see #0951 at AX=5700h) (DOS 1.1+)
 18h  8 BYTEs      reserved (see #0649,#0650,#0651,#0652,#0653)
 20h    BYTE       record within current block
 21h    DWORD      random access record number (if record size is > 64 bytes, high
                   byte is omitted)

Note: to use  an extended FCB, you must  specify the address
of the FFh flag at offset -7, rather than the address of the
drive number field


Format of FCB reserved field for DOS 3.x:
Offset    Size      Description      (Table 0652)
 18h      BYTE      number of system file table entry for file
 19h      BYTE      attributes
            bits 7,6: 00 = SHARE.EXE not loaded, disk file
                    01 = SHARE.EXE not loaded, character device
                    10 = SHARE.EXE loaded, remote file
                    11 = SHARE.EXE loaded, local file or device
            bits 5-0: low six bits of device attribute word
---SHARE.EXE loaded, local file---
 1Ah      WORD      starting cluster of file on disk
 1Ch      WORD      (DOS 3.x) offset within SHARE of sharing record
              (see #0924 at AH=52h)
 1Eh      BYTE      file attribute
 1Fh      BYTE      ???
---SHARE.EXE loaded, remote file---
 1Ah      WORD      number of sector containing directory entry
 1Ch      WORD      relative cluster within file of last cluster accessed
 1Eh      BYTE      absolute cluster number of last cluster accessed
 1Fh      BYTE      ???
---SHARE.EXE not loaded---
 1Ah      BYTE      (low byte of device attribute word AND 0Ch) OR open mode
 1Bh      WORD      starting cluster of file
 1Dh      WORD      number of sector containing directory entry
 1Fh      BYTE      number of directory entry within sector

Note: if FCB opened on character device, DWORD at 1Ah is set
to the address of the device driver header, then the BYTE at
1Ah is overwritten.

Format of FCB reserved field for DOS 5.0:

Offset    Size      Description      (Table 0653)
 18h      BYTE      number of system file table entry for file
 19h      BYTE      attributes
            bits 7,6: 00 = SHARE.EXE not loaded, disk file
                    01 = SHARE.EXE not loaded, character device
                    10 = SHARE.EXE loaded, remote file
                    11 = SHARE.EXE loaded, local file or device
            bits 5-0: low six bits of device attribute word
---SHARE.EXE loaded, local file---
 1Ah      WORD      starting cluster of file on disk
 1Ch      WORD      unique sequence number of sharing record
 1Eh      BYTE      file attributes
 1Fh      BYTE      unused???
---SHARE.EXE loaded, remote file---
 1Ah      WORD      network handle
 1Ch      DWORD      network ID
---SHARE not loaded, local device---
 1Ah      DWORD      pointer to device driver header
 1Eh  2 BYTEs      unused???
---SHARE not loaded, local file---
 1Ah      BYTE      extra info
            bit 7: read-only attribute from SFT
            bit 6: archive attribute from SFT
            bits 5-0: high bits of sector number
 1Bh      WORD      starting cluster of file
 1Dh      WORD      low word of sector number containing directory entry
 1Fh      BYTE      number of directory entry within sector


Format of FindFirst data block:

/ taken from Ralf's Interrupt list /


Offset      Size      Description      (Table 0913)
---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  BYTEs15-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    DWORD     pointer to DTA???
 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
---all versions, documented fields---
 15h    BYTE      attribute of file found
 16h    WORD      file time (see #0951 at AX=5700h)
 18h    WORD      file date (see #0952 at AX=5700h)
 1Ah    DWORD     file size
 1Eh 13 BYTEs     ASCIZ filename+extension

