comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.nextjk.stuyts.nl (Jerry van Dijk)
Subject: Re: Interrupt overhead with DJGPP's extender
Date: 1996/07/18
Date: 1996-07-18T00:00:00+00:00	[thread overview]
Message-ID: <DuppM0.4G@jvdsys.nextjk.stuyts.nl> (raw)
In-Reply-To: 31EC2DD4.7A94@ee.ubc.ca


Greg Bond (bond@ee.ubc.ca) wrote:

: I understand that DJGPP programs run with the help of a DOS extender to 
: enable execution in a 32 bit protected address space under DOS.

More or less...

DJGPP versions before 2.0 used a real dos extender called go32. Current 
versions run straigth under DPMI. So, if you want to call Windows a 
DOS extender... :-))

: I'm 
: curious what overhead DJGPP's DOS extender imposes on programs in 
: general (I've been able to find no documentation on-line pertaining to 
: the functionality of DOS extenders). 

It depends on what you call overhead. For normal functionality like assigning
memory or redirecting interrupts it simply relies on DPMI. Now, if you want
to call the virtual memory management overhead... :-)

: In particular, I'd like to know what overhead is imposed by DJGPP's DOS 
: extender for interrupt handling (in GNAT Ada - although I can't see why 
: it should be any different in C). 

You are right, there is no difference between C and Ada here. Neither 
allow you to write reliable interrupt handlers under DOS. The problem 
is that you cannot lock all memory needed by the interrupt handler. 
And imagine what would happen if your ISR is swapped out by the memory 
manager just when an interrupt occurs.

As for overhead, that isn't related to the dos extender, but to the nature
of DOS. Remember that even a protected mode program has to call real-mode
DOS functions. So an interrupt could occur in either protected mode (which
requires an protected mode interrupt handle) or in real mode (which, depending
on the setup could be redirected to protected mode by DPMI -costly- or
an specific real-mode interrupt handler).
Although it can be done, interrupt handing in the djgpp enviroment is tricky
to say the least.

Hope this helps.
Jerry.
 
-- 
-----------------------------------------------------------------------
--  Jerry van Dijk       --   e-mail: jerry@jvdsys.nextjk.stuyts.nl  --
--  Banking Consultant   --              Member Team-Ada             -- 
--  Ordina Finance BV    --    Located at Haarlem, The Netherlands   --




      reply	other threads:[~1996-07-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-16  0:00 Interrupt overhead with DJGPP's extender Greg Bond
1996-07-18  0:00 ` Jerry van Dijk [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox