MS-DOS 6.22 Volume Creation Date Tracking Explained
MS-DOS 6.22 does not feature a dedicated "volume creation date" field in its FAT12 or FAT16 partition boot sectors. Instead, the operating system records the date and time of partition creation through two distinct mechanisms: the timestamp of the Volume Label entry stored in the root directory, and the generation of a 32-bit Volume Serial Number derived directly from the system clock during formatting.
The Volume Label Directory Entry
When a partition is formatted using the MS-DOS 6.22
FORMAT utility, the system prompts the user to enter an
optional volume label. Regardless of whether a user specifies a name or
leaves it blank, MS-DOS utilizes the root directory table to store
volume metadata.
In the FAT12 and FAT16 file systems used by MS-DOS 6.22, the volume
label is represented as a standard 32-byte directory entry with its
attribute byte set to 0x08 (ATTR_VOLUME_ID).
This entry shares the same structure as regular files and folders,
meaning it contains standard DOS date and time fields:
- Time (Bytes 22–23): A 16-bit bitfield storing the hour (bits 11–15), minute (bits 5–10), and second divided by two (bits 0–4).
- Date (Bytes 24–25): A 16-bit bitfield storing the year offset from 1980 (bits 9–15), month (bits 5–8), and day of the month (bits 0–4).
Because FORMAT creates this directory entry immediately
upon finishing the disk preparation, the timestamp embedded in bytes 22
through 25 represents the volume's creation date and time. However, if a
user later modifies the volume label using the LABEL
command, MS-DOS updates this directory entry, overwriting the original
format timestamp with the current system date and time.
The Volume Serial Number
To prevent disk confusion during floppy swaps and disk caching
operations, MS-DOS 6.22 implements an Extended BIOS Parameter Block
(EBPB) in the partition's boot sector. Offset 0x27 of the
boot sector holds a 32-bit Volume Serial Number (displayed by commands
like DIR and VOL as
XXXX-XXXX).
While this value is treated as an identifier rather than an explicit
human-readable date, MS-DOS 6.22 generates it via an arithmetic formula
based on the system date and time when FORMAT.COM
executes:
- System Date Retrieval: The format tool queries the
BIOS/DOS clock via Interrupt
21h, Function2Ahto obtain the year, month, and day. - System Time Retrieval: The tool queries Interrupt
21h, Function2Chto obtain the hour, minute, second, and hundredths of a second. - Calculation: The values are combined into two
16-bit words:
- Low Word: Created by adding the current seconds and hundredths of seconds to the current minutes and hours.
- High Word: Created by adding the day and month to the year.
The resulting 32-bit integer provides a permanent trace of the partition's creation moment that remains intact in the boot sector even if the root directory's volume label is deleted or modified.