home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / mswindo / programm / misc / 1394 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.7 KB

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