
Creating DSK Assembler Source Files
5-2
5.1
Creating DSK Assembler Source Files
To create a DSK assembler source file, you can use almost any ASCII program
editor. Be careful using word processors; these files contain various formatting
codes and special characters.
DSK assembly language source programs consist of source statements that
can contain assembler directives, assembly language instructions, and com-
ments. Source statement lines can be up to 80 characters per line.
The next several lines show examples of source statements:
C_REG .set ((10100b)<<2)+3 ; Control word
.text
start ldi 2h, IOF ; Pull AIC into reset
ldi 0h, T4 ; Clear R4
ldp SGCR0
sti R4, @SGCR0 ; Reset serial port
ldi @SINIT1, R7 ; Load initialization value 1 into R7
sti R7, @SPCX0 ; Initialize FSX/DX/CLKX control reg.
sti R7, @SPCR0 ; Initialize FSR/DR/CLKR control reg.
ldi @SINIT0, R7 ; Load initialization value 0 into R7
sti R7, @SGCR0 ; Enable RINT and 16–bit transfers
sti R4, @DTX0 ; Transmit 0
sti R4, @TGCR0 ; Reset timer 0
ldi TIMERPER, R7
sti R7, @TPR0 ; Store timer 0 period
Your source statement can contain four ordered fields. The general syntax for
source statements is as follows:
[
label ] [:]
mnemonic
[
operand list ]
[;
comment ]
Follow these guidelines:
-
All statements must begin with a label, a blank, an asterisk, or a semicolon.
-
Labels are optional; if you use them, they must begin in column 1.
-
One or more blanks must separate each field. Note that tab characters are
equivalent to blanks.
-
Comments are optional. Comments that begin in column 1 can begin with
an asterisk or a semicolon (* or ;), but comments that begin in any other
column
must begin with a semicolon.
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...