From: Psilon AT concentric DOT net (Avery Lee) Newsgroups: alt.msdos.programmer,comp.os.msdos.djgpp,comp.os.msdos.programmer Subject: Re: IRQ trap with stack change, very intersting! Date: Sat, 05 Jul 1997 00:36:38 GMT Organization: Concentric Internet Services Lines: 22 Message-ID: <33bd96c0.262453@news.concentric.net> References: NNTP-Posting-Host: ts012d11.sto-ca.concentric.net Mime-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Roberto Garza wrote: >> I want to write a dual-task program. Each time the interrupt come, i want >> to do a stack switch (íve provided 2 separated stacks, allocated at >> start-time), save the registers, change the return CS:IP in the stack to >> point to the next task and, then, do an IRET. It is not possible to do task switching in this manner with DPMI. DPMI servers may give you a completely separate stack when the interrupt strikes, and you cannot look up the stack to find out where your program was interrupted, especially since the interrupt may not have struck when your program was running. The DPMI specification says, I believe, that it is not intended to allow client programs to multitask themselves. -- Avery Lee (Psilon AT concentric DOT net) Try my freeware junk at http://www.concentric.net/~Psilon (pages revised 7/1/97 - all programs include source) * VGAPaint 386 V1.3/1.4beta: 32-bit paint program * VELoader 1.21: 2:1 compression for Watcom executables * IPXfer5 1.6a: easy file transfers over networks at 450k/s * Playwav 1.2: PC speaker sound for older computers