Date: Tue, 4 Jan 2000 11:04:53 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Nicola Bortolotti cc: djgpp AT delorie DOT com Subject: Re: Commport problems in *two* Win95 dosboxes In-Reply-To: <84qobd$vs7q$1@fu-berlin.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Mon, 3 Jan 2000, Nicola Bortolotti wrote: > But with two DJGPP apps running concurrently, the performances become very > worse than Clipper (a P-Code pseudo-compiled language with a freeware add-on > to drive commports!). The underruns make the PCM files pretty unaudible, > severely crackling! > > What a surprise! The revenge of the runtime interpreted Clipper code... > > It seems like DJGPP apps don't like Windows DosBoxes in background (in > foreground they run fine but one at a time). Including __dpmi_yield() in the > outportb cycle just hangs the execution... > > Please note that the commport output is unbuffered in both DJGPP and Clipper > cases. Under DJGPP I've used SVAsync library. I cannot possibly claim to understand all the intricacies of your non-trivial application, but I thought you need to know the following gotchas related to Windows 9X. First, Windows by default suspends a DOS box which goes into background. To avoid this, you need to uncheck the "Background: Always suspend" box in the DOS box's property sheets (look under the "Misc" tab). Second, amazingly enough, a DOS box in the background doesn't get timer interrupts delivered to it. I don't know if this happens with other hardware interrupts as well, like the async port interrupt (I assume you use it), but it might be a good idea to check this. Finally, it might be some bug in SVAsync. If nothing else helps, maybe you should consider to try an alternative library. Section 22.3 of the DJGPP FAQ lists several such libraries.