From: Charles Sandmann Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem raising exceptions in tight loops Date: Sun, 01 Dec 1996 18:14:43 CST Organization: Rice University, Houston, Texas Lines: 13 Message-ID: <32a21f73.sandmann@clio.rice.edu> References: <849468187 DOT 25048 DOT 0 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 > How about having a spare CS selector created. To raise a signal, set > the limit of it to the return EIP plus a couple of bytes, then execute > a far return, reloading the new CS? No, no, no. In a hardware interrupt you have no information about the state of the DJGPP program or any way to change it. So you don't know the EIP (if you did, you could use lots of tricks to transfer control) and making the app CS illegal will puke the DPMI. You have to be very careful messing with the app DS also - which is why the DS alias exists. Go read the DPMI specs, and then go try to program anything new idea - I think you'll find messing with SS or DS is about the best that can be done without violating the DPMI specs and causing yourself problems.