ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/12/06/07:31:28

Xref: news-dnh.mv.net comp.os.msdos.djgpp:3622
Path: news-dnh.mv.net!mv!news.sprintlink.net!tank.news.pipex.net!pipex!news.mathworks.com!newsfeed.internetmci.com!in1.uu.net!usc!newshub.csu.net!zippy.sonoma.edu!svincent
From: svincent AT zippy DOT sonoma DOT edu (Sam Vincent)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Is DPMI screwing things up?
Date: 4 Dec 1995 23:26:57 GMT
Organization: Information Resources and Technology
Lines: 46
References: <49s07h$fkt AT nuke DOT csu DOT net> <30c25e96 DOT sandmann AT clio DOT rice DOT edu>
Nntp-Posting-Host: zippy.sonoma.edu
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Charles Sandmann (sandmann AT clio DOT rice DOT edu) wrote:
: > In short, I've got an interrupt hooked.  It's hooked twice.. in real mode,
: > and in protected mode.. With this setup, the only handler to ever get called 
: > is the protected mode one..  real mode interrupts are getting reflected even 
: > though i've provided a handler!  Does anyone knoe any way around this?  

: If you are going to hook both (and the only reason to do so is if you expect
: a substantial number of interrupts in real mode AND you need to minimize
: the interrupt overhead to a bare minimum) then hook the real mode interrupt
: after hooking the PM interrupt.  Usually the extra complexity isn't worth
: it, since most PM applications spend most of their time in PM...

I do this already.  I hook the pmode one first, then real mode.. I've tried
it the other way around too.  If there is a pmode one defined at all,
that's the only one to get called.  This leads me to believe that if it
gets an interrupt in real mode, it does a mode switch (expensive), runs the
interrupt handler there..  If that's the default, it contains code to switch
to real mode (expensive) and run the handler there, switch back to pmode
(expensive) where it returns, and then switches back to real mode (expensive)
to finish it's "real quick" real mode access for whatever reason it was there..

Oh. if the pmode handler is not the default it simply does whatever the
handler tells it to, returning and then switching back to real mode
(expensive).

It seems that defining a protected mode one only would be less expensive
than a real mode one only..  But in any case, if a real mode handler
exists, and the machine is in real mode, there should be some way to
tell the dpmi server to use the real mode handler without switching
all over the damned place!  A serial port running at 115200 baud cannot
handle those mode switches!

-Sam


--
==============================================================================
Microsoft Network, or any service owned in full or in part by Microsoft, is
prohibited from redistributing this work in any form, in whole or in part.
Copyright, Samuel A. Vincent, 1995. License to distribute this post is
available to Microsoft for US$1,000 per instance, or local equivalent.
Posting without permission constitutes an agreement to these terms. Please
send notices of violation to svincent AT zippy DOT sonoma DOT edu and
postmaster AT microsoft DOT com.
==============================================================================

- Raw text -


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