comp.lang.ada
 help / color / mirror / Atom feed
* Interrupt overhead with DJGPP's extender
@ 1996-07-16  0:00 Greg Bond
  1996-07-18  0:00 ` Jerry van Dijk
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Bond @ 1996-07-16  0:00 UTC (permalink / raw)



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. 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). 

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). 

--
* Greg Bond                         * Dept. of Electrical Eng.  
* email: bond@ee.ubc.ca             * Univ. of British Columbia      
* voice: (604) 822 0899             * 2356 Main Mall                 
* fax:   (604) 822 5949             * Vancouver, BC              
* web: http://www.ee.ubc.ca/~bond   * Canada, V6T 1Z4




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Interrupt overhead with DJGPP's extender
  1996-07-16  0:00 Interrupt overhead with DJGPP's extender Greg Bond
@ 1996-07-18  0:00 ` Jerry van Dijk
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry van Dijk @ 1996-07-18  0:00 UTC (permalink / raw)



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   --




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-07-18  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-16  0:00 Interrupt overhead with DJGPP's extender Greg Bond
1996-07-18  0:00 ` Jerry van Dijk

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