Intel 80386 DJ Equipment User Manual


 
APPLICATION
ARCHITECTURE
Table
2-1.
Principal Data Types and Instructions
Type
Integer,
Ordinal
Size
8,
16,32
bits
Unpacked I digit
Decimal
Packed 2 digits
Decimal
Instructions
Move, Exchange, Translate,
Test,
Compare,
Convert,
Shift, Double Shift,
Rotate, Not, Negate,
And,
Or, Exclusive
Or,
Add,
Subtract,
Multiply,
Divide, Increment,
Decrement,
Convert
(M
Dve
with sign/ zero
extension)
Adjust for: Add,
Subtract,
Multiply, Divide
Adjust for:
Add,
Subtract
String
(hyte, 0-4G bytes, M ave, Load,
Store,
word, dword) words,
dwords
Compare,
Scan,
Repeat
Bit
String
Near
Pointer!
1-4G bits
32
bits
Test, Test
and
Set, Test
and
Reset, Test
and
Complement,
Scan,
Inscrt,
Extract
(Samc
as Ordinal)
Far
Pointer
48 bits
Load
I. A
near
pointer
is
a 32-bit offset into a segment defined
by one
of
the segment/descriptor register pairs. A far
pointer
is
a full logical addess,
that
is, a selector
and
an
offset.
Figure
2-7
shows how exam
pies
of
the basic data
types are stored in memory, Multibyte items can
be
located
at
any byte address. Depending on the
bus design, additional bus cycles may
be
required
to access
an
operand located at
an
address that
is
not a multiple of its
size.
Therefore, for best
performance independent of bus design, most
programs align word operands on word bound-
aries, dword operands on doubleword bound-
aries, and so on.
2.3.2 Numeric Coprocessor Data
Types
An 80287
or
80387 Numeric Coprocessor supple-
ments the
80386 with the data types and instruc-
tions shown in Table
2-2.
Most numeric applica-
tions store input values and output results in the
integer, real,
or
packed decimal types and reserve
2-7
the temporary
real
type for intermediate values,
where its extended range and precision minimize
rounding, underflow, and overflow problems in
complex computations. In accordance with this
model, a numeric coprocessor performs most
computations on temporary real values stored
in
its registers. Loading any type into the register
stack automatically converts the type to tempo-
rary real. A temporary real value
in
a register can
be
converted to any other type
by
a Store
instruction.
Table 2-2. Principal Numeric Coprocessor
Data Types and Instructions
Type
Integer
Packed
Decimal
Real
Temporary
Real
Size
16,32,
64 bits
18
digits
32,64
bits
80 bits
Instructions
Load,
Store,
Compare,
Add,
Subtract,
Multiply,
Divide
Load,
Store
Load, Store,
Compare,
Add,
Subtract,
Multiply,
Divide
Add,
Subtract,
Multiply,
Divide,
Square
Root,
Scale
Remainder, Integer
Part,
Change, Sign, Absolute
Value,
Extract
Exponent
and
Significand,
Compare,
Examine, Test,
Exchange
Tangent, Arctangent,
2'-1,
y* Log
2
(X +
1),
y* Log
2
(X),
Load
Constant
(0.0,
pi, etc.) (80387
adds
Sine,
Cosine, Sine
and
Cosine,
Unordered
Compare)
Figure 2-8 shows
how
numeric
data
types are
stored in memory.
2.3.3 Other Instructions
Not
all 80386 instructions are associated with
data
types.
The
following
paragraphs
survey
the untyped instructions.
2.3.3.1 Stack Instructions
An 80386 stack
is
a stack
of
dwords
whose
base
and
top
are defined by the
SS
and
ESP