EXTENDEDFCB STRUC
extSignature db 0ffh ;extended FCB signature
extReserved db 5 dup(0) ;reserved bytes
extAttribute db ? ;attribute byte
;file control block (FCB)
extDriveID db ? ;drive no. (0=default, 1=A, etc.)
extFileName db '????????' ;filename
extExtent db '???' ;file extension
extCurBlockNo dw ? ;current block number
extRecSize dw ? ;record size
extFileSize db 4 dup (?) ;size of file, in bytes
extFileDate dw ? ;date file last modified
extFileTime dw ? ;time file last modified
extReserved db 8 dup (?) ;reserved bytes
extCurRecNo db ? ;current record number
extRandomRecNo db 4 dup (?) ;random record number
EXTENDEDFCB ENDS
The EXTENDEDFCB structure contains a file control block (FCB) and 7 additional bytes, including an attribute byte.
extSignature
Specifies the extended FCB signature. This value must be 0FFh.
extReserved
Reserved; must be zero.
extAttribute
Specifies the attributes of the file or directory. This field can contain some combination of the following values:
Value | Meaning |
ATTR_READONLY (01h) | Specifies a read-only file. |
ATTR_HIDDEN (02h) | Specifies a hidden file or directory. |
ATTR_SYSTEM (04h) | Specifies a system file or directory. |
ATTR_VOLUME (08h) | Specifies a volume label. The entry contains no other usable information (except for date and time of creation) and can occur only in the root directory. |
ATTR_DIRECTORY (10h) | Specifies a directory. |
ATTR_ARCHIVE (20h) | Specifies a file that is new or has been modified. |
All other values are reserved. (The two high-order bits are set to zero.)
If no attributes are set, the file is a normal file (ATTR_NORMAL).
extDriveID
Identifies the drive containing the file (0 = default, 1 = A, 2 = B, and so on).
extFileName
Specifies the name of the file. The filename must be padded with space characters (ASCII 20h) if it has fewer than eight characters.
extExtent
Specifies the extension. The extension must be padded with space characters (ASCII 20h) if it has fewer than three characters.
extCurBlockNo
Specifies the current block number, which points to the block that contains the current record. A block is a group of 128 records. This field and the extCurRecNo field make up the record pointer. When opening the file, MS-DOS sets this field to zero.
extRecSize
Specifies the size of a logical record, in bytes. MS-DOS sets this field to 128. A program that uses a different record size must fill this field after opening the file.
extFileSize
Specifies the size of the file, in bytes. When opening an existing file, MS-DOS initializes this field from the file's directory entry.
extFileDate
Specifies the date the file was created or last updated. When opening an existing file, MS-DOS initializes this field from the file's directory entry. This 16-bit field has the following form:
Bits | Meaning |
0–4 | Specifies the day. Can be a value in the range 1 through 31. |
5–8 | Specifies the month. Can be a value in the range 1 through 12. |
9–15 | Specifies the year, relative to 1980. |
extFileTime
Specifies the time the file was created or last updated. If the file already exists, MS-DOS initializes this field from the file's directory entry when opening the file. This 16-bit field has the following form:
Bits | Meaning |
0–4 | Specifies two-second intervals. Can be a value in the range 0 through 29. |
5–10 | Specifies minutes. Can be a value in the range 0 through 59. |
11–15 | Specifies hours. Can be a value in the range 0 through 23. |
extReserved
Reserved; do not use.
extCurRecNo
Specifies the current record number, which points to one of 128 records in the current block. This field and the extCurBlockNo field make up the record pointer. MS-DOS does not initialize this field when opening the file. The calling program must set it before performing a sequential read or write operation. This field is maintained by MS-DOS.
extRandomRecNo
Specifies the relative record number for random file access. This field specifies the index of the currently selected record, counting from the beginning of the file. MS-DOS does not initialize this field when opening the file. The calling program must set it before performing a random read or write operation. If the record size is less than 64 bytes, all 4 bytes of this field are used. Otherwise, only the first 3 bytes are used.
Interrupt 21h Function 11h Find First File with FCB
Interrupt 21h Function 12h Find Next File with FCB