
Placing Code Sections in Memory Locations
5-16
5.7
Placing Code Sections in Memory Locations
The assembly source contains several sections that must be placed in ‘C31
memory locations, because the DSK assembler includes several new direc-
tives that control the starting address of the sections. A linker is not needed.
In the following code example, an output section named Mysect is placed be-
ginning at address 000x80 9800. The entry (execution start) point is then de-
fined at the label START. Next, a simple code loop that increments R0 is placed
into the current section.
.start
”Mysect”,0x809800
; Mysect begins at 0x809800
.sect
”Mysect”
; Assemble code into Mysect
.entry
START
; Execution START point
START
LDI
0,R0
; Initialize R0=0
LOOP
ADDI
1,R0
; Increment R0
B
LOOP
; Do it again
To place two sections of code that leave a hole of unused memory, look at the
following code. The first section, Mysect, which starts at location 0x0080 9800,
is followed by a second section, jumpback,
which starts at location
0x0080 9900.
.start
”Mysect”,0x809800
; Mysect begins at 0x809800
.sect
”Mysect”
; Assemble code into Mysect
.entry
START
; Execution START point
START LDI
0,R0
; Initialize
R0=0
LOOP
ADDI
1,R0
; Increment R0
B
JUMP1
;––––––––––––––––––––––––––––––
.start
”jumpback”,0x809900
; jumpback begins at 0x809900
.sect
”jumpback”
; Assemble code into jumpback
JUMP1
ADDI
1,R0
; Increment R0
B
JUMP2
;––––––––––––––––––––––––––––––
.sect
”Mysect”
; Add more code to Mysect
JUMP2
ADDI
1,R0
; Increment R0
B
LOOP
; Finish LOOP
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...