From: Fernando Newsgroups: comp.os.msdos.djgpp Subject: Re: ctrl-c handling question Date: Wed, 28 Jan 1998 16:49:35 -0500 Organization: My own Lines: 61 Message-ID: <34CFA7EE.31C38A32@127.0.0.1> References: <01bd2bf2$0f2058a0$542c5c8b AT aptiva> <34CF4E8F DOT 95E933D6 AT LSTM DOT Ruhr-UNI-Bochum DOT De> NNTP-Posting-Host: 147.54.84.90 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk hmmm, interesting, but now, what happens with this small program: #define TRUE 1 int main(void) { int i = 1 ; while (i == TRUE) ; } and with this variant: #define TRUE (1 == 1) int main(void) { while (TRUE) ; } Are they accesing memory ? I think the first one is doing it but I am not sure about the second one. Thanks. Thomas Demmer wrote: > That's a flaw? of the DPMI host. It can only intercept > ^C when your program touches memory. In the first case it does, > unless you use -O2 or so to compile it. In the second case, > there is no need do access memory, everything is inside > registers. So, the DPMI host never sees the ^C. > > I think there is no way to come around this. > > I had to trim your program a bit, otherwise my news host > would not le me post it. > -- > Ciao > Tom > > ************************************************************* > * Thomas Demmer * > * Lehrstuhl fuer Stroemungsmechanik * > * Ruhr-Uni-Bochum * > * Universitaetsstr. 150 * > * D-44780 Bochum * > * Tel: +49 234 700 6434 * > * Fax: +49 234 709 4162 * > * http://www.lstm.ruhr-uni-bochum.de/~demmer * > ************************************************************* -- These are my personal opinions. Email: sanabriaf at yahoo dot com