Motorola M68000 Betriebsanweisung Seite 204

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 256
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 203
190 Assembly Language Programming for the 68000 Family
rect mode. The new 68020 modes make this operation a thing of the past.
Figure 17 shows the calculation of the effective address for the versions
using an address register. The versions of these modes for use with the
program counter are identical if the PC is substituted for the address reg
ister. In this case the memory address pointed to by the PC is that of the
first extension word. The two versions of the addressing mode are very
similar. The major difference is whether post-indexing or pre-indexing is
used.
The assembler syntax for these forms are:
(tbd,An],Rn.<size>*<scale>,od) post-indexed
([bd,An,Rn.<size>*<scale>],od) pre-indexed
([bd,PC],Rn.<size>*<scale>,od) post-indexed
([bd,PC,Rn.<size>*<scale>],od) pre-indexed
With the post-indexed versions, the memory location calculated by
adding An or PC to bd is used as the memory indirect location. This
is the memory location containing the pointer. The index register, appro
priately scaled, is added to this pointer as well as the outer displacement,
od. This final value is the effective address. With the pre-indexed versions
the sequence is slightly modified. The location of the memory indirect
pointer is determined by adding the address register or PC to the base
displacement, bd, and the scaled index register. The outer displacement
is added to the pointer to compute the final effective address. All four
of the specified values are optional. This actually provides 16 different
combinations.
Only the most advanced assembly language programmers will need
these advanced addressing modes. However, the pre-indexed versions are
especially useful when you have an array of pointers. You might keep this
in mind as you start programming with the 68020.
Instruction Extensions
The extensions to existing instructions generally fall into two cate
gories: increase in the size of allowable displacements, and increased
functionality.
The 68020 allows a full 32-bit displacement to be used with the branch
instructions BRA, BSR, and Bcc. Formally, the addressing range was
restricted to a 16-bit displacement. This extension allows us to reach
anywhere in memory with these instructions.
The CHK instruction will now operate with both word and longword
sources. Recall that the CHK instruction checks the contents of an address
register against a bound that is stored in the source operand. You must
specify the size of the bound using the usual method of appending .W or
.L to the instruction mnemonic.
Seitenansicht 203
1 2 ... 199 200 201 202 203 204 205 206 207 208 209 ... 255 256

Kommentare zu diesen Handbüchern

Keine Kommentare