home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12533 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.7 KB  |  46 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!sybus.sybus.com!card
  3. From: card@sybus.com (James Card)
  4. Subject: Re: Detecting disk change
  5. Message-ID: <1993Jan28.231309.6100@sybus.com>
  6. Sender: news@sybus.com
  7. Nntp-Posting-Host: sybus
  8. Organization: Sybus Corporation, Largo, FL
  9. References: <sankey.728153663@unixg.ubc.ca>
  10. Date: Thu, 28 Jan 1993 23:13:09 GMT
  11. Lines: 33
  12.  
  13. In article <sankey.728153663@unixg.ubc.ca> sankey@unixg.ubc.ca (Todd Sankey) writes:
  14. >
  15. >  Is there any reliable way to detect if the floppy disk has been
  16. >changed short of actually reading it?
  17. >
  18. >-- 
  19. >        Todd Sankey
  20. >        sankey@unixg.ubc.ca
  21. >
  22.  
  23. Many of the new disk drives support a change line status indicator.
  24. I am not sure offhand if there is a way to read this (other than
  25. going directly to the floppy disk controller) so you will have
  26. to research this yourself... but other drives such as the
  27. 360K drives do not support this feature.  What MS-DOS does is
  28. to assume that if a disk drive was last accessed more than a
  29. second ago, then they assume that the diskette has been changed
  30. which is a pretty good assumption.  They picked a second because
  31. apparently after several tests they found that the minimum average
  32. time that a person takes to open a drive and remove the disk was
  33. about 1 second.
  34.  
  35. Check the extended INT 13H calls that the AT's introduced to see
  36. if you can read the disk change status indicator... and also to see
  37. if a drive supports that feature.  I believe that there were 
  38. function calls for both.
  39.  
  40. jC
  41. -- 
  42.   __/o___~_                 James Card (Firmware Engineer)
  43.  (________|  Nothin' like   Sybus Corporation
  44.    @    @    top down       2300 Tall Pines Dr. Suite 100
  45.              weather...     Largo, Fl  34641  (813) 535-6999
  46.