
The 68020 189
For these two basic 68000 modes, the effective address is computed
by taking the address register or program counter and adding the con
tents of either the full 32 bits of a general register or the sign-extended
low-order word of a general register. To this intermediate result the
sign-extended value of an 8-bit displacement is added. This final result
is used as the address of the operand. In assembler, these modes were
written as d8(An,Rn.<size>) and d8(PC,Rn.<size>), with <size> either
W or L. Along with the new 68020 addressing modes, Motorola intro
duced a slightly different assembler syntax for these addressing modes
as well as for the new ones. You will have to check your 68020 assembler
manual to find out the syntax required of your own assembler. The new
syntax for these 68000 addressing modes is (d8,An,Rn.<size>*<scale>)
and (d8,PC,Rn.<size>*<scale>). As you can see, these are very minor
changes. <scale> is an optional scale factor that is available with the
68020. It can be 1, 2, 4, or 8. If the scale factor is present, it is used
to multiply the value in the index register Rn. This makes indexing into
word and longword arrays much easier. For example, a scale factor of 4
would be used to access an array of longwords. Let’s say we want to ac
cess the 25th entry of a longword array pointed to by A0. We can do it
with the following instructions:
MOVE.W #24,DO
MOVE.L (0,A0,D0.W*4),D1
Remember, the first entry in the array will be at offset zero.
The first really new addressing mode on the 68020 is almost like the
address register indirect with index. The difference is that an optional
sign-extended 16- or 32-bit displacement, rather than an 8-bit displace
ment, is allowed. In fact, the address and index registers are also optional.
Two versions of this mode are available, one for use with an address reg
ister and one for use with the program counter. These addressing modes
have the following assembler formats:
(bd,An,Rn.<size>*<scale>)
(bd,PC,Rn.<size>*<scale>)
As before, the optional scale factor can be 1, 2, 4, or 8. These addressing
modes are formally known as address register indirect with index (base
displacement) and PC register indirect with index (base displacement).
The second and third new modes are forms of memory indirect. The
ultimate effective address of these modes is found by referencing the con
tents of a memory location. The value found there is actually an address.
This may seem complicated, but it is actually quite simple. Without these
addressing modes, in order to take an address from memory and use it
to access the contents of the location it points to, we would first have
to place the pointer in an address register and then use a register indi
Comments to this Manuals