Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watcgl.UUCP Path: utzoo!watmath!watnot!watcgl!jchapman From: jchapman@watcgl.UUCP (john chapman) Newsgroups: net.micro.pc Subject: Re: MS-DOS function 4Eh problem! Message-ID: <2388@watcgl.UUCP> Date: Wed, 21-Aug-85 10:45:19 EDT Article-I.D.: watcgl.2388 Posted: Wed Aug 21 10:45:19 1985 Date-Received: Sat, 24-Aug-85 03:48:58 EDT References: <1106@pucc-i> Organization: U of Waterloo, Ontario Lines: 48 > > I am writing a program in which, among other things, I would like to > be able to read (and set or alter) disk's Volume-ID label. I was hoping that > I could use MS-DOS function call 4Eh to obtain the v-id label with attribute > byte set to 08 and the pathname set to *.*. To my surprise, 4E would return > the file name (and the rest) of the first file on the disk regardless of the > file attribute. In fact it seems that 4E function does not try to mach file > attribute as it is documented in the MS-DOS manual since most files have the > byte attribute of 20h and no matter to what value the CX register is set, 4E > only maches the pathname. > > Am I not interpreting documentation correctly or is this a bug? BTW, > program is written in Turbo Pascal 3.0 and running on Pronto Series 16 with > MS-DOS 2.0. Also, I am aware of the alternate ways to do it (use absolute > disk read interrupt 25h to get the directory sectors and manipulate them > "manually"). > > DK {decvax|harpo|ihnp4|inuxc|seismo|ucbvax}!pur-ee!pucc-i!ade I think the problem is the wording of the manual. Mine says that the pattern you give is matched against any files with a more inclusive set of attributes. The 20h bit is the archive bit (set on when the file is created and whenever it is modified) and is useful for writing backup programs. If the attribute you give is 20h then it should match all files with that bit "on" regardless of the state of other bits but not files without that bit - conversely if you use an attribute byte with that bit "off" then you will also match against files with that bit on (as well as the ones with that bit "off"). You would also, for example, get files that are directories. If you set only the vol-id bit then you should get only the volume name but the path you give it should be * not *.* . Hope this helps. BTW - since you appear to be running turbo 3.0 under MS-DOS (as opposed to PC-DOS I assume) maybe you could answer a question of mine: does the generic version of 3.0 support tree structured directories (both as input pathnames to the compiler and in terms of being able to give an arbitrary pathname to open a file in a program)? The ads seem to imply that this available on the the PCDOS versions and not the generic MSDOS versions. thanks. -- John Chapman ...!watmath!watcgl!jchapman Disclaimer : These are not the opinions of anyone but me and they may not even be mine.