OVERVIEW OF NUMERIC PROCESSING
all 80287 numeric instructions
in
software. This emulation
is
completely transparent
to
the appli-
cation
software-the
same object code may be used by both 80286 and 80287 systems.
No
relinking
or recompiling of application software
is
necessary; the same code
will
simply execute faster
on
the
80287 than
on
the 80286 system.
To facilitate this design of upgradable
80286 systems, Intel provides a software emulator
for
the 80287
that provides the functional equivalent of the 80287 hardware, implemented
in
software
on
the 80286.
Except for timing, the operation of this
80287 emulator (E80287)
is
the same
as
for the 80287
NPX
hardware. When the emulator
is
combined
as
part of the systems software, the
80286 system with 80287 emulation and the 80286 with 80287 hardware are virtually indistinguishable
to an application program. This capability makes it easy for software developers to maintain a single:
set of programs for both systems. System manufacturers can offer the NPX
as
a simple plug-in
performance option without necessitating any changes
in
the user's software.
Programming Interface
The 80286/80287 pair
is
programmed as a single processor; all of the 80287 registers appear to a
programmer
as
extensions of the basic 80286 register set. The 80286 has a class of instructions known
as
ESCAPE instructions, all having a common format. These ESC instructions are numeric instruc-
tions for the
80287 NPX. These numeric instructions for the 80287 are simply encoded into the instruc-
tion stream along with
80286 instructions.
All of the
CPU
memory-addressing modes may be used in programming the NPX, allowing convenient
access to record structures, numeric arrays, and other memory-based data structures.
All
of the memory
management and protection features of the
CPU
are extended to the
NPX
as
well.
Numeric processing
in
the 80287 centers around the
NPX
register stack. Programmers can treat these
eight 80-bit registers
as
either a fixed register set, with instructions operating
on
explicitly-designated
registers, or a classical stack, with instructions operating
on
the top one or two stack elements.
Internally, the
80287 holds all numbers
in
a uniform 80-bit temporary-real format. Operands that may
be represented
in
memory
as
16-,
32-,
or 64-bit integers,
32-,
64-,
or 80-bit floating-point numbers, or
18-digit packed BCD numbers, are automatically converted into temporary-real format
as
they are
loaded into the
NPX
registers. Computation results are subsequently converted back into
one
of these
destination data formats when they are stored into memory from the
NPX
registers.
Table
1-2
lists each of the seven data types supported by the 80287, showing the data format for each
type. All operands are stored
in
memory with the least significant digits starting at the initial (lowest)
memory address. Numeric instructions access and store memory operands using only this initial address.
For maximum system performance, all operands should start at even memory addresses.
Table
1-3
lists the 80287 instructions by class. No special programming tools are necessary
to
use the
80287, because all of the
NPX
instructions and data types are directly supported by the ASM286
Assembler and Intel's appropriate high-level languages.
Software routines for the
80287 may be written
in
ASM286 Assembler
or
any of the following higher-
level languages:
PL/M-286
PASCAL-286
FORTRAN-286
C-286
1-5