Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-sdd!hp-pcd!hplsla!davidr From: davidr@hplsla.HP.COM (David M. Reed) Newsgroups: comp.lang.pascal Subject: Re: disable ^C in Turbo Pascal Message-ID: <6490005@hplsla.HP.COM> Date: 17 Feb 90 01:43:29 GMT References: <116500002@uxa.cso.uiuc.edu> Organization: HP Lake Stevens, WA Lines: 35 In my Turbo Pascal 3.x programs I used, very successfully, {$C-}, after thoroughly debugging a program (or *I* would not be able to interrupt something running wild). I particularly did this for the benefit of using the DOS type-ahead buffering, plus a small screen speed improvement. And, of course, in a login/password program I created to use on some shared systems. In Turbo Pascal 5.x you must set Borland's global variable CheckBreak := FALSE (from the CRT unit). Last June I found a suggestion posted to comp.sys.ibm.pc which has been helpful for the shared systems I put my login program on. It is simple to use in thwarting users from aborting the boot process until it is finished. It only works with MS-DOS 3.3 or later. In CONFIG.SYS make certain you specify BREAK = OFF DEVICE = ANSI.SYS Then my first two statements in AUTOEXEC.BAT are @ECHO OFF ECHO ^[[3;67p and my last statements are ECHO ^[[3;3p MENU The need for MS-DOS 3.3 (or later) is so that the first statment is not echoed to the screen (which is when DOS looks for a ^C code). The second echo is the ANSI escape code sequence for key re-mapping, specifying that ASCII code 3 (the ^C character) should be remapped as a simple C character, and the last statement restores the original definition. Now the only way some can circumvent my defined boot-up process on those systems (to bypass the login/password program) is to boot from a floppy.