delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/04/07:57:24

Date: Tue, 4 Jan 2000 11:04:53 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Nicola Bortolotti <nbsoft AT libero DOT it>
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: <Pine.SUN.3.91.1000104110433.26733G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019