home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!canterbury.ac.nz!phys169
- Newsgroups: comp.os.ms-windows.programmer.misc
- Subject: Non-windows comms program under Windows?
- Message-ID: <1992Aug19.162748.406@csc.canterbury.ac.nz>
- From: phys169@csc.canterbury.ac.nz
- Date: 19 Aug 92 16:27:48 +1200
- Organization: University of Canterbury, Christchurch, New Zealand
- Lines: 28
-
- If I have a NON-WINDOWS communications program (or at least one capable of
- running without Windows), which sometimes will be run under windows, what is
- the best way to avoid losing characters on the coms port (assuming I rewrite
- it a bit - even detecting whether it is being run under windows and doing
- something special then)?
-
- So far, the alternatives seem to be:
-
- (a) Grab the coms port IRQ inside the coms program, and buffer input in an ISR,
- (b) Have a separate TSR/device driver, loaded before Windows runs, that grabs
- the IRQ and buffers the input from the coms port, or
- (c) Detect whether running under windows, and use int 14h or DOS calls if so.
-
- The fourth option, writing a completely-revised version of the program as a
- windows application isn't really an option, since it (most often) needs to be
- run from the command prompt, when Windows may or may not be running.
-
- Without windows, option (a) seems the most sensible. With windows, I'd guess
- that the Interrupt Service Routine would get more time (less chance of missing
- characters) under option (b). But both of these would have all their I-O
- slowed down more than would be the case with characters being buffered by
- Windows itself, surely.
-
- I hope somebody can explain what is the best thing for my program to do when
- running under windows...
-
- AdvTHANKSance,
- Mark Aitchison, University of Canterbury.
-