From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem raising exceptions in tight loops Date: Sat, 30 Nov 1996 12:13:56 CST Organization: Rice University, Houston, Texas Lines: 10 Message-ID: <32a07964.sandmann@clio.rice.edu> References: <849360845 DOT 357 DOT 2 AT abwillms DOT demon DOT co DOT uk> Reply-To: sandmann AT clio DOT rice DOT edu NNTP-Posting-Host: clio.rice.edu To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > >The explanation is that HW ints cause the limit of ds to be lowered, > Hey, O libc porting people, why not lower cs instead? This causes an exception INSIDE the DPMI provider itself when it tries to transfer control back to your application, so it doesn't work. That was the first thing I tried. All real GCC programs touch memory at some point (either the stack, or a memory reference) so this is only a problem for nonsense programs. The only example I could come up with this case could not handle was polling an I/O port for a change - and if you do this and want to interrupt it, touch some memory in the tight loop.