Examples of indirect addressing – Texas Instruments TMS320C2XX User Manual

Page 151

Advertising
background image

Indirect Addressing Mode

6-15

Addressing Modes

6.3.5

Examples of Indirect Addressing

In Example 6–7, when the ADD instruction is fetched from program memory,
the instruction register is loaded with the value shown.

Example 6–7. No Increment or Decrement

ADD *,8

;Add to the accumulator the content of the
;data-memory address referenced by the
;current auxiliary register. The data
;is left-shifted 8 bits before being added.

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

N = No next AR specified

ARU = No operation on current AR

1

Shift = 8

0

0

0

0

X

X

X

ADD opcode

0

0

1

0

1

0

0

0

Addressing mode = indirect

NAR = don’t cares

In Example 6–8, when the ADD instruction is fetched from program memory,
the instruction register is loaded with the value shown.

Example 6–8. Increment by 1

ADD *+,8,AR4

;Operates as in Example 6–7, but
;in addition, the current auxiliary
;register is incremented by one, and
;AR4 is chosen as the next auxiliary
;register.

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

NAR = 4

N = next AR specified

ARU = increment current AR by 1

1

Shift = 8

0

1

0

0

1

0

0

ADD opcode

0

0

1

0

1

0

0

0

Addressing mode = indirect

Advertising