<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 10 Mar 1984 17:51:00-EST
From   : Eric Stork <STORK@mit-mc>
Subject: Function 37

Charlie 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.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>