PROGRAMMING NUMERIC APPLICATIONS
The normal subtraction instructions (subtract real, subtract real and pop, integer subtract) subtract
the source operand from the destination and return the difference to the destination.
REVERSED SUBTRACTION
FSUBR
/
/source/destination,
source
FSUBRP / /destination/source
FISUBR source
The reversed subtraction instructions (subtract real reversed, subtract real reversed and pop, integer
subtract reversed) subtract the destination from the source and return the difference
to
the destination.
MULTIPLICATION
FMUL /
/source/destination,
source
FMULP destination,
source
FIMUL source
The multiplication instructions (multiply real, multiply real and pop, integer mUltiply) multiply the
source and destination operands and return the product
to
the destination. Coding FMUL ST,ST(O)
squares the content of the stack top.
NORMAL DIVISION
FDIV
/ /source/destination,source
FDIVP destination,
source
FIDIV source
The normal division instructions (divide real, divide real and pop, integer divide) divide the destination
by
the source and return the quotient to the destination.
REVERSED DIVISION
FDIVR
/
/source/destination,
source
FDIVRP destination,
source
FIDIVR source
The reversed division instructions (divide real reversed, divide real reversed and pop, integer divide
reversed) divide the source operand
by
the destination and return the quotient
to
the destination.
FSQRT
FSQRT (square root) replaces the content of the top stack element with its square root. (Note: The
square root of
-0
is
defined
to
be
-0.)
FSCALE
FSCALE (scale) interprets the value contained
in
ST(l)
as
an integer and adds this value
to
the exponent
of the number
in
ST. This
is
equivalent
to
ST
~ST.
2
ST
(I)
Thus, FSCALE provides rapid multiplication or division by integral powers of
2.
It
is
particularly
useful for scaling the elements of a vector.
2-7