Article View: comp.lang.modula2
Article #3242Re: Reading Floppies.
From: Dale Pontius
Date: Fri, 02 Feb 1996 13:11
Date: Fri, 02 Feb 1996 13:11
34 lines
2132 bytes
2132 bytes
In article <1996Feb1.125721.18589@ucl.ac.uk>, zcaccau@cs.ucl.ac.uk (Chris Austin) writes: > In modula-2 is there any way that you can determine whether a floppy drive > currently contains a disk and whether it is correctly formatted, (i.e. > whether the drive is readable), without getting the DOS abort, retry or > ignore message. I would like this to work with CD's, IOMEGA ZipDrives, > etc... as well. I have looked through a list of interrupts, but am unable > to find one to do this. I am able to tell whether the drive exists, by > using the setdrive & getdrive interrupts. > > Any help would be appreciated. To expand on the two other responses, (and I hope I'm not talking down to you here) Int24 is the DOS Critical Error Handler. It isn't handled quite like other interrupts, and it isn't exited quite like other interrupts. It probably is the best way for you to go, and as someone said, the JPI compiler includes a sample Int24 handler. I'm not sure if you can call it from inside the Int24 handler, or if you have to wait (probably) until the Int24 handler and the failed DOS call return, but there is another call (I forget the number) that will return extended fail information. This may help you get more of what you need to know, as well. I once used the JPI sample Int24 handler as my starting point for a TSR, since it showed how to completely capture registers on call, and with minor changes could switch to its own stack. Someone offered to email this code to you. Watch out, it has a JPI copyright. Especially if you want to ship/sell something based on it you should acquire a legitimate copy. (I think it's in the Tech-Kit) Dale Pontius (NOT speaking for IBM)
Technical Details
Message-ID:
<4et2hd$9p7@twonky.btv.ibm.com>Path:
arc1-ca.pugleaf.net!mdnews.btv.ibm.com!pontiusReferences:
<1996Feb1.125721.18589@ucl.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mdnews.btv.ibm.com!pontius From: pontius@twonky.btv.ibm.com (Dale Pontius) Newsgroups: comp.lang.modula2 Subject: Re: Reading Floppies. Date: 2 Feb 1996 08:11:09 -0500 Organization: IBM Technology Products Distribution: world Message-ID: <4et2hd$9p7@twonky.btv.ibm.com> References: <1996Feb1.125721.18589@ucl.ac.uk> Reply-To: pontius@vnet.ibm.com NNTP-Posting-Host: twonky.btv.ibm.com