Addressing Array Items - Motorola CPU32 Reference Manual

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

included in the address calculation (bd, An, Rn ∗ SCALE). Another variation that can
be derived is (An, Rn ∗ SCALE). In the first case, the array address is the sum of the
contents of a register and a displacement (see Figure 3-5). In the second example,
An contains the address of an array and Rn contains a subscript.
A6 = 1
2
3
4
A6 = 1
2
CPU32
DATA ORGANIZATION AND ADDRESSING CAPABILITIES
REFERENCE MANUAL
SYNTAX: MOVE.W (A5,A6.L*SCALE),(A7)
WHERE:
A5 = ADDRESS OF ARRAY STRUCTURE
A6 = INDEX NUMBER OF ARRAY ITEM
A7 = STACK POINTER
SIMPLE ARRAY
(SCALE = 1)
7
0
RECORD OF 2 WORDS
(SCALE = 4)
15
0
NOTE: Regardless of array structure,
software increments index to
point to next record.
Figure 3-5 Addressing Array Items
RECORD OF 1 WORD
(SCALE = 2)
15
A6 = 1
2
RECORD OF 4 WORDS
(SCALE = 8)
15
A6 = 1
2
0
0
MOTOROLA
3-13

Advertisement

Table of Contents
loading

Table of Contents