Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!ucsd!ogicse!plains!harlow From: harlow@plains.UUCP (Jay B. Harlow) Newsgroups: comp.sys.ibm.pc Subject: Re: 386 instructions Message-ID: <3114@plains.UUCP> Date: 12 Jan 90 16:52:36 GMT References: <13346@garnet.BBN.COM> <580@watserv1.waterloo.edu> <6142@internal.Apple.COM> <8166@portia.Stanford.EDU> Reply-To: harlow@plains.UUCP (Jay B. Harlow) Distribution: comp Organization: North Dakota State University, Fargo Lines: 44 In article <8166@portia.Stanford.EDU> dhinds@portia.Stanford.EDU (David Hinds) writes: > > On a tangent to the previous articles in the series, why are these DOS >extenders and things needed anyway??? Almost all of the 386-specific >instructions can be executed by the processor in real mode (i.e., under DOS) >without any contortions. The only ones requiring protected mode are the >funny ones for playing with memory management and task switching. Any DOS >program can use the 386's 32-bit registers, extended arithmetic, and new >addressing modes. Any DOS program can simply use 32-bit addresses to access >extended memory. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ in Normal real Mode this won't work. as per a recent Magizine article (i forget name of magizine) you can TRICK the 386 into seeing it, only Why? the method they use will not work under Virual-86 mode. under DOS you are restricted to 1M address space. the 386 for compatiblity preserves this restriction (ok you have maybe 64K-16 bytes of extended to use) remember in real mode you are stuck with segment:offset = segment*16+offset, no way past 1M. the trick i mention envolves going to protected mode, loading a descriptor that has a very large (end of extended memory) limit to FS or GS, then clearing the PE bit in CR0, with mov CR0,eax Gee is this why intel says to load descriptors with 64K limit before switch to real mode? ;-) on same note can we create a 32-bit REAL mode? ;-) > Borland's Turbo Assembler will let you put 32-bit code >in the middle of anything you want. So why aren't compilers available for >higher languages that do this? It wouldn't be much work to just have a >separate 386-specific version of a compiler's run-time library, but even >this would be a big speed boost for math-intensive programs. For a single >task, the 386 can run 32-bit code just as well under DOS in real mode, as >it can under UNIX, OS/2, or a DOS extender in protected mode. > >-David Hinds > dhinds@portia.stanford.edu from my understanding 32-bit code under dos is a hair slower then under unix (protected mode), ok on unix you have other tasks(maybe) running. Jay -- Jay B. Harlow uunet!plains!nuharlow (UUCP) nuharlow@plains (Bitnet) Of course the above is personal opinion, And has no bearing on reality...