Xref: utzoo comp.misc:11650 comp.sys.ibm.pc.misc:7242 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool.mu.edu!uunet!abvax!iccgcc!walters From: walters@iccgcc.decnet.ab.com Newsgroups: comp.misc,comp.sys.ibm.pc.misc Subject: Re: DOS 4.0 Volume Serial Numbers Message-ID: <3632.27d510c4@iccgcc.decnet.ab.com> Date: 6 Mar 91 20:54:42 GMT References: <12818@hubcap.clemson.edu> <1991Mar5.033219.369@nuchat.sccsi.com> Lines: 42 In article <1991Mar5.033219.369@nuchat.sccsi.com>, paul@nuchat.sccsi.com (Paul Hutmacher) writes: > In article <12818@hubcap.clemson.edu> chrisb@hubcap.clemson.edu (Chris Behrens) writes: >>Is there a way to access these ?? Or is there a way to change them ?? > Here is how you get/set the volume serial number. Others have already posted with regard to the serial numbers usefullness. Hope this helps!!!! INT 21 - DOS 4.0 internal AH = 69h AL = subfunction 00h get serial number 01h set serial number BL = drive (0=default, 1=A, 2=B, etc) DS:DX -> disk info (see below) Return: CF set on error AX = error code (see AH=59h) CF clear if successful AX destroyed (AL = 00h) buffer filled with appropriate values from extended BPB (AL = 01h) extended BPB on disk set to values from buffer Notes: does not generate a critical error; all errors are returned in AX error 0005h given if no extended BPB on disk does not work on network drives (error 0001h) buffer after first two bytes is exact copy of bytes 27h thru 3Dh of extended BPB on disk Format of disk info: 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 " Tom No Sig Yet