From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: Multitasking: executing some EXE-files (nearly) simultaneously Date: Mon, 27 Mar 2000 21:05:36 +0400 Organization: MTU-Intel ISP Lines: 34 Message-ID: <38DF94E0.C96E8B3F@mtu-net.ru> References: <052897bc DOT 015fb25e AT usw-ex0110-076 DOT remarq DOT com> <38DF8C51 DOT 558739D6 AT maths DOT unine DOT ch> NNTP-Posting-Host: ppp106-12.dialup.mtu-net.ru Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: gavrilo.mtu.ru 954176782 30392 212.188.106.12 (27 Mar 2000 17:06:22 GMT) X-Complaints-To: usenet-abuse AT mtu DOT ru NNTP-Posting-Date: 27 Mar 2000 17:06:22 GMT X-Mailer: Mozilla 4.61 [en] (Win95; I) X-Accept-Language: en,ru To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Are you sure you need *2 separate EXE programs* but not 2 threads? Just keep in mind that MSDOS and DOS box in MSWindows does not provide reenterablity of the service functions. I.e. in order to run normal programs simultaneously you simplly have to write your own OS with full MSDOS support. But... You may split your program into 2 (or more) semi/fully independant threads and switch betweenm them regardless of compiler you use and OS you work under. It's a simple stack switching stuff. You may find an example program of doing that (Borland Pascal/Turbo Assembler sources - 9KBs only) at my homepage. Look for it in the "General programming" section. Btw, I recommend you to refer news:comp.lang.asm.x86 and news:alt.os.development instead of DJGPP related NGs for such questions. Regards. Alexei A. Frounze Homepage: http://alexfru.chat.ru Mirror: http://members.xoom.com/alexfru > > A very interesting (=difficult to impossible) topic of > > programming with (MS)-DOS is multitasking. My idea was to > > execute two or more EXE-files (nearly) at the same time by > > reading them manually into RAM, interpreting&executing some > > commands, saving all the registers into RAM, then switching > > to the other application, restoring its previously saved > > CPU registers and executing some commands and so on... > > Does anybody have any idea how this could be made work?