delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/03/12:30:18

From: "Charles Sandmann" <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Tracing the path of Software Interrupts
Date: Sun, 2 Nov 1997 13:52:25
Organization: Aspen Technology, Inc.
Lines: 41
Message-ID: <345c8599.sandmann@clio.rice.edu>
References: <Pine DOT LNX DOT 3 DOT 91 DOT 971101092517 DOT 412B-100000 AT aditya DOT unigoa DOT ernet DOT in>
Reply-To: sandmann AT clio DOT rice DOT edu
NNTP-Posting-Host: dmcap2.dmccorp.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> > On Fri, 31 Oct 1997, Gurunandan R. Bhat wrote:
> > > 	When I do this for the software interrupt (0x1c) I get a result
> > > that to my **limited** understanding, is strange. It is always the real
> > > mode interrupt that is called. My buffer is strewn with 'r's. This is the
> > > same no matter which of the three DPMI hosts I use: cwsdpmi, cwsdpr0 or

> No. As the FAQ recommends, the PM handler is installed first. The RM 
> handler (callback) is installed later.  

If you install both a RM and PM handler for int 0x1c, the last one effectively
wins, since Int 0x1c originates from real mode inside the BIOS.  It is not
a hardware interrupt, but a software interrupt.  You shouldn't install both, 
unless you manually create a real mode chain on int 0x1c, in which case both 
would be called.

> > > The DPMI specs say that int 0x1c is special in that, it is
> > > always handled by the protected mode handler *even* when a real mode
> > > handler is installed.

Actually, the V0.9 spec says:

"Most software interrupts executed in real mode will not be reflected to the
protected mode interrupt hooks.  However, some software interrupts are also
reflected to protected mode programs when they are called in real mode.
These are Int 1Ch, 23h, 24h ..."

And the V1.0 spec says:

"Ordinarily, a handler installed with DPMI function 0205h will only service
software interrupts that are executed in protected mode; ... However, there 
are three real mode software interrupts that a DPMI host will always 
reflect to a protected mode handler, if one is installed: ..."

Exactly how you interpret that is up to you.  I interpreted it as meaning
that Int 1c should be reflected to PM if installed.  Windows obviously
interprets it as two different vectors, each of which should be called,
which may be feasible if you are in a virtual machine.

Dual mode vectors may make sense for true hardware interrupts (to avoid
extra mode swaps), but they don't make sense for the software interrupts 
which get reflected anyway.

- Raw text -


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