Motorola M68000 Betriebsanweisung Seite 60

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 59
46 Assembly Language Programming for the 68000 Family
tion; in this case the destination operand is only a single byte. However,
if a one-byte constant is used with a word or longword destination, the
assembler is able to generate the proper machine instruction. The 68000
assembly language includes a mechanism in which numeric constants are
automatically sign-extended to 8, 16, or 32 bits as needed. The following
instruction is not legal and would be flagged as an error by the assembler:
ADD.B §1000,DO
The source and destination operands can be the same.
ADD.L DO,DO
results in the DO register being doubled.
Note that the ADD or SUB instructions do not allow the more general
form
ADDl.<size>] <ea>,<ea>
SUB[.<size>] <ea>,<ea>
This would eliminate the possibility of adding a constant to a memory
location, or subtracting a constant from an address register. There are a
couple of additional forms of the ADD and SUB instructions that help to
eliminate some of these restrictions.
ADDA[.<size>] <ea>,An
SUBA[.<size>1 <ea>,An
<size> = W or L
allows adding or subtracting to an address register.
ADDII.<size>] #<data>,<ea>
SUBI[.<size>] #<data>,<ea>
allow adding or subtracting an immediate value to a memory location
or data register. This instruction cannot be used to add or subtract
an immediate value to an address register. For example, the following
instructions are correct:
ADDI.L #1000,COUNT
ADDA.L #2,A5
Many assemblers allow the use of the mnemonics MOVE, ADD, SUB,
and so on without qualifying the instruction; the assembler decides what
instruction to use. For example, if you write
Seitenansicht 59
1 2 ... 55 56 57 58 59 60 61 62 63 64 65 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare