Dec 082017
Emulate 8087 in software.
File EMUL87.ZIP from The Programmer’s Corner in
Category Utilities for DOS and Windows Machines
Emulate 8087 in software.
File Name File Size Zip Size Zip Type
EMOFF.COM 191 187 deflated
EMON.COM 184 183 deflated
EMUL87.DOC 3380 1527 deflated
EMUL87.EXE 13916 9574 deflated

Download File EMUL87.ZIP Here

Contents of the EMUL87.DOC file

EMUL87 -- An 8087 Emulator for Turbo Pascal

EMUL87 is a terminate but stay resident program that emulates the functionality
of the 8087 math coprocessor for Turbo Pascal programs. It requires an 80286
or 80386 processor to operate. Using the EMUL87 programs allows the fastest
possible floating point math on machines with the math coprocessor, while
still allowing program operation on most common hardware (AT, no 287). You
can use inline 8087 instructions, without worrying!

The only major limitation is that older PCs and XTs (8088, 8086 and 186 based
machines) will HAVE to aquire a math coprocessor to run your software.

A more minor limitation is that the Floating Point Emulator is based on
Borlands Turbo C floating point emulator, and the emulation is NOT COMPLETE.
This means that EMUL87 cannot be used as a generic 87 eliminator. The missing
instructions are FINCSTP, FDECSTP, FFREE and floating stack wraparound.
The only program that I have had a problem with is the D86 debugger (part of
the A86 assembler package; everything works, but the 87 register display
does not come up properly).

Also, EMUL87 will not "fool" any program that is deliberately looking for
a 80287 chip. The '87 code will have to be generic 8087 to be successfully

I tried wrapping the emulator into a Turbo Pascal 4 Unit, but with segment
naming problems, etc, it was going to be far too difficult to accomplish
in any meaningful time frame, so I settled for keeping a TSR implementation.

There are three programs in this package:

EMUL87 The 87 emulator itself. If the processor is not a 286 or
386, it will refuse to go resident. If a 287 or 387 is
present, it will refuse to go resident. If the word
"force" is put on the command line, it will override
the 287/387 detection and force EMUL87 resident. EMUL87
takes 14K of memory.

EMON Turn EMUL87 on (if it is in memory)

EMOFF Turn EMUL87 off (if it is in memory)

Typical use of the EMUL87 package is in a batch file:

EMUL87 -- load the emulator
EMON -- enable it
...myapplication... -- run the 87 code
EMOFF -- turn the emulator off

There is currently no way to remove EMUL87 from memory, nor am I likely to
provide one. It does contain a check to prevent from being multiply loaded.


The force option is useful to test programs with 87 emulation, even if
you have the chip. Its easier than removing the chip!

EMUL87 works with Turbo Pascal 3 (8087 version), Turbo Pascal 4 with
{$N+} compilation and Turbo C. The popular TCDEBUG program benefits
because it is incapable of de-assembling emulator opcodes!


Watch out for Ctrl-Alt-Del! If the emulator is enabled, ALL floating
point instructions are going to be trapped. Ctrl-Alt-Del Warm Start
routine DOES NOT clear the instruction trapping! In order to be safe,
EMOFF should be put into your AUTOEXEC.BAT file, BEFORE any programs
are actually run.

If a program (like the popular ARC program) tries to detect the
presence of an '87 chip, and EMUL87 is not loaded to catch the instruction,
your machine WILL end up in hyperspace.

 December 8, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>