Run emu86.exe.  This will put you in a V86 shell running DOS.  Checks
are made; it will generate an error if you don't have a 386, if XMS is
version 2.00 or greater not installed, if the dos version isn't 3.10
or better, if EMS is installed , or if the processor is already in
protected mode.  For this version you need 1MB of extendend memory
so it can play around.

This currently runs as a TSR.  To unlaoad it run 'rundown.exe'; this
will unhook it from the system and free its memory usage.

I've released this as a standalone program primarily to see if my V86 
emulator works on a variety of PCs.  Eventually it will provide EMS
support.  Although I already have one person interested in modifying
the emulator to provide a virtual UART.

This program may or may not work with the FREE-DOS xms driver.  This
driver currently has bugs, I'm working with someone else to work
on compatibility issues.

Technical details follow.

The program takes up about 10K of conventional memory.  This includes
the GDT.  For addresses refer to the MAP file.

The progroam allocates 512 KB of memory through the XMS system.  It
uses an XMS lock to get the physical address of this memory.  At this
address it places the following information:


X+0:		Page directory
X+1000h:        4 Page tables (1 MB DOS + 15 MB extended RAM)
X+5000h:	TSS for V86 emulation.  This includes a 8192 byte I/O
		bitmap.  Ports 84h and 85h are emulated and are used
		for V86 control operations.
X+7e7ch:	Supervisor stack
X+7e80h:	IDT.  30h entries.  The first 20h are mapped to
		exception vectors and the next 10h are the hardware
		interrupts
x+8000h:	Page mapped as a shadow to the last page of the
		ROM Bios.  We actually change the hook at FFFF:0000
		to handle reboots properly.

X+8100h:	To be used as free EMS memory when EMS support is 
		added.

Selectors are as follows:
08h:		386 code segment
10h:		386 data segment
18h:		16 bit compatible code segment for rundown
20h:		16 bit compatible data segment for rundown
28h:		linear mem starting at 00000000h

Ports are as follows:
84h:		V86 control port
85h:		V86 data port

The V86 emulator runs at IPL 3 for speed, however it will work
albeit more slowly if you change the IPL down.

This version of the program will run itself down if it gets certain
exceptions ; other exceptions will be reflected back to DOS.
If you see the message 'emu86 unloaded' you will know that some
exceptional condition occurred.  Please contact me and let me know
if this happens.


David Lindauer gclind01@ulkyvx.louisville.edu

boot.asm     
	Transition from real to protected mode and back, with paging
checks.asm   
	Ensure the system has the minimum setup required and no mem 
	manager

emuinter.asm 
	Port 84h and 85h emulation for controlling emulator

idt.asm 
	IDT setup

int15.asm
	int 15h support for virtualizing himem.sys accesses to
	extended memory 
pic.asm 
	PIC support
reboot.asm 
	handles mapping the last BIOS page, modifying the reboot
	vector at FFFF:0, supporting a reboot request

rundown.asm 
	Seperat ASM program which runs the EMU86 system down

tss.asm 
	TSS setup, including I/O mapping
	     
vm86.asm
	V86 emulator support
	     
vm386.asm
	Support for 386 commands in V86 mode.  Not implemented yet.    
xmsctl.asm   
	XMS shadowing, handles A20 line functions virtually
ems.asi      
	EMS header file
emuinter.asi 
	port emulation header file
gdt.asi      
	GDT definitions
idt.asi      
	IDT definitions
int15.asi    
	int 15 definitions
pic.asi      
	PIC definitions- also defines where interrupts will be 
	redirected

reboot.asi 
	Header file for reboot functions
segs.asi 
	Segment definitions and Selectors
tss.asi 
	TSS header file
vm86.asi 
	Emulator header file
vm386.asi 
	386 emulation header file
xmsctl.asi   
	XMS header file