Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!steinmetz!zephyrus!dixon
From: dixon@zephyrus.steinmetz (Walter V. Dixon)
Newsgroups: comp.sys.ibm.pc
Subject: Re: Need Help With Modifying Existing Volume Label
Message-ID: <11483@steinmetz.ge.com>
Date: 8 Jul 88 17:26:50 GMT
References: <1170@micomvax.UUCP>
Sender: news@steinmetz.ge.com
Reply-To: dixon@zephyrus.UUCP (Walter V. Dixon)
Organization: General Electric CRD, Schenectady, NY
Lines: 26

It is relatively easy to read and modify volume labels.  I suspect
that the root of your problem is that you were not using an extended
FCB.  To find a volume label,  an extended fcb is required.  You
must set the attributes field to 08h;  otherwise labels will be
ignored.  Existing labels can be deleted with a fcb delete file
(ah=13h?) again using an extended fcb.  On a file create function
you specify directory attributes in cx.  Placing a value of 08h
in cx when you create a file will write a label to disk.

The PC-DOS label utility (at least as of dos 3.10) does nothing
undocumented.  It checks the dos version,  sets a dta, (the default
dta is used for the command line and stack),  looks for an existing
label with a fcb find first (using an EXTENDED fcb),  validates
the new label/confirms that you want to erase the existing label,
deletes the label with a fcb delete again using an extended fcb,
and then writes a new label using int 21h ah=5bh which conditionally
creates a label (cx is set to 08h before int 21),  and then closes
the file.  Nothing mysterious or undocumented happens.

I hope this helps.

Walt Dixon		{ARPA		: dixon@ge-crd.com	}
			{US Mail	: GE CRD		}
			{		  PO Box 8		}
			{		  Schenectady, NY 12345 }
			{Phone		: 518-387-5798		}