DOS EMULATOR for LINUX 0.98 or later versions

(Some of this is obsolete. Where there is a conflict, trust README.first
 -Robert)

This is a pre alpha version. This means there are some bugs and lots of things
aren't implemented such as
- some video interrupts
- some other bios calls
- any port io
- ...

But MS DOS is running and programms using direct screen io are working too.
(eg. TURBO PASCAL or Norton nc).
This version needs no further patches to the kernel.

Following problems are solved:
- dir /p
- cls
- using fdisk and format c: allows to change size of hdimage

INSTALLATION

1. unpack the tar arcive 
2. adapt the Makefile to your system and run make
3. move libemu to /lib or make a symbolic link
4. create the directory /usr/dos
5. insert a DOS boot disk into drive A: (/dev/fd0) without config.sys and
   autoexec.bat
6. run: dos > [debug msg file]
   where [debug msg file] can be either a file, /dev/null, or the device
   of another (console) window
   Beware: dos output gets to stderr, debug to stdout 

The file hdimage is mounted as drive C:

On drive C: is a file LINUX.EXE. Run this with parameter D. Now you should
have access to drive d: which is linked to the linux file system /usr/dos.
LINUX.EXE has been tested with DOS 3.3 and DOS 5.0. It isn't totaly implemented
(file attributes cann't be set) and there is a bug that running .EXE files 
will crash the emulator.
This program LINUX.EXE is derived from a version in the book 'undocumented
dos' chapter 4. Andrew Schulmann is the author of the original program
PHANTOM.PAS. He prommised to send me some fixes but I'm still waiting.

Now you can install DOS on C:, but don't format C: use sys.
Use then 'dos c' to boot direct from C:


CHANGING SIZE OF HDIMAGE C:

1. change number of cylinders in emu.c l 57.

struct disk hdisktab[HDISKS] = {
                {"hdimage", 0, 17, 4, 40},
                                       ^
The maximum size of hdimage is now 512 * 17 * 4 * cylinders

2. run make and start the emulator
3. run your dos fdisk (from disk) and change the primary partition size as
usual.
4. run your dos format c: 


ACCESSING DOS PARTITIONS WITHOUT LINUX.EXE

change emu.c l 56

#define HDISKS 2        /* maximum 2 */
               ^

change the drive geometry in l 60 according to your harddisk
set the readonly flag till you are sure that all is working correct.

Now your primary partition on the harddrive is D:, the first extended
partition is E: and so on.

Be sure that /dev/hda is readable (and writeable if readonly flag = 0)


To stop the DOS emulator kill it from another window or run a command that
crashes the emulator (-:.

Please mail any suggestions, bugs or fixes to me.

Matthias	(lautner@informatik.uni-wuerzburg.de)

(This address was often unreachable, and Matthias seems to have left
 the university.  He seems to have no net access now.
 -Robert)

