delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/11/02:10:08

Date: Sun, 11 Jun 2000 09:09:37 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Prashant TR <prashant_tr AT yahoo DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: far pointers
In-Reply-To: <200006100945.PAA14877@bgl2.vsnl.net.in>
Message-ID: <Pine.SUN.3.91.1000611090320.22597K@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 10 Jun 2000, Prashant TR wrote:

> Ok, that was not what I really meant. It was supposed to say that V86
> allows both DOS and protected-mode programs to run *in* protected
> mode.

But that's also not very accurate: V86 is not PM, although it's close.
For newbies' sake, I'd suggest to make this distinction very clear (if
you at all mention V86, which I'm not sure is a good idea).

> > Second, even in V86 mode, a protected-mode program that calls
> > real-mode DOS services needs to make an explicit PM-to-RM switch, or
> > it will crash.  So there's nothing in V86 per se that allows or makes
> > it simpler for PM programs to coexist with DOS.  Faster, yes, but not
> > simpler.
> 
> Not necessarily. There's no need for any program to make a switch
> to real mode even when DOS/BIOS calls are made. That's what makes the
> V86 so special. The 386 generates either a GPF or Exception 6 for
> instructions IRET, LOCK, POPF, PUSHF, PUSHFD, POPFD, CLI and STI (and
> of course the privileged instructions). So you can actually emulate
> all these instructions. A simple V86 stack-frame setup should do the
> job. That's what I did when I wrote my DOS Extender long ago.

But that's just it: we are not talking about writing an extender.  We are 
talking about a tutorial that explains what is protected mode to DJGPP 
users.  In that context, catching IRET and its ilk and emulating them is 
not helpful: it doesn't explain anything, only complicates a topic that 
is complicated enough.

> And the statement does not necessarily mean that coexistence is
> impossible without V86. It just means that coexistence is possible
> with the V86 ;-).

If it's possible without it as well, it is misleading to say that V86 
makes it possible.

> Ok, I'll change that line to "The MMU on the 386 provides features
> that allow Virtual Memory to be implemented". Does it make the
> tutorial more clear?

Yes, thanks.  I suggest to mention the specific features that make it 
possible (the Page Fault exception, among others).

- Raw text -


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