Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!ucla-cs!zen!ucbvax!hplabs!hpcea!hpsrla!hpsrlc!darrylo From: darrylo@hpsrlc.HP.COM (Darryl Okahata) Newsgroups: comp.sys.ibm.pc Subject: Re: Re: Another TURBO C Bug?? Message-ID: <3320042@hpsrlc.HP.COM> Date: Tue, 4-Aug-87 11:33:32 EDT Article-I.D.: hpsrlc.3320042 Posted: Tue Aug 4 11:33:32 1987 Date-Received: Sat, 8-Aug-87 00:40:26 EDT References: <1236@ihlpm.ATT.COM> Organization: Network Measurements Div - Santa Rosa, CA Lines: 36 In comp.sys.ibm.pc, ccs016@ucdavis.UUCP (Patrick Tully) writes: > I've started using Turbo C recently. I've only glanced at the manual so I may > have missed this. My question is what key do I hit to stop a endless loop. I've > tried all the normal ones, break, escape, control break, etc ... but nothing. > > I have been writing many programs using rom-bios interupts, I don't know if > this is what did it. The basic problem is when I hit a endless loop I can't get > out, only by rebooting. > > Patrick Tully > pstully@ucdavis > ---------- The control-C/Break (control-Break) only works if you use DOS calls, not ROM BIOS calls. The reason for this is that DOS and only DOS checks to see if the user has hit control-C/Break. The ROM BIOS doesn't do jack diddly squat (except for setting a flag). Also, unless you execute the "BREAK ON" command from command.com, DOS will only check for a control-C/Break when DOS sends a character to the screen; with BREAK ON, DOS will check for a control-C/Break every time a DOS call is made. In short, if your program is in an infinite loop and does not make any DOS calls while in the loop, you're out of luck (unless you have special software which allows you to break out of a program and return to DOS, like the Periscope debugger). If your program is in an infinite loop and does make DOS calls, you can only break out if you've executed the "BREAK ON" command or are making a DOS console output call. -- Darryl Okahata {hplabs!hpcea!, hpfcla!} hpsrla!darrylo CompuServe: 75206,3074 Disclaimer: the above is the author's personal opinion and is not the opinion or policy of his employer or of the little green men that have been following him all day.