Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!texsun!texsun.central-relay.sun.com!convex!convexe!authorplaceholder From: loafman@convexe.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: help with device driver Message-ID: <63200032@convexe> Date: 17 Feb 88 16:43:00 GMT References: <5464@cit-vax.Caltech.Edu> Lines: 25 Nf-ID: #R:cit-vax.Caltech.Edu:-546400:convexe:63200032:000:1167 Nf-From: convexe.UUCP!loafman Feb 17 10:43:00 1988 >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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~