Mail Archives: djgpp/1994/10/31/03:15:52
>> > Also, I
>> > think there are some time stamp in the boot record. Semi-expensive
>>
>> AFAIK, there is no time stamp in the boot record, but if you know
>> otherwise, please tell me where in the boot record it dwells.
>
>I've heard that the serial number itself is an encoding of the
>time the disk was formatted.
I've heard that too, but I couldn't find any info on it so I
disassembled format.com from dos 6.1 and found this little procedure:
sub_144 proc near
mov ah,2Ah
int 21h ; DOS Service get date
; cx=year, dh=mon, dl=day
push cx
push dx
mov ah,2Ch
int 21h ; DOS Service get time
; ch=hour, cl=min, dh=sec, dl=hundredths of sec
mov ax,dx
pop dx
add ax,dx
mov data_780,ax
mov data_781,ax
mov ax,cx
pop cx
add ax,cx
mov data_782,ax
mov data_783,ax
ret
sub_144 endp
It essentially adds the 32 bit date and 32 bit time ignoring overflow.
Presumably, data_780, etc are writtem to disk as the volume serial #.
Unfortunately, I don't think it's possible to extract 64 bits of info
from the 32 that we're given :) Besides, other formating programs might
use a different algorithm. All that seems to be advertised about the
serial number is that it's "random".
- Dave
- Raw text -