ͻ
            EMU386 Version 1.34;beta 1 - Shareware Version          
               Real-mode 386 Upgrade Emulator For 286's             
     Copyright (c)1997,1998 by Eko Priono, All Rights Reserved      
ͼ

Eko Priono                      e-mail: epr@mojokerto.wasantara.net.id
Miji Baru III Kenanga 12      http://www.jasapersada.com/personal/epr/ 
mojokerto 61322              Survivor PC homepage (under construction) 
Indonesia

----------------------------------------------------------------------
Description   : Software-only upgrade emulator, 286 to real-mode 386
Software type : Executable device driver
Platform      : PC, 286 (specific), MS-DOS
Revision date : 08 Feb 1998
Changes       : Bug fixes in test opcodes, more 386 software supported
Package       : EM3134B1.ZIP
Contents      : * README.TXT - User guide, this file.
		* REGISTER.TXT - Separate registration form.
		* HISTORY.TXT - History list.
		* EMU386S.EXE (11582 bytes) - EMU386 device driver.
----------------------------------------------------------------------


CONTENTS:
	I.      INTRODUCTION.
	II.     CREDITS
	III.    IMPORTANT - LICENSING AND DISTRIBUTION AGREEMENT.
	IV.     REQUIREMENTS.
	V.      HOW IT EMULATE.
	VI.     SUPPORTED FEATURES.
	VII.    UNSUPPORTED FEATURES.
	VIII.   RUNABLE 386 SOFTWARE.
	IX.     SOFTWARE THAT NOT WORKS.
	X.      EMU386 EXECUTABLE FORMAT.
	XI.     INSTALLING AND UN-INSTALLING.
	XII.    DETECTING THE DEVICE DRIVER.
	XIII.   DEVELOPMENT BACKGROUND.
	XIV.    FURTHER DEVELOPMENT.
	XV.     LATEST VERSION.
	XVI.    REGISTERING.


I. INTRODUCTION.
================

You  have an old 286 PC and still want to use it?  Or you have an  old
286 PC somewhere and want to recycle it?  If the answer is  yes,  then 
you  had  to try this software.  EMU386 will allow  you  to  partially 
upgrade  your 286 to 386.  If installed, EMU386 will add real-mode 386 
capabilities to your 286 PC, no additional hardware required.

Real  mode  is the operating mode of the  8086/8088  processor.  These
processors  using  16-bit registers, memory access is limited  by  the
hardware to the first one megabyte and accessed by 64 k segments. This
mode is initial operating mode of any 80x86 processors (i.e 8086/8088,
286, 386, 486, and Pentiums).

In real-mode, 286+ behave as a fast 8086 with extra set of opcodes and
(in  case  of  386+) extra set  of  registers.  Despite  their  actual
hardware  capabilities,  they  are limited by the constraints  of  the
earlier design. Similarly, DOS is designed for 8086/8088 machines, and
can run only in real mode on 286+ based PCs.

Normally, all DOS software always run in real mode. Newer DOS software
using DOS extenders such as DOS4GW, Pharlap, etc.,  to switch and  run
in  protected  mode. On a 286, Windows 3.x's software  always  run  in
16-bit protected mode, but a DOS software running under windows is run
in real mode.

Some of DOS software still run in real-mode, most of them available as
shareware  and freeware. Several software developer around  the  world
still produce good and useful real-mode DOS software,  some of them is
highly optimized and runable even on an old 8088 XT,  but usually 386
is  minimum.  With EMU386 installed,  you will be able to run some  of
these programs, see RUNABLE 386 SOFTWARE section for details.

Another purpose of EMU386, is to give you a chance to use new plug and
play devices on your old 286 PCs.

In old days we always configuring PC extension cards and  peripherals
using  DIP switches and jumpers.  Now, most of that products is  plug
and play, designed for Win 95 environment.

For  DOS  and Win 3.x users, the only way to use that products  is  by
installing  the provided device driver or setup programs,  which  only
runable in a 386.   Since this kind of programs usually  run  in  real
mode,  with EMU386 installed you will be able to run them and use  the
new hardware on your old 286 PC.


II. CREDITS.
============

All  products  mentioned  in this documentation  which  are  patented,
copyrighted  or  are trademarks are the property of  their  respective
owners.

All  source  modules  written from scratch in assembly  language,  the
documentation  and  EMU386S.EXE files are copyrighted and  exclusively
owned  by the author (c)1997 by Eko Priono, Mojokerto, Indonesia,  all
applicable rights reserved.


III. IMPORTANT - LICENSING AND DISTRIBUTION AGREEMENT.
======================================================

All  terms and conditions following are applied exclusively  for  this
version of EMU386 which may changed, added, or not available in future
releases.

EMU386 is protected by international copyright laws.  You may not use,
copy, rent, lease, sell, modify, reverse engineering (i.e disassemble,
decompile,  etc.),  clone,  or  distribute  this  software  except  as
expressly granted in this agreement.  Unauthorized use shall result in
immediate  automatic  termination  of this license and may  result  in
civil and/or criminal prosecution.

EMU386  is distributed as a ZIP file containing the device driver  and
it's associated documentation.

Copying  and  redistribution is encouraged, but must be the  original,
unmodified  file containing this documentation, the transfer must  not
carry any fee or charge specific to this software.

EMU386 is made available on "try before you buy" basis and distributed
as shareware.  However,  for your evaluation purpose it's not crippled
in any way, and provided fully functional.

This software is not "freeware" or "public domain". You are welcome to
evaluate and test this software without charge for a reasonable  trial
period of 30 days. If you continue to use it, or kept it for later use
after the trial period,  you are obligated  to register it by paying a
license fee.

When you register, you will get:
* Latest registered version of EMU386, all reference to "unregistered"
  and  start up "nag" display removed, plus any enhancements that have
  been added since this version was released.
* Free support from the author via e-mail.

If  you  obtained  this software from a shareware distributor (i.e. in
diskette, CD-ROM, DVD-ROM, etc.),  you have paid only for the  service
of copying,  you did not pay for the software itself. If you like this
software then please register.

To  register,  see details in REGISTERING section  of  this  document.

EMU386 carries no warranties expressed or implied.  It is solely up to
the user to determine its suitability for use on his/her machine.

EMU386 IS PROVIDED AND DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS
EXPRESSED  OR  IMPLIED,  INCLUDING, WITHOUT  LIMITATION,  THE  IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

USE AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR ANY DATA LOSS,
DAMAGES,  LOSS  OF PROFITS OR ANY OTHER KIND OF LOSS  WHILE  USING  OR
MISUSING THIS SOFTWARE.

By Installing and using EMU386S.EXE you accept all of these terms  and
conditions  of the license.  All rights not expressly granted here are
reserved by the author.


IV. REQUIREMENTS.
=================

This program is specific to 286 based PCs, and will not install itself
if running on a 8086- or 386+ class PCs.

Requirements are:

1. PC XT/AT 286 or compatible.
2. MS-DOS version 3.00 or above. (any true compatible DOS is O.K.)


V. HOW IT EMULATE.
====================

EMU386 works by intercept invalid opcode exception. When a 386+ opcode
is executed, the exception generated will invoke EMU386,  which fetch,
decode, and execute the failed opcode.  This method will allow all 286
opcodes  to run in it's normal speed.  Speed penalty only occur if 386
opcode  is executed, since a single 386 opcode emulated with  multiple
286 opcodes.

By  using  this  method,  a proper  CPU  detection  routine  will  not
detected,  and - if present - will stop program execution with a '386+
required'  message.  This will provide further protection  when  using
EMU386,  because 32-bit protected mode DOS programs will fail on  it's
CPU  detection sequence.  Disadvantage is: you cannot run  some  older
real-mode 386 DOS program that guarded by CPU detection routine.


VI. SUPPORTED FEATURES.
=======================

Current  version of EMU386 only support 386 opcodes that available  in
real-mode.  If  EMU386 is fail to handle the failed  opcode,  it  will
display an error message and locks the computer.

EMU386  fully  support all extended registers of  386  processor  that
required  for  real-mode operations.  They are  emulated  with  memory
variables in the device driver.

Supported registers are:

386 segment registers:

	FS segment register
	GS segment register

386 32-bit general registers:

	EDI register
	ESI register
	EBP register
	ESP register
	EBX register
	EDX register
	ECX register
	EAX register

Current  release  of EMU386 fully support all real-mode  386  opcodes.
These  opcodes are emulated to mimic the same behavior of a  real  386
processor running in real-mode.


VII. UNSUPPORTED FEATURES.
==========================

386  Debug  features and operations are not supported.  386  debuggers
that implements hardware debugging will not work properly.

Protected  mode and virtual mode 386 features and operations  are  not
supported. All 32-bit protected mode DOS software will not run.

If you have more than 4 Megs of RAM win 3.x will still run in standard
mode. All windows software for 386 will not run.

Installing/un-installing by running EMU386 from DOS prompt is not  yet
supported.


VIII. RUNABLE 386 SOFTWARE.
============================

EMU386 will allow 286 users to run 386 DOS software that conforms:

* Running in real-mode only.
* Does not check CPU type (most 1993-up released software).

Protected  memory  manager like HIMEM.SYS is O.K.,  It's  called  from
within  a  real-mode 386 program, run flawlessly in  16-bit  protected
mode ( i.e. not generating any exception), and pass the  control  back
to the calling program.

Note: Some 386 software which calls HIMEM.SYS's 32-bit supersets  will
      not  work  properly,  and  hangs  the  computer  on  some  older
      HIMEM.SYS version.

Real-mode  386 MS-DOS software running under Win 3.x MS-DOS mode  will
still  works, since on a 286, Win 3.x will only run in standard  mode,
which always switch to real mode when running MS-DOS software.

Some 386 MS-DOS software is highly optimized for 386 CPU,  i.e. almost
any adjacent opcodes is 386's. EMU386 will be able to handle this type
of software, but probably it will run very slow.

Some recent MS-DOS software is intended to runable on a 286- PCs,  but
developed in a 386+ PCs using compilers designed for 386+ environment.
Sometimes  the  compiler 'accidentally' generates 386 opcodes  in  the
executable  code  while trying to optimize it. EMU386 will  allow  286
users  to run this kind of software almost as fast as pure 286-  code,
since 386 opcodes are very rare.

Some DOS software which has 386 opcodes in it's time-critical  section
(i.e. direct video register updating, etc.). This kind of software
will still run, but some part will not work properly.

Some 386 MS-DOS software using EMS function without first checking the
presence of EMS memory manager. It will just hangs the  computer.  For
this  type  of  software,  installing  a LIM-EMS  hardware  with  it's
device  driver or an EMM simulator (converting XMS and disk  space  to
EMS),  will  solve the problem. Most recent program  required  LIM-EMS
version 4.0.


IX. SOFTWARE THAT NOT WORKS.
============================

All DOS software for 386 that equipped with proper CPU detection  code
will stop running with a '386+ required' message.

Software  that  had protected mode or 486+ opcodes in it's  code  will
cause EMU386 to display invalid opcode message and lock the computer.

32-bit protected mode DOS software will simply not work,  since all of
them  equipped  with CPU detection code that will stop it  with  '386+
required' message.

Win  3.x  taking  over all exception, trying to run any  386+  Windows
software on Win 3.x will display invalid opcode error window.


X. EMU386 EXECUTABLE FORMAT.
============================

EMU386  written  as an executable device driver. It can  installed  as
device  driver  the same way as you install a SYS device  driver,  and
also can run directly from DOS prompt.

Currently,  the  only  way to install EMU386 is by  installing  it  as
device  driver,  the EXE portion only used to  display  copyright  and
status message. It's possible to provide EXE portion tsr/unload method
in future version.

The  advantage  of  installing as device  driver,  is  possibility  to
install 386 device drivers under EMU386 (usually has .386  extension),
provided that they conforms to software limitation explained above.


XI. INSTALLING AND UN-INSTALLING.
================================

If you familiar with CONFIG.SYS configuration file, installing EMU 386
will be an easy task for you:

EMU386 installed as a device driver in CONFIG.SYS file.

1. To load driver, include in CONFIG.SYS (using a text editor):

	DEVICE<HIGH><?>=<drive><path>EMU386S.EXE

   Where:

	<HIGH>...Tell DOS to load device driver to UMB,  instead to
		 conventional memory.  Use this only if  you  using
		 MS-DOS  5.00  or  newer and if you  installed  UMB
		 driver  for  your computer before EMU386.EXE  (286
		 PC's UMB driver is motherboard dependent).
	<?>......Asking  to load or not to load the  device  driver
		 when DOS is processing CONFIG.SYS  (available only
		 for MS-DOS 6.0 or newer).
	<drive>..Drive  name where to find EMU386.EXE (i.e.  A: for
		 first  floppy  drive,  C:  for first  fixed  disk,
		 etc.).
	<path>...Directory name where to find EMU386.EXE file.

   Example:

   Assumed that EMU386S.EXE is copied to directory C:\EMU,
   Include in CONFIG.SYS:

	DEVICE=C:\EMU\EMU386S.EXE

2. Reboot  the computer, EMU386 device driver will be stay resident in
   memory using about 10 Kbytes.

To  temporary  un-install  EMU386,  comment out  the  EMU386  line  in
CONFIG.SYS file and reboot the computer:

   For the example above the CONFIG.SYS line should be:

   REM DEVICE=C:\EMU\EMU386S.EXE
   ~~~

To  totally  un-install  EMU386  simply  delete  CONFIG.SYS  line  that
contains EMU386S.EXE and reboot the computer.


XII. DETECTING THE DEVICE DRIVER.
=================================

This  section  is  intended for software  developers  and  anyone  who
interested in writing real-mode 386 DOS software.

As  mentioned  above,  a DOS software written for 386 running in real-
mode  which equipped with CPU detection routine will refuse to run  in
an  EMU386-enhanced 286.  If only the  CPU  detection  routine  wasn't
there, that software will be able to run properly.

To avoid that, the simplest way is to include an option: detecting, or
not  detecting  the  CPU  (on  the user own risk).  Other  way  is  by
including an auto detection for the presence of emulator like EMU386.

To  detecting presence of EMU386 is easy.  Once installed, EMU386 will
appear  in DOS  device driver  list  as  EMU386S0  device  driver.  By
detecting  the  presence  of this device  driver  signature,  you  can
arrange your software to skip 386 CPU detection if EMU386 is present.

To detect a device driver, you can try to open it's name by using  MS-
DOS  function  3Dh  (open file with handle),  if successful,  then the
associated  device  driver is installed. Current version of EMU386 not
yet  implementing  a  communication method with external programs, you
can only detect it's presence.

This  detection  method  is basically the same way  as  detecting  the
presence  of  other  device drivers such as EMS  memory  managers  and
Smartdrive.


XIII. DEVELOPMENT BACKGROUND.
=============================

When  I  first  work on this project, I do it just for  fun.  My  only
motivation  is  to find a way to prolong the life of my old 286-21 Mhz
PC/AT.  Otherwise  I just dump it in garage like my old Apple  II+.  I
presume  that  the era of 286 PCs is already gone forever, so  I  kept
this software for my own purposes and never introduce it to anyone.

Things  are  amazed me when I read in a local computer  magazine  that
some  people  out there still support this old platform, then  when  I
join  a DOS users newsgroup, I found that some people still using  286
PCs  and  laptops. More than that, several software developers  around
the world still support old PCs with their DOS and Win 3.x software.

When  I  search  the  Internet for software-only  emulators,  I  found
nothing  on  software-only upgrade emulators.  Most  of  software-only
emulators I found is down-grade, or general-to-specific type.

Learn from that experience, I presume that EMU386 kind of software  is
very rare, and the market, even quite small are still out there. Based
on  that, I decide to release this 'unique' software to the market.


XIV. FURTHER DEVELOPMENT.
=========================

It's  a  possibility to emulate all 386 features, to  do  that  EMU386
must  be rewritten as a 16-bit protected mode device driver. A  32-bit
application  may  turn operation default to 32-bit, in this  case  all
opcodes  will have the same form as a 16-bit opcodes supported by 286,
which  of course, not generate invalid opcode exception. To deal  with
this  situation a full interpreter mode must be added  to  the  device
driver.

Although  this method probably just too slow for 32-bit  applications,
this  development  is very interesting, because it will allow  286  PC
users  to  run  many older 32-bit protected  mode  software  that  not
require high speed execution (i.e designed for 386SX and slow 386s).

The  initial  beta  evaluation  release  (ver. 1.00 rev 32)  has  been
delivered  on  demand  basis by e-mail to personal users,  until  this
version released no serious bug reported.

Until now, I already using EMU386 myself for several months on my  old
PC/AT 286 with several 386 software I have, and so far I found no more
bugs.

If you do find any bugs, please report it to me, I will fix it in next
version.  Any comments and suggestions regarding to this product  also
welcome.


XV. LATEST VERSION.
===================

EMU386  is  packaged as a ZIP file named EM386xxx.ZIP or  EM3xxxBn.ZIP 
(for  beta  test versions) substitute xxx with version number  of  the 
software  without period, and n with beta release number. For example, 
this beta test version is packaged in ZIP file named EM3134B1.ZIP.
							~~~ ~
To  obtain  the  latest shareware version,  you  can  download  EMU386
package from the internet by FTP at:

* TVdog's Archive, http://www.agate.net/~tvdog/ 
	ftp://ftp.agate.net/users/01935/tandy1000/utilities/
	(not Tandy specific)

* Coast to Coast Software Repository, http://ftp.coast.net/coast/
	ftp://ftp.coast.net/coast/msdos/emulator/

* Keith Petersen's Software Archive, http://www.simtel.net/simtel.net/
	ftp://ftp.simtel.net/pub/simtelnet/msdos/emulate/

Or by HTTP at:

* Coast to Coast Software Repository.
	http://ftp.coast.net/coast/msdos/emulator.html 

* Keith Petersen's Software Archive.
	http://www.simtel.net/simtel.net/msdos/emulate.html

NOTE: EMU386  package  may no longer available in the above sites,  or
      moved  to another directory. In this cases you can contact  site 
      administrator  for assistance, or contact the author for  latest
      upload update.

If you prefer to get it by MIME/UUencoded e-mail,  you can use FTP-by-
mail  services  --  they will fetch the file and send it  to  you  via
e-mail.

Distributions  are strongly encouraged. Webmasters and site owners who
wish  to  put  shareware  version of this software in their  site  are
welcome,  provided  that distribution and license agreement above  not
violated.


XVI. REGISTERING.
=================

As  mentioned  above,  EMU386  is distributed as  shareware.  You  are
welcome  to  evaluate  and test it without charge  for  an  evaluation
period of 30 days.  If you continue to use it or kept it for later use
after  the  trial period,  you are obligated to register by  paying  a
license fee.

Generally all updates are free (except S&H), provided the registration
fee hasn't changed, however, older versions may subject to update fee.

Registration form included in this document is only valid for personal
use  on a single CPU.  If you want to use EMU386 on several  computers
you must register it for each one.

Please contact the author for the conditions of
* Multiple user or site licenses.
* OEM distribution licenses.
* Publication of registered version.
* All other conditions not mentioned above.

All prices, terms and conditions are subject to change without notice.

You will find an order form at the end of this document.  To register,
load  this file into any text editor and complete the form or print it
first  and  complete it manually.  If you don't have a  printer  write
everything  manually  on  a sheet.  Separate form  also  available  in
REGISTER.TXT file

NOTE:  If you do fill it manually please use a typewriter, or write it
by hand in clear block letters.

Mail  the completed form together with your payment or  payment  proof
to:
	Eko Priono
	Miji Baru III Kenanga 12
	Mojokerto 61322
	Indonesia

There are several possibilities for payment method accepted:

* Cash:  must be in US Dollars (US $), this method is risky, if you do
  pay  in  cash  please make sure that it is not visible  through  the
  envelope.
* International postal money order, recommended. Must be payable in US
  Dollars (US $). Please ask to your local post office for details.
* Bank money transfer. please contact the author for details.

In  case  of non-cash payment methods, your registration will  not  be
processed  until both of your registration form and payment arrive. To
speed-up the process,  enclose registration form whenever possible.


			  ----=========----
		  Mojokerto, Indonesia, 08 Feb 1998.
			  ----=========----




----------------------------------------------------------------------



    EMU386 Registration Form                       Version 1.34;beta 1
    ==================================================================

				    Order date: ______________, ______

    Name: ____________________________________________________________

    Organization (optional): _________________________________________

    Address: _________________________________________________________

    __________________________________________________________________

    City: _______________________________ ZIP/Postal code: ___________

    State/Province, Country: _________________________________________

    I got shareware version from: ____________________________________

    If newer version may complete within weeks:

    [ ] Yes I will wait for ______ weeks, beyond that send me current
	version. Notify projected delivery date.
    [ ] I will not wait, send me current version.

    Method of delivery:
    [ ] via e-mail, recommended ............................(free S&H)

	e-mail address: ______________________________________________
	Format:     [ ] MIME-encoding       [ ] UU-encoding

    [ ] On disk via postal mail ...................... (add US $5 S&H)
	Disk type:  [ ] 3.5" 720 Kb         [ ] 5.25" 360 Kb
		    [ ] 3.5" 1.44 Mb        [ ] 5.25" 1.2 Mb

    Registration license fee:
    [ ] EMU386 shareware version .................. (free, except S&H)
    [ ] EMU386 personal use license ..................... (US $10) (*)

						       ---------------

					  Total US $:  _______________
    Payment method:
    [ ] US $ cash, enclosed.
    [ ] International postal money order, US $ only.
    [ ] Bank transfer (**)

    (*)   Single user license,  a non-exclusive license to use  EMU386
	  on  one  stand alone computer at one time. For any  cases  of
	  commercial  licenses contact the author for special discount
	  rates and arrangements.
    (**)  Contact the author first for details.

    Please also answer the following questions concerning your system.
    It helps me if problems occur.

    CPU Type, brand: _________________________________________________

    Memory, amount and type: _________________________________________

    Extension cards: _________________________________________________

    Comments, bug reports, wishes: ___________________________________

    __________________________________________________________________

    __________________________________________________________________



----------------------------------------------------------------------
