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

Addressing Modes

4.2.3 Immediate Data Modes

The immediate data modes specify the operand directly in a field of the instruction. That is, the operand value to be used is contained within the instruction word itself (or words themselves). There are two types of immediate data modes: immediate data, which uses an extension word to contain the operand, and immediate short data, where the operand is contained within the instruction word. Table 4-6 summarizes these two modes.

Table 4-6.

Addressing Mode—Immediate

 

 

 

 

 

Addressing Mode:

 

Notation in the Instruction

Examples

Immediate

 

Set Summary

 

 

 

 

 

 

 

 

 

 

Immediate short data— 5, 6, 7-bit

 

#xx

#14

(unsigned and signed)

 

 

#<3

 

 

 

 

Immediate data— 16-bit

 

#xxxx

#$369C

(unsigned and signed)

 

 

#>1234

 

 

 

 

 

Address Generation Unit

4-17

Address Generation Unit

4.2.3.1 Immediate Data: #xxxx

This addressing mode requires one word of instruction extension. This additional word contains the 16-bit immediate data used by the instruction. This reference is classified as a program reference. Examples of the use and effects of immediate-data mode are shown in Figure 4-10 on page 4-18.

Immediate into 16-Bit Register Example: MOVE #$A987,B1

 

 

 

Before Execution

 

 

 

 

 

After Execution

 

 

B2

B1

 

B0

 

 

B2

 

B1

 

B0

 

 

 

 

 

 

 

 

 

 

 

B

 

X

X X X X

X X X X

 

B

 

X

A 9 8 7

X X X X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32

31

16

15

0

 

35

32

31

16

15

0

Positive Immediate into 36-Bit Accumulator Example: MOVE #$1234,B

 

 

 

Before Execution

 

 

 

 

 

After Execution

 

 

B2

B1

 

B0

 

 

B2

 

B1

 

B0

 

 

 

 

 

 

 

 

 

 

 

 

 

B

 

X

X X X X

X X X X

 

B

 

0

1

2 3 4

0

0 0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32

31

16

15

0

 

35

32

31

16

15

0

Negative Immediate into 36-Bit Accumulator Example: MOVE #$A987,B

 

 

 

Before Execution

 

 

 

 

 

After Execution

 

 

B2

B1

 

B0

 

 

B2

 

B1

 

B0

 

 

 

 

 

 

 

 

 

 

 

 

B

 

X

X X X X

X X X X

 

B

 

F

A 9 8 7

0

0 0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32

31

16

15

0

 

35

32

31

16

15

0

Assembler syntax: #xxxx

Additional instruction execution cycles: 1

Additional effective address program words: 1

AA0023

Figure 4-10. Special Addressing: Immediate Data

4-18

DSP56800 Family Manual

 

Addressing Modes

Immediate Short into 16-Bit Address Register Example: MOVE #$0027,N

 

Before Execution

 

After Execution

 

 

 

 

 

 

N

 

XXXX

N

 

$0027

 

 

 

 

 

 

15

0

15

0

Immediate Short into 16-Bit Data Register Example: MOVE #$FFC6,X0

 

Before Execution

 

After Execution

 

 

 

 

 

 

X0

 

XXXX

X0

 

$FFC6

 

 

 

 

 

 

15

0

15

0

Immediate Short into 16-Bit Accumulator Register Example: MOVE #$001C,B1

 

 

 

Before Execution

 

 

 

 

 

After Execution

 

 

B2

B1

 

B0

 

 

B2

 

B1

 

B0

 

 

 

 

 

 

 

 

 

 

 

 

B

 

X

X X X X

X X X X

 

B

 

X

0

0 1 C

X X X X

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32

31

16

15

0

 

35

32

31

16

15

0

Positive Immediate Short into 36-Bit Accumulator Example: MOVE #$001C,B

 

 

 

Before Execution

 

 

 

 

 

After Execution

 

 

B2

B1

 

B0

 

 

B2

 

B1

 

B0

 

 

 

 

 

 

 

 

 

 

 

 

 

B

 

X

X X X X

X X X X

 

B

 

0

0

0 1 C

0

0 0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32

31

16

15

0

 

35

32

31

16

15

0

Negative Immediate Short into 36-Bit Accumulator Example: MOVE #$FFC6,B

 

 

 

Before Execution

 

 

 

 

 

After Execution

 

 

B2

B1

 

B0

 

 

B2

 

B1

 

B0

 

 

 

 

 

 

 

 

 

 

 

 

B

 

X

X X X X

X X X X

 

B

 

F

F F C 6

0

0 0 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

35

32

31

16

15

0

 

35

32

31

16

15

0

Assembler syntax: #xx

Additional instruction execution cycles: 0

Additional effective address program words: 0

AA0024

Figure 4-11. Special Addressing: Immediate Short Data

 

Address Generation Unit

4-19

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