Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE3359D56@probe-2.Acclaim-Euro.net> From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: how to switch tasks? Date: Thu, 17 Dec 1998 13:08:57 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1460.8) Content-Type: text/plain Reply-To: djgpp AT delorie DOT com Eli Zaretskii writes: > It might be possible, but it's very tricky. The DPMI spec explicitly > forbids task switching inside a real-mode interrupt handler (such as a > timer tick handler). So AFAIK this is impossible without relying on > specific internal details of a certain DPMI server. I think you can do it by using the signal handling mechanism to defer the event into a protected mode exception, and then using setjmp() / longjmp(). I don't know all the details of how this works, but packages like LWP seem able to use this method quite successfully... Robert Darmochwal writes: > and if i wanted to do that manual ? > like messing with crX,task regs, and so on ?. You can't. These are privileged instructions, and most DPMI providers will disallow you from messing with them. It would be a major flaw in the protection scheme if you were allowed to alter these things directly! Shawn Hargreaves.