Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
46
Добавлен:
27.04.2015
Размер:
4.26 Mб
Скачать

Addressing Modes

4.2.2.6 Index by Short Displacement: (SP-xx), (R2+xx)

This addressing mode contains the 6-bit short immediate index within the instruction word. This field is always one-extended to form a negative offset when the SP register is used and is always zero-extended to form a positive offset when the R2 register is used. The type of arithmetic used to add the short displacement to R2 or SP is always linear; modulo arithmetic is not allowed. This addressing mode requires an extra instruction cycle. This reference is classified as an X memory reference. See Figure 4-8.

Indexed by Short Displacement Example: MOVE A1,X:(R2+3)

 

 

 

 

 

Before Execution

 

 

 

 

 

 

 

 

After Execution

 

 

A2

 

 

 

A1

 

 

 

A0

 

 

 

 

A2

 

 

 

A1

 

 

 

A0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

F

 

E D C B

A 9 8 7

 

 

A

 

F

E D C B

A 9 8 7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

 

32 31

 

 

 

 

16

15

 

 

0

 

 

 

35

32

31

 

 

 

16

15

 

 

0

 

 

 

 

 

 

 

 

X Memory

 

 

 

 

 

 

 

 

 

 

 

 

X Memory

 

 

 

 

 

 

 

 

 

15

 

 

0

 

 

 

 

 

 

 

 

 

15

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$7003

 

 

X

X

X

X

 

 

 

 

 

$7003

 

E

D

C

B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$7000

 

 

X

X

X

X

 

 

 

 

 

 

$7000

 

X

X

X

X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R2

 

$7000

 

 

 

R2

 

$7000

 

 

 

 

 

 

 

 

 

 

 

 

 

 

15

0

+

 

 

15

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N

 

$4567

 

 

 

N

 

$4567

 

 

 

 

 

 

 

 

 

 

15

0

 

 

 

 

15

0

 

 

 

 

 

 

 

 

M01

 

$FFFF

 

 

 

M01

 

$FFFF

 

 

 

 

 

 

 

 

 

 

15

0

 

 

 

 

15

0

Short Immediate Value from the Instruction Word

Assembler syntax: X:(Rn+xx), X:(SP-xx) Additional instruction execution cycles: 1

Additional effective address program words: 0

AA0021

Figure 4-8. Address Register Indirect: Indexed by Short Displacement

 

Address Generation Unit

4-15

Address Generation Unit

4.2.2.7 Index by Long Displacement: (Rn+xxxx), (SP+xxxx)

This addressing mode contains the 16-bit long immediate index within the instruction word. This second word is treated as a signed two’s-complement value. The type of arithmetic (linear or modulo) used to add the long displacement to Rn is determined by M01 for R0 and R1 and is always linear for R2, R3, and SP. This addressing mode requires two extra instruction cycles. This addressing mode is available for MOVEC instructions. This reference is classified as an X memory reference. See Figure 4-9.

Indexed by Long Displacement Example: MOVE A1,X:(R0+$10CF)

 

 

 

Before Execution

 

 

 

 

 

 

 

After Execution

 

 

A2

 

 

A1

 

A0

 

 

 

 

A2

 

 

A1

 

A0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

 

F

E D C B

A 9 8 7

 

 

A

 

F

E D C B

A 9 8 7

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32 31

 

16

15

 

0

 

 

 

35

32

31

 

16

15

 

0

 

 

 

 

 

X Memory

 

 

 

 

 

 

 

 

 

 

X Memory

 

 

 

 

 

 

15

 

0

 

 

 

 

 

 

 

15

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$80CF

X

X X

X

 

 

 

 

 

 

$80CF

E

D C

B

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

$7000

X

X X X

 

 

 

$7000

X

X X X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R0

 

$7000

 

 

 

R0

 

$7000

 

 

 

 

 

 

 

 

 

 

 

 

 

15

0

+

 

15

0

 

 

 

 

 

 

 

 

 

N

 

$4567

 

 

 

N

 

$4567

 

 

 

 

 

 

 

 

 

15

0

 

 

15

0

 

 

 

 

 

 

 

 

M01

 

$FFFF

 

 

 

M01

 

$FFFF

 

 

 

 

 

 

 

 

 

15

0

 

 

15

0

Long Immediate Value from the Instruction Word

Assembler syntax: X:(Rn+xxxx), X:(SP+xxxx) Additional instruction execution cycles: 2 Additional effective address program words: 1

AA0022

Figure 4-9. Address Register Indirect: Indexed by Long Displacement

4-16

DSP56800 Family Manual

 

Соседние файлы в папке DSP568xx