delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/04/30/05:01:41

Date: Mon, 30 Apr 2001 12:00:13 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: The Owl <theowl AT freemail DOT c3 DOT hu>
cc: sandmann AT clio DOT rice DOT edu, djgpp-workers AT delorie DOT com
Subject: Re: win2000/ntvdm/djgpp (fwd)
In-Reply-To: <3AECA048.20910.63E613@localhost>
Message-ID: <Pine.SUN.3.91.1010430115704.15144D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 29 Apr 2001, The Owl wrote:

> > > unfortunately no attempt at setting the real mode PSP will have any
> > > effect on _CurrentPSPSelector (as far as i can tell).
> > 
> > Does this mean that the set-PSP event which causes NTVDM to set
> > _CurrentPSPSelector is the PM interrupt issued by DOSX?  If not, who
> > else can issue such interrupts?
> 
> the set-PSP event chain is started by a dpmi app issuing a pm int 21.

Yes, but where does this PM Int 21h come from?  If I understand
correctly, you are talking about a PM Int 21h with AH = 50h and a PM
selector of our PSP in BX.  If so, I don't think a DJGPP program ever
issues such a call (Charles, am I right?).

I think the only 2 places where this Int 21h could come from are:

  - the W2K DPMI host, if it does that in response to a call to PM
    entry point (the one returned by Int 2Fh/AX=1687h); or

  - DOSX, in the chain of events that are triggered by loading a DJGPP
    (or DOS in general) program.

I'm sorry for this nitpicking, but I'd like to have a clear
understanding of this issue, in case we do decide to issue a PM Int
21h as a means of solving this.

> > I can't say I like this solution too much (for the reasons you
> > yourself mentioned), but perhaps people could try this patch and see
> > how easy it is to patch NTVDM, before we decide.
> 
> i see only one other way, but i have yet to verify if it will work
> reliably. in any case, here it goes: instead of issuing a pm int
> 21/50, we can try to issue a pm int 21/51 (that is, get PSP).

If Int 21h/AH=51h works, it is indeed safer, because it shouldn't do
any harm when the program runs on DOS.

> honestly, i could not tell you what way to go, for now i am personnaly
> satisfied with what i have. what the djgpp folks should do, i leave it up
> to you.

The main reason I hesitate to go with the patch is that it might be
impossible for users to do that.  Many DJGPP users run DJGPP on
machines they don't own (in a school or another academic facility),
where patching NTVDM might not be a practical option.  In addition,
patching a program in general is something many DJGPP users would have
technical difficulty with (this could be solved by providing a small
program which patches NTVDM automatically, though).

So I would like to modify the library to issue a PM Int 21h/AH=50h in
the case the program runs on NT or W2K, and post the diffs here, in
case you could rebuild Make and your other applications used to test
this, and see if the problem is solved by this change.  Would that be
okay?  will you have time and resources to make these tests?

I can also provide another set of diffs that use Int 21h/AH=51h, so
you could see if it indeed works, again, if you think you will be able
to test that.

(Of course, anyone else here is welcome to test these changes as well,
but I think most of us will lack tools/knowledge/time to do that as
well as you could.)

Thanks again for working on this.

- Raw text -


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