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