www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/28/04:26:47

Date: Tue, 28 Jul 1998 11:26:40 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Archee/CoNTRACT <soltesz AT hotmail DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: CWSDPMI: slow IRQ wrapper
In-Reply-To: <199807272008.QAA29986@delorie.com>
Message-ID: <Pine.SUN.3.91.980728112035.4133T-100000@is>
MIME-Version: 1.0

On Mon, 27 Jul 1998, Archee/CoNTRACT wrote:

> IRQ wrapper of CWSDPMI sets up a new stack for the app, however
> the app can have big stack and little IRQ handler.
> When I use other extenders there is no so many code at the IRQ handler
> header.
> 
> When I use DJGPP, I use the _go32_dpmi_allocate_iret_wrapper, which is
> very slow when I code a program to use serial port.

The wrappers are NOT the tools to write production-quality code.  The
issue is not only speed, but realiability: the wrappers don't allow to
lock all of the code/data that are accessed by the handler.  In fact, 
locking code and data of a C function is almost impossible.  The FAQ 
explains this further in sections 18.9 and 18.10.

So I suggest to write your handler in assembly.  This will also make it
faster, I think.  As a reference, Quake was built with DJGPP, uses
CWSDPMI, and supports serial ports as well. 

> Is there other extender avaiable with fast IRQ handling capables as 
> PMODE by TRAN for DJGPP ?

The wrappers have nothing to do with the DPMI server.  They are library 
helper functions which work the same with any server.  So switching a 
server won't change much.  If you want faster response, use CSWDPR0 which 
runs at ring 0, but doesn't support virtual memory.

- Raw text -


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