Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!sri-unix!STORK@mit-mc From: STORK%mit-mc@sri-unix.UUCP Newsgroups: net.micro.cpm Subject: Function 37 Message-ID: <17400@sri-arpa.UUCP> Date: Sat, 10-Mar-84 17:51:00 EST Article-I.D.: sri-arpa.17400 Posted: Sat Mar 10 17:51:00 1984 Date-Received: Tue, 13-Mar-84 07:58:07 EST Lines: 51 From: Eric StorkCharlie Strom: , Thanks for the 3/10/84 net-msg on BDOS Function 37. A couple of months ago there was a lot of net traffic on this subject. That triggered me to do some investigation. Here is what learned, in part from thoughtful messages from FJW, W8SDZ, and some others, and in part from my own hacking: , * FJW provided the key by pointing out that Function 37 (F-37) does NOT reset the disk to which [DE] points, but rather disables the write-protect that normally prevents a write if the disk map on the disk does not match the disk map in memory. , * That leads to the logical conclusion that when one uses F-37, one must ALSO assure that the disk map in memory matches the actual disk. , * Through experimentation (switching disks and looking at the disk map in memory, which one can do using DDT or SID, and BDOS F-27) I found that every time a did a SEARCH FOR FIRST file (BDOS F-17) the disk map was reset. , * My conclusion (and I'd welcome criticism!) is that F-37 can be safely used to reset a specific disk so long as it is followed by a F-17 operation. Of course, any file on the disk being removed has to be closed first, to save the data. , * The disasters described by some seem to happen when one does a file write (or delete) after F-37 and a disk switch BUT before a disk map reset with F-17. , * Of course, that leaves the question of why use F-37 at all? I don't if I don't have to -- I'm old enough to have become a devout coward who avoids needless risks. But there are times when F-13 will not do the job. Sometimes F-13 does undesirable things to the program you're in -- then there is not other way if a disk switch is needed. Or is there? , * Hope this helps. I'd welcome further analytical discussion. I agree that Pournelle's current BYTE advice, though helpful in warning people, should have gone further than just say "don't do it". , Eric.