tim@cit-vax.Caltech.Edu (Timothy L. Kay) (02/17/88)
I am writing a device driver. Am I the first person to notice that the DOS Tech Ref Man does a poor job of documenting what to do? I have the basic driver up and running. My problem is that the device I am talking to sometimes takes a very long time to complete its task. Other times it is simply stuck. So, I would like the user to be able to hit ^Break to stop the driver (and the program that did the i/o). How does a device driver that is spin waiting for a device determine if ^Break has been hit? One possibility is to chain off the 0x1b interrupt vector. Isn't there a more civilized way? Tim
loafman@convexe.UUCP (02/18/88)
>I have the basic driver up and running. My problem is >that the device I am talking to sometimes takes a very >long time to complete its task. Other times it is >simply stuck. So, I would like the user to be able to >hit ^Break to stop the driver (and the program that >did the i/o). > >How does a device driver that is spin waiting for a >device determine if ^Break has been hit? > >One possibility is to chain off the 0x1b interrupt >vector. Isn't there a more civilized way? Not really. DOS never intended for a device driver to be interrupted by a control break. The 0x1B interrupt is probably the best solution. Just set a flag there and poll on that one as you wait for you device to complete or stick whichever the case may be. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Kenneth W. Loafman @ CONVEX Computer Corp, Dallas, Texas | All opinions Voice: work: (214) 952-0829 home: (214) 964-1250 | are my own, USPSnail: 1705 Coit Rd #2101, Plano, Tx 75075 | of course. UUCP: ihnp4!convex!loafman | CompuServe: 72345,233 | ...KWL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~