home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / msdos / programm / 9218 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.7 KB  |  45 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!lindblat.cc.monash.edu.au!ins700e
  3. From: ins700e@lindblat.cc.monash.edu.au (Simon Carter)
  4. Subject: Ctrl-C trapping TSRs
  5. Message-ID: <1992Sep10.025243.6239@monu6.cc.monash.edu.au>
  6. Sender: news@monu6.cc.monash.edu.au (Usenet system)
  7. Organization: Monash University
  8. X-Newsreader: Tin 1.1 PL5
  9. Date: Thu, 10 Sep 1992 02:52:43 GMT
  10. Lines: 33
  11.  
  12. I am attempting to write a TSR that traps both Ctrl-C and Ctrl-Break.
  13.  
  14. The Ctrl-Break section works very well (this involved writing new
  15. interrupt $1b and $23 handlers that just iret).
  16.  
  17. I can also detect when Ctrl-C is pressed with a new interrupt $16 handler 
  18. (When it is detected, I just call the old $16 handler again - but only
  19. if function 0 or $10 was called to get a key).
  20.  
  21. The problem is that if after pressing Ctrl-C, the user types a letter (may
  22. in fact work with any key), either that key disappears (is swallowed up) or
  23. a Ctrl-C appears. I do not know why this is happening.
  24.  
  25. I have tried several solutions.
  26. - forcing my interrupt $1b and $23 handlers to zero the MSB of the byte at
  27. $0040:$0071 (which is used to flag if Ctrl-Break is pressed)
  28. - when a Ctrl-C is detected, overwriting that word in the keyboard buffer
  29. with a dummy value (the letter A).
  30.  
  31. Neither of these has worked.
  32.  
  33. Perhaps I should always reset the byte at $0040:$0071 ????
  34.  
  35.  
  36. Any help would be greatly appreciated
  37.  
  38.  
  39. Simon Carter
  40. --
  41. -[Simon Carter]-----+-Email: vort@yoyo.cc.monash.edu.au ----------------
  42. 2nd Year BCSE       | @mail: 14 Canterbury Rd,Heathmont,VIC 3135,AUST 
  43. Monash Uni, Clayton | Manager:Crystal Software  Product:Crystal Menu 
  44. --------------------+ "Sure my program works - it just doesn't compile!"
  45.