home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5326 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  1.4 KB

  1. Path: sparky!uunet!munnari.oz.au!ariel!ucsvc.ucs.unimelb.edu.au!lugb!lux!9125113g
  2. From: 9125113g@lux.latrobe.edu.au (Mitch Davis)
  3. Newsgroups: comp.lang.pascal
  4. Subject: Re: Ctrl-Break in TP 6.0 programs
  5. Message-ID: <1992Sep11.103038.11122@lugb.latrobe.edu.au>
  6. Date: 11 Sep 92 10:30:38 GMT
  7. References: <5341@tuegate.tue.nl> <exuptr.475.716143552@exu.ericsson.se>
  8. Sender: news@lugb.latrobe.edu.au (USENET News System)
  9. Organization: La Trobe University
  10. Lines: 27
  11.  
  12. In article <exuptr.475.716143552@exu.ericsson.se> exuptr@exu.ericsson.se (exuptr@exu.ericsson.se) writes:
  13. >In article <5341@tuegate.tue.nl> erik@blade (Erik Manders) writes:
  14. >
  15. >>Hello,
  16. >
  17. >>When I write a program in Turbo Pascal 6.0, it is always possible to
  18. >>interrupt it by pressing Ctrl-Break. I don't want this to be possible,
  19. >>so is there anybody who knows what I have to do to prevent this.
  20. >
  21. >*Sigh*
  22. >uses crt;
  23. >....
  24. >begin
  25. >...
  26. >Checkbreak := false;
  27.  
  28. Sigh.  CheckBreak controls whether DOS checks for Ctrl-Break ALL the
  29. time, or just when doing console input/output.  It is still possible for
  30. programs that have CheckBreak := false to be halted using Ctrl-Break.
  31.  
  32. Two solutions that DO work:  Make an int $09 handler, which swallows the
  33. Pause(etc) key if the Ctrl key is pressed, or make an Int $23 (is that
  34. right?) handler which grabs the Ctrl-Break but doesn't ask for a halt.
  35.  
  36. Neither are particularly easy, but at least they work.
  37.  
  38. Mitch.
  39.