From: Howlin' Bob (gt8134b@prism.gatech.EDU)
Date: 02/17/93


From: gt8134b@prism.gatech.EDU (Howlin' Bob)
Subject: QUESTION about EMM386.exe for Linux dos emulator
Date: 17 Feb 1993 19:47:50 GMT


(sorry about the confusion if you saw it before I cancelled the old article..
 I, Robert Sanders, gt8134b@prism.gatech.edu is the author of this, so reply
 to me).

Hi,

  I'm working on the Linux DOS box thingy, and I've run across a bit of a
thorn while implementing XMS/EMS memory.

(Linux is a free UNIX clone for the 386/486 which runs in protected mode with
 all the neat features you expect from such a beast: paged/swapped memory,
 a pseudo-flat 32-bit memory space, etc., and of course all the UNIX
 goodies we and the FSF can write :-)

  I have implemented pretty much the full XMS 3.0 specification under the
DOS box, so I can do things like load SMARTDRV into extended memory; load
DOS with "dos=high,umb"; set up a RAMDRIVE; swap 4DOS/NDOS into
extended memory; load drivers high with DEVICEHIGH and LOADHIGH, etc.
Everything goes smoothly and sweetly, and I have the added bonus of being
able to simulate almost any arbitrary amount of extended memory, as Linux
kindly swaps memory to/from disk as necessary.

  Since I'm running DOS from a protected mode operating system, but in
virtual 8086 mode, it's a bit touch-and-go deciding exactly what kind
of processor DOS is running under. Some programs report 386, some 286.
Nortun Utilities calls my 486DX33 a 4.77Mhz 80286. EMM386 seems to think
something like this, also.

  Whenever I try to install EMM386.exe by putting "device=c:\emm386.exe"
and any combination of valid switches, it gives me
  EMM386 not installed - incorrect machine type.

  press any key when ready...

I had rather hoped that, by implementing the XMS interface, in effect
integrating HIMEM.SYS into my "emulator" (DOS box), I had done all the dirty
work and could simply run EMM386 to simulate the atrocious EMS memory
specification. However, as I said, whenever I boot DOS under my Linux
DOS box, it exits with the "incorrect machine type" error.

My DOS 5.0 manual states in about 15 different places that I must have a 386
or 486 to run EMM386.EXE. And here is my question:

   HOW DOES EMM386 TELL WHICH PROCESSOR IT IS RUNNING ON?

This is probably an unusual question, and I doubt anyone outside of Microsoft
really knows or cares to, but on the off chance that someone had gotten
bored and peeked into EMM386 one day...Could you save me the trouble?

I hope it turns out that I can get EMM386.EXE to work...it's about 90K,
and my entire emulator is about 80K. I'd hate to double its size just
for expanded memory. :-)

Robert Sanders
gt8134b@prism.gatech.edu

P.S. I _DO_ read this group regularly, and I find it an enlightening one,
     but perhaps it would prevent boring others if any responses were mailed
     directly to me for summary later.

     On the other hand, perhaps a full discussion within the group would
     be interesting, too.

-- 
Robert Sanders
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:     ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt8134b
Internet: gt8134b@prism.gatech.edu