Path: utzoo!attcan!uunet!cs.utexas.edu!yale!cs.yale.edu!fischer-michael From: fischer-michael@CS.YALE.EDU (Michael Fischer) Newsgroups: comp.sys.atari.st Subject: Re: floppy disk-change (again) Message-ID: <20407@cs.yale.edu> Date: 27 Mar 90 19:03:42 GMT References: <1990Mar24.192858.1655@ns.network.com> Sender: news@cs.yale.edu Reply-To: fischer-michael@CS.YALE.EDU (Michael Fischer) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 29 In article <1990Mar24.192858.1655@ns.network.com> logajan@ns.network.com (John Logajan) writes: >From time to time I've seen mention of replacement floppy drives not indicating >disk change status. Since I've had a replacement drive for longer than my >human memory works, I don't recall if the original could really detect disk >change status either. Media change is detected using the write-protect line and the disk ID written in the boot sector. It is assumed that this line will go on whenever a disk is removed. Whenever a disk operation is requested, the system determines whether or not the media has changed by the following algorithm: If the write protect line has gone on since the last disk operation and more than a second or two of time has elapsed, then read the boot sector and check if the disk ID has changed. If it has, then a new disk has been inserted. Otherwise, assume the same disk is still in the drive. Notes: (1) if the disk is write protected, then the boot sector will be reread whenever an operation is performed after the disk has been idle more than a second or two. This is safe but takes extra time. (2) If two disks have the same disk ID, or the write-protect line does not work, then media change will NOT be detected, with predictably disasterous results. ================================================== | Michael Fischer | | Arpanet: | | Bitnet: | | UUCP: | ==================================================