delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/11/06:53:11

Date: Sun, 11 Jun 2000 16:07:38 +0530 (IST)
Message-Id: <200006111037.QAA10341@bgl2.vsnl.net.in>
From: Prashant TR <prashant_tr AT yahoo DOT com>
To: eliz AT is DOT elta DOT co DOT il
CC: djgpp AT delorie DOT com, pmode AT egroups DOT com
In-reply-to: <Pine.SUN.3.91.1000611090320.22597K@is> (message from Eli
Zaretskii on Sun, 11 Jun 2000 09:09:37 +0300 (IDT))
Subject: Re: far pointers
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000611090320 DOT 22597K AT is>
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

> > 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.

No, V86 *is* PM, and programs in V86 run at PL3. And that's why you
still have all the protection there inspite of running (simulating)
the dangerous real-mode programs. 

> 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).

Ok, so what do you suggest this should be?

But I think I'll need to mention about V86 since that's a special
feature of using 386's PM. But I can make it as short as possible.

> > > 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.

No, I didn't mean to include this in the first page of the
tutorial. This would indeed scare away newbies ;-).

But FYI, myself and Alexi did decide to include *everything* about
protected-mode including writing extenders. But then, it definitely
won't come anywhere in the introduction. And moreover, that's still a
long way to go.

> > 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).

Yes, I'll do that. Thank you for the corrections, Eli.

- Raw text -


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