Motorola M68000 Betriebsanweisung Seite 206

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 205
192 Assembly Language Programming for the 68000 Family
The CMPI and TST instructions now allow all of the PC relative
addressing modes. However, this extension only applies when word or
longword operands are used.
The divide and multiply instructions, DIV and MUL, have been
greatly expanded. Recall that the four forms of these instructions were:
DIVU <ea>,Dn
DIVS <ea>,Dn
MULU <ea>,Dn
MULS <ea>,Dn
The divide instructions require a 16-bit source and 32-bit destination
operand. The result is a 32-bit value consisting of a 16-bit quotient
and a 16-bit remainder. The multiply instructions multiply two 16-bit
operands, yielding a 32-bit result. The expanded divide instructions have
the following forms:
DIVS.W <ea>,Dn DIVU.W <ea>,Dn 32/16->16r:16q
DIVS.L <ea>,Dq DIVU.L <ea>,Dq 32/32->32q
DIVS.L <ea>,Dr:Dq DIVU.L <ea>,Dr:Dq 64/32->32r:32q
DIVSL.L <ea>,Dr:Dq DIVUL.L <ea>,Dr:Dq 32/32->32r:32q
The operation of these instructions is relatively straightforward. The
first form is the form found on the 68000. This is the default if no
size is specified. The three extended forms vary in the sizes of the
operands and/or the result. Notice that a register pair is required for
operands/results that require more than 32 bits total. The notation Dr/Dq
refers to the quotient and remainder registers. These can be any of the
data registers.
The expanded multiply instructions have the following format:
MULS.W <ea>,Dn MULS.W <ea>,Dn 16Xl6->32
MULS.L <ea>,Dl MULS.L <ea>,Dl 32X32->32
MULS.L <ea>fDh:Dl MULS.L <ea>,Dh:Dl 32X32->64
The first form is the old 68000 form. In this case two 16-bit operands
are multiplied to yield a 32-bit result. The expanded forms allow the
multiplication of two 32-bit operands to yield either a 32-bit or a 64-bit
result. In the case of a 64-bit result, Dh and Dl refer to the registers used
to hold the high-and low-order 32 bits of the result.
The EXT instruction has been expanded. Recall that the EXT.W sign
extends a byte to a word, and the EXT.L sign extends a word to a
longword. In order to sign-extend a byte to a longword, both of these
instructions had to be used. The 68020 allows a sign extension from byte
to longword with a single instruction. A slightly different mnemonic has to
be introduced. This is not really a different instruction, but an expanded
form of EXT. The new instruction format is EXTB.L. This is the exact
Seitenansicht 205
1 2 ... 201 202 203 204 205 206 207 208 209 210 211 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare