Date: Sun, 11 Jun 2000 09:09:37 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Prashant TR cc: djgpp AT delorie DOT com Subject: Re: far pointers In-Reply-To: <200006100945.PAA14877@bgl2.vsnl.net.in> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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).