
12/21/94

This zip contains two programs and their associated MASM source code.


FPOFF
-----
FPOFF.COM is a program that sets the BIOS data at 40:0 to indicate that
the 80x87 is not there.  Calls to INT 11 return the bit from this byte too.

FPOFF.COM also turns on the EM bit in the Pentium Control Register CR0. This
has the effect of making the Pentium to an INT 7 every time that an 80x87
instruction is executed.  This is how 80x87 emulators hook into the system,
and how Microsoft Windows "virtualizes" the coprocessor.

You might think that since FPOFF turns on the EM bit, that you would have to
have emulator software, or an INT 7 handler loaded - maybe via a TSR.  The
default ROM handler is suitable for this.

With the EM bit on, any FPU instruction is merely jumped over.  This makes
compilers like the Zortech understand that the 80x87 is not present or usable.

If FPOFF is run on a Pentium or better, it also displays the processor's
Family (Pentium), Model, and Stepping codes visible to the new CPUID opcode.


FPON
----
FPON reverses all that is done by FPOFF.


Notes
-----
o Windows does an INT 11 to see if the 80x87 is usable, so this works.
o Some DOS|Extended programs like AutoCAD for DOS will modify CR0.
  Rerun FPOFF after AutoCAD and similar programs.


TRY THIS TOO
------------
A quick look at the Microsoft C/C++ compiler documentation shows that adding
"NO87=ANYTHING" to your DOS environment will make the emulator built into your
DOS programs kick in.

Borland C/C++ 3.0 (and better?) has the same thing but with a twist. They use
"87=N".  "87=Y" would turn it back on (redundant).


LEGAL STUFF
-----------
This program and source code are hereby placed in the public domain.
Neither Alfred Heyman or Spectrum Research assume any liability for its use
or misuse.  The entire risk of its use is on the computer user.  

Microsoft Windows is a trademark of Microsoft Corp.
Pentium is a trademark of Intel Corp.
AutoCAD is a trademark of Autodesk Corp.


ADVERTISING
-----------
Spectrum Research specializes in C/C++ programming for Windows based systems,
80x86 assembler used for TSR's, drivers, and vxds.

Contact Spectrum Research at....

Compuserve: 74471,2476

Alfred J. Heyman
Spectrum Research
P.O. Box 50087
Nashville, TN 37205

"GO MICROMEDIUM" to see the Multimedia Authoring System for Computer
Based Training that we contributed to.



