
Symbols
5-11
Using the DSK Assembler
5.4
Symbols
Symbols are used as labels, constants, and substitution symbols. A symbol
name is a string of up to eight alphanumeric characters (A–Z, a–z, 0–9, $, –,
and +); symbols cannot contain embedded blanks. The first character in a
symbol cannot be a number or special character. The symbols you define are
case-sensitive; for example, the assembler recognizes
ABC, Abc, and abc as
three unique symbols.
Labels
Symbols that are used as labels become symbolic addresses that are
associated with locations in the program. A label must be unique. Note that you
should not use register names as labels.
Constants
Symbols can be set to constant values. By using constants, you can equate
meaningful names with constant values. The .set directive enables you to set
constants to symbolic names. Symbolic constants
cannot be redefined. The
following example shows how these directives can be used:
.text
; initialize PC
K
.set
12
; constant definition K=12
BIN
.set
01010101b
; BIN = 055h
max_buf
.set
K*2
; max_buf = K*2 = 24
LDI
K, R0
; loads 12
LDI
–K, R0
; loads –12
LDI
K*2, R0
; loads 24
LDI
max_buf,R0
; loads 24
LDI
!BIN, R0
; loads 0AAh
Predefined symbolic constants
The assembler has several predefined symbols, including the following:
-
$, the dollar sign character, represents the current value of the section pro-
gram counter (SPC).
-
Register symbols, including
AR0–AR7
IF
PC
RS
BK
IOF
R0–R7
SP
DP
IR0
RC
ST
IE
IR1
RE
Summary of Contents for TMS320C3 Series
Page 1: ...TMS320C3x DSP Starter Kit User s Guide...
Page 18: ...1 4...
Page 28: ...2 10...
Page 82: ...5 18...
Page 140: ...Communications Kernel Source Code A 12...
Page 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 146: ...Schematics B 6...
Page 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 148: ...Schematics B 8...
Page 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Page 150: ...Schematics B 10...
Page 154: ...B 14...
Page 160: ...C 6...
Page 166: ...Index 6...