FROM: Les Moskowitz Nov. 23, 1991 8:04 A.M Here's the full scoop on diskette serial numbers: The volume serial was introduced with DOS 4.0 as part of an extended boot record and is created through either FORMAT or DISKCOPY. The serial number is a function of the time/date of formatting. 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. The following DOS INT 21h functions may be used to set or determine the serial number (taken from Ralf Brown's INTERRUPT listing): INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST AX = 440Dh BL = drive number (00h=default,01h=A:,etc) CX = 0846h - set volume serial number CX = 0866h - get volume serial number DS:DX Offset Size Description 00h WORD info level (00h) 02h DWORD disk serial number (binary) 06h 11 BYTEs volume label or "NO NAME " 11h 8 BYTEs filesystem type "FAT12 " or "FAT16 " (CL=66h only) Return: CF set on error AX = error code CF clear if successful ------------------------------------------------------------------------- INT 21 - DOS 4.0 internal - GET/SET DISK SERIAL NUMBER AX = 6900h - get serial number AX = 6901h - set serial number BL = drive (0=default, 1=A, 2=B, etc) DS:DX Offset Size Description 00h WORD info level (zero) 02h DWORD disk serial number (binary) 06h 11 BYTEs volume label or "NO NAME " if none present 11h 8 BYTEs (AL=00h only) filesystem type--string "FAT12" or "FAT16" Return: CF set on error AX = error code CF clear if successful ------------------------------------------------------------------------- Patching FORMAT.COM (DOS 5.0) to eliminate the serial number from your diskette requires changing bytes at DEBUG offset 4B91 from 03 C2 (ADD AX,DX) to 31 C0 (XOR AX,AX) and at DEBUG offset 4B9C from 03 C1 (ADD AX,CX) to 31 C0 (XOR AX,AX). The same patch can be applied to DISKCOPY.COM (DOS 5.0) using DEBUG byte addresses at 0B2C and 0B36. Finally, byte 26h of the diskette boot record determines whether or not the volume serial number will be displayed by the DOS DIR command. A value of 29h in this byte will display the volume serial number; any other value causes DIR to ignore the volume serial number (my diskettes contain the value 2Ah).