Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!masscomp!peora!tarpit!tous!alfred!business!f88.n363.z1.fidonet.org!Mark.Tutt From: Mark.Tutt@f88.n363.z1.fidonet.org (Mark Tutt) Newsgroups: comp.lang.c Subject: Re: Help with Dos write protect error Message-ID: <351.27EC635A@business.UUCP> Date: 23 Mar 91 14:59:09 GMT Sender: ufgate@business.UUCP (newsout1.26) Organization: FidoNet node 1:363/88 - The Chef's Kitchen , Orlando FL Lines: 32 bla> I am using MSC 5.1 and am trying to find a high level dos or possibly bla> bios bla> call to determine the status of the disk drive. In particular I am bla> trying bla> to detect what the status of the write protect tab is. My problem stems bla> from the fact that I get a write protect error Abort, Retry, Ignore? bla> message bla> when I try to write to a file using fopen and fprintf. I would like to bla> detect the status before I write to the file so that dos doesn't have a bla> chance to display it's error. I have looked in many books and dos bla> manuals bla> for bios calls with no luck. What you are looking for is INT 13H Function 01H. It will return 03H in the AL register if the disk is write protected. However, what it returns is the info from the most recent disk operation, so you would have to call another disk function before calling this one. Perhaps INT 13 Function 00H, reset disk system would be the safest. Hope this helps! Mark -- Mark Tutt - via FidoNet node 1:363/42 UUCP: ARPA: Mark.Tutt@f88.n363.z1.fidonet.org \