
Creating DSK Assembler Source Files
5-5
Using the DSK Assembler
Using the operand field
The operand field is a list of operands that follow the mnemonic field. An oper-
and can be a constant (see Section 5.2, page 5-8), a symbol (see Section 5.4,
page 5-11), or a combination of constants and symbols in an expression. You
must separate operands with commas.
The assembler lets you specify whether to use a constant, or use a symbol as
an immediate value, a direct address or an indirect address. The following
rules apply to the operands of instructions.
-
No prefix — the operand is a well-defined immediate value. The as-
sembler expects a well-defined immediate value, such as a register sym-
bol or a constant. For floating-point operations, use an extended register
(R0–R7). For integer operations, use any register. For example:
Label: ADDI 0x0, R4
This instruction adds the integer value 0 to the extended-precision register
R4.
-
@ prefix — the operand is direct address. If you use the @ sign as a
prefix, the assembler treats the operand as the contents of a 32-bit ad-
dress, specified by @addr. The 16 MSBs of the address are specified by
the DP register; the 16 LSBs are specified by the instruction word. For ex-
ample:
Label: LDP 0x0080
ADDI @0x9800, R0
The first line of this code sets the DP register to 0x0080. The second line
uses the concatenated value of DP and 0x9800 to form an address of
0x0080 9800. The value stored at 0x0080 9800 to is then added the value
stored in R0.
-
* prefix — the operand is a register indirect address. If you use the *
sign as a prefix, the assembler treats the operand as an indirect address;
that is, it uses the operand as an address. For example:
Label: ADDI *AR3, R0
This instruction adds the integer stored in the location pointed to by AR3 to
the value stored in R0.
Table 5–1 lists the various forms that indirect operands may take. The dis-
placement can be specified as a value from 0–255 or as one of the index
registers (IR0 or IR1). It is not necessary to specify the displacement if it is
1, because the assembler assumes a default displacement of 1. For ex-
ample, *++ARn is equivalent to *++ARn(1).
Содержание TMS320C3 Series
Страница 1: ...TMS320C3x DSP Starter Kit User s Guide...
Страница 18: ...1 4...
Страница 28: ...2 10...
Страница 82: ...5 18...
Страница 140: ...Communications Kernel Source Code A 12...
Страница 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 146: ...Schematics B 6...
Страница 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 148: ...Schematics B 8...
Страница 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 150: ...Schematics B 10...
Страница 154: ...B 14...
Страница 160: ...C 6...
Страница 166: ...Index 6...