home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / msdos / programm / 8045 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!wa4mei!nanovx!mycro!scott
  2. From: scott@mycro.UUCP (Scott C. Sadow)
  3. Newsgroups: comp.os.msdos.programmer,connect.audit
  4. Subject: Re: REQUEST FOR INFO: DISABLING ^C
  5. Summary: How do you disable the ^C handling?
  6. Message-ID: <1992Jul23.091344@mycro.UUCP>
  7. Date: 23 Jul 92 13:13:44 GMT
  8. References: <1992Jul20.124824.2971@ibmpcug.co.uk>
  9. Lines: 23
  10.  
  11. In article <1992Jul20.124824.2971@ibmpcug.co.uk>, fredc@ibmpcug.co.uk (Fred Curtis) writes:
  12. >I want to disable the ^C interrupt.  I can trap it and ignore it
  13. >by reseting the DOS interrupt vector, but it still prints "^C" on
  14. >the screen.
  15.  
  16.  
  17. The best way I have found of doing this is to create a small interrupt
  18. handler that just sets a flag. Then set interrupt vector 1BH to this
  19. routine. (1BH is the BIOS ctrl-break handler) I also set interrupt vector
  20. 23H to this same routine, or slightly different. (23H is the DOS
  21. ctrl-c/ctrl-break handler)
  22.  
  23. Oh yes - make sure you save both vectors before changing them and restore
  24. them before your programs ends.
  25.  
  26. (By the way, I have done this also for interrupt vector 5, which is print
  27. screen. Then I can check the global variable and, if set, print the
  28. graphics screen.)
  29.  
  30.  
  31.    Scott C. Sadow
  32.    scott@mycro.UUCP
  33.    ...gatech!nanovx!mycro!scott
  34.