Motorola M68000 Betriebsanweisung Seite 94

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 93
80 Assembly Language Programming for the 68000 Family
LEA BLOCK,AO
ADDQ.L §2,AO ADJUST BY ONE WORD
MOVE.W -(AO),DO GETS DATA ELEMENT INTO DO
DS.W 99 FIRST 99 WORDS OF ARRAY
BLOCK: DS.W 1 THE LAST WORD OF ARRAY
In the next couple of chapters you will learn some additional uses
for this addressing mode. Before going on to the next addressing mode
I should mention one minor detail that you must keep in mind. When
you use register A7 with either predecrement or postincrement modes,
it will always be adjusted by a multiple of two bytes. This means that
byte operations cause the value 2 to be added or subtracted. This is due
to the special significance of register A7 as a stack pointer, the topic of
the next chapter. Another thing you may be tempted to do is to use the
CMPM instruction with this addressing mode. You cannot do this. CMPM
can only be used with the address register indirect with postdecrement
mode.
Address Register Indirect With Displacem ent
This addressing mode is also a variant of address register indirect.
However, in this case there is no predecrement or postincrement. Rather,
this mode provides the ability to include a constant displacement to be
added to the value in the address register before it is used to form the
effective address. This value is not used to modify the contents of the
address register, but only in forming the effective address. The general
form is d16(An), where d16 indicates a displacement value which is 16 bits
long. It is a signed value; therefore, it can represent both a positive and
a negative offset given by the contents of An. Let’s say that AO contains
the value $10000. The instruction
MOVE.L 4 (A0),DO
will move the word at location $10004 to register DO. Using a symbol for
the displacement, the above example could be written as
DISP: EQU 4
MOVE.L DISP(A0),DO
If a symbol is used for the displacement, it must be a constant value and
Seitenansicht 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare