www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/06/03:27:16

Date: Tue, 6 May 1997 10:06:20 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Chirayu Krishnappa (chirayu AT poboxes DOT com)" <chirayu AT giasbga DOT vsnl DOT net DOT in>
cc: djgpp AT delorie DOT com
Subject: Re: Extenders and switching modes
In-Reply-To: <Pine.SV4.3.93.970506082308.6002B-100000@giasbga>
Message-ID: <Pine.SUN.3.91.970506100443.13952A-100000@is>
MIME-Version: 1.0

On Tue, 6 May 1997, Chirayu Krishnappa (chirayu AT poboxes DOT com) wrote:

> The book "Dos 5: A devolopers guide" gives source code for an extender
> which does not switch CPU mode (between real and protected).

If that extender indeed doesn't switch (which I doubt: it might use
some undocumented instructions that make the switch behind the
scenes), then you will miss some of the features that you have now.

> Could DJGPP use something like this? It would be great if it could.

No, DPMI doesn't permit that AFAIK.  And I fail to see what great
advantages would it let us have if it did. 

> Also, is the mode
> switching part done by the DPMI provider only? If so, will running the
> program under win95 eliminate the mode switches? If not, is win95
> "allowing" these mode switches? I'm confused. Help!

When you run a DOS program under any memory manager, be it EMM386 or
Windows DOS box, your program runs in V86 mode, not in real mode.  V86
is a kind of protected mode (since some instructions cause an
exception) which behaves as if it were real mode (addresses are
20-bit, you can load anything into a segment register, etc.).
Switching from V86 to PM and back is still a mode switch, and it
happens on Windows also.  The difference between Windows and other DOS
memory managers (such as EMM386 or QEMM386) is that the only way
Windows will allow you to switch into protected mode is if you use the
DPMI functions, whereas DOS memory managers support other methods
(VCPI, Int 15h and a few others).

- Raw text -


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