Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!cica!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!ralf From: ralf@b.gp.cs.cmu.edu (Ralf Brown) Newsgroups: comp.sys.ibm.pc Subject: Re: the MS-DOS volume label Keywords: info Message-ID: <5419@pt.cs.cmu.edu> Date: 5 Jul 89 00:01:53 GMT References: <8002@bsu-cs.bsu.edu> <1676@neoucom.UUCP> Organization: Carnegie-Mellon University, CS/RI Lines: 41 In article <1676@neoucom.UUCP> wtm@neoucom.UUCP (Bill Mayhew) writes: } }The volume label is just another file name in the root directory }with one of the attribute bits set to indicate that it is the }volume ID. } }You could read the absolute disk block(s) that comprise the root }directory and set the name with an assembly program, I suppose. Not only is that more work, it can be dangerous if used on nonstandard disks. DOS calls suffice, as the following excerpt from running "INTERCEP" on DOS 3.10 "LABEL.COM" shows: 71DC:03EA 2111 Search for first file matching FCB at 71DC:0115 71DC:0573 2113 Delete file using FCB at 71DC:0142 71DC:0585 215b Create new file (name at 71DC:0103, attr. 08) 71DC:058D 213e Close file handle #0005 First, we search for the label using the FCB version of FINDFIRST/FINDNEXT, passing an extended FCB with the attribute mask set to find volume labels. Since this call will also find normal files, we have to loop until the file found actually has the volume label bit set. Next, the existing label is removed by doing a DELETE call using an extended FCB with the attribute mask set to volume label. Finally, we create a new file with the volume label attribute (bit 3==08h) set. INT 21h/AH=5Bh does not exist under DOS 2.x, so you would have to use the FCB file creation function. Since the create opens the file, we have to close it. }You might be able to use the DOS function calls of 17H or 56H to }rename the disk, but I am not optimistic. I didn't feel like I believe that these calls will fail. -- {harvard,uunet,ucbvax}!b.gp.cs.cmu.edu!ralf -=-=- AT&T: (412)268-3053 (school) ARPA: RALF@CS.CMU.EDU |"The optimist is the kind of person who believes a FIDO: Ralf Brown 1:129/46 | housefly is looking for a way out."--Geo.J.Nathan BITnet: RALF%CS.CMU.EDU@CMUCCVMA -=-=-=-=-=- DISCLAIMER? I claimed something?