The date and time fields are updated every time the
file is changed.
The starting cluster field indicates where the
beginning of the file is stored on the disk. DOS uses
clusters to define disk areas. Depending on the type and
capacity of a disk, a cluster can be from 1 to 128 sectors.
A 5.25-inch, 360K floppy disk has 2 sectors per cluster.
A 32M fixed disk has 4 sectors per cluster. DOS uses
the starting cluster field to reference the file allocation
table (FAT) to get information as to where the entire file
is stored.
File Allocation Table
The file allocation table (FAT) is created during the
formatting process.
There is a FAT entry for each
cluster on the disk. A FAT entry will be
a zero (0), to indicate the cluster is available for
storage,
an end of file code,
a bad cluster code (written during formatting),
or
a number that points to the next cluster in the
file.
Suppose we have a file named EVAL.ABC on a
5.25-inch, 360K floppy disk. The file is 4,608 bytes
long and could be stored in 4.5 clusters. DOS cannot
use partial clusters so this file would occupy 5 full
clusters. The directory entry for the starting cluster
indicates cluster 25 as the first cluster of this file. Table
10-3 illustrates what the FAT entries for this file might
look like.
As illustrated in table 10-3, the disk had clusters 25,
26, and 27 available to store EVAL.ABC, then had more
data so the rest of the file was stored in clusters 70 and
71. Note also the FAT is a one-way pointer. That is, by
examining the contents of the entry for cluster 70, we
see that the file continues in cluster 71, but we dont
know the previous cluster was cluster 27.
TOPIC 2FLOPPY DISKS AND
DISK DRIVES
Floppy disks are available in a variety of densities
for each size of disk. The disks are labeled as to the
maximum density each is designed to handle. Table
10-4 shows the sizes and densities of some floppy disks.
The differences between the disk types listed in tables
2-4 and using them in various drives is covered in detail
later in this chapter.
Table 10-3.Contents of a File Allocation Table
Table 10-4.Floppy Disk Density Formats
10-6