Hello,
I am probably being lazy and could find this info out if I could get hold of an open source format utility, but I'll ask anyway.
In the FAT specification it says the volume serial number is a 32bit value derived from the current date and time. It would have been really nice if they gave an example.
So if a disk is formatted at 2003 July 4, 12:15:34pm, how is that date / time converted to a 32 bit value by DOS??
Thanks!
How does DOS work out the volume serial number?
RE:How does DOS work out the volume serial number?
You can do it any way. The main point is that this number is unik. So any system which sets this value should set it in some way, that there is very low probability that this number repeats.
Anton.
Anton.
RE:How does DOS work out the volume serial number?
I wouldn't be surprised if it's the same way Unix (and C) do it; as the number of seconds that've passed since January 1, 1970 (I believe that's the date they use).
Cheers,
Jeff
Cheers,
Jeff
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
RE:How does DOS work out the volume serial number?
The first part of the serial number is equal to the sum of the time
(seconds and hundredths of a second) and the date (month and day); The
second part of the serial number is equal to the sum of the time (hours
and minutes) and date (year), where all numbers are in hex. For
example, if the diskette is formatted at 8:32:43.65 on 7/21/1991, the
first part of the serial number will be 2B41+0715, or 3256; the second
part of the serial number will be 0820+07C7, or 0FE7.
By some Ray
(seconds and hundredths of a second) and the date (month and day); The
second part of the serial number is equal to the sum of the time (hours
and minutes) and date (year), where all numbers are in hex. For
example, if the diskette is formatted at 8:32:43.65 on 7/21/1991, the
first part of the serial number will be 2B41+0715, or 3256; the second
part of the serial number will be 0820+07C7, or 0FE7.
By some Ray