Texas Instruments TMS320C3x User Manual

Page 167

Advertising
background image

Indirect Addressing

6-14

Example 6–13. Indirect Addressing With Preindex Add and Modify

The address of the operand to fetch is the sum of an auxiliary register (AR

n) and

an index register (IR0 or IR1). After the data is fetched, the auxiliary register is
updated with the generated address.

Operation:

operand address = AR

n + IRm

AR

n = ARn + IRm

Assembler Syntax:

*++ AR

n(IRm)

Modification Field:

01010

if

m = 0

10010

if

m = 1

(+)

0

0

31

24 23

Address

x

x

AR

n

31

IR

m

x

0

31

Index

Operand

24 23

x

Example 6–14. Indirect Addressing With Preindex Subtract and Modify

The address of the operand to fetch is the difference between an auxiliary register
(AR

n) and an index register (IR0 or IR1). The resulting address becomes the new

contents of the auxiliary register.

Operation:

operand address = AR

n – IRm

AR

n = ARn – IRm

Assembler Syntax:

*– – AR

n(IRm)

Modification Field:

01011

if

m = 0

10011

if

m = 1

(–)

0

0

31

24 23

Address

x

x

AR

n

31

IR

m

x

0

31

Index

Operand

24 23

x

Advertising