From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: Multitasking: executing some EXE-files (nearly) simultaneously Date: Sat, 01 Apr 2000 15:15:35 +0200 Organization: NetVision Israel Lines: 21 Message-ID: <38E5F677.95B1C484@is.elta.co.il> References: <052897bc DOT 015fb25e AT usw-ex0110-076 DOT remarq DOT com> <302f79d3 DOT 5ad2741d AT usw-ex0110-075 DOT remarq DOT com> NNTP-Posting-Host: ras1-p110.rvt.netvision.net.il Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.netvision.net.il 954594843 1312 62.0.172.112 (1 Apr 2000 13:14:03 GMT) X-Complaints-To: abuse AT netvision DOT net DOT il NNTP-Posting-Date: 1 Apr 2000 13:14:03 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en,ru,hebrew To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Bernhard Stiftner wrote: > > I have now come to a solution of the multitasking problem. > I've written a interrupt-driven "multitasking" system for > DOS; here's how it works [it's quite primitive...] > -the multitasking system installs some interrupt funtions: > one adds a process, and another one executes all processes > -every process (can be in another EXE-file) gives his main > function address to the "add" interrupt function and > executes the "execute all processes" function every time > it's idle. > > My only problem is that I wrote this stuff in Turbo Pascal > for real mode (good old stuff!), and I don't know if it's > possible to get this working under 32-bit protected mode in > GNU C. Sorry to disappoint you, but this is almost impossible in the DPMI environment. The problem is that the DPMI spec explicitly forbids you from switching stacks in a hardware interrupt handler. But without switching stacks your multitasked programs cannot do anything useful.