Assign Character Strings to Substitution Symbols
.data
4-39
Assembler Directives
Syntax
.data
Description
The .data directive tells the assembler to begin assembling source code into
the .data section; .data becomes the current section. The .data section is nor-
mally used to contain tables of data or preinitialized variables.
The assembler assumes that .text is the default section. Therefore, at the be-
ginning of an assembly, the assembler assembles code into the .text section
unless you use a section control directive.
For more information about COFF sections, see Chapter 2,
Introduction to Common Object File Format.
Example
In this example, code is assembled into the .data and .text sections.
1 *******************************************
2 ** Reserve space in .data. **
3 *******************************************
4 000000 .data
5 000000 .space 0CCh
6
7 *******************************************
8 ** Assemble into .text. **
9 *******************************************
10 000000 .text
11 0000 INDEX .set 0
12 000000 e800 LD #INDEX, A
13
14 *******************************************
15 ** Assemble into .data. **
16 *******************************************
17 00000c Table: .data
18 00000d ffff .word –1 ; Assemble 16–bit
19 ; constant into .data.
20 00000e 00ff .byte 0FFh ; Assemble 8–bit
21 ; constant into .data.
22
23 *******************************************
24 ** Assemble into .text. **
25 *******************************************
26 000001 .text
27 000001 000c” ADD Table, A
28
29 *******************************************
30 ** Resume assembling into the .data **
31 ** section at address 0Fh. **
32 *******************************************
33 00000f .data
Summary of Contents for TMS320C54x
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......
Page 42: ......
Page 43: ......
Page 44: ......
Page 45: ......
Page 46: ......
Page 47: ......
Page 48: ......
Page 49: ......
Page 50: ......
Page 51: ......
Page 52: ......
Page 53: ......
Page 54: ......
Page 55: ......
Page 56: ......
Page 57: ......
Page 58: ......
Page 59: ......
Page 60: ......
Page 61: ......
Page 62: ......
Page 276: ......
Page 277: ......
Page 278: ......
Page 279: ......
Page 280: ......
Page 281: ......
Page 282: ......
Page 283: ......
Page 284: ......
Page 285: ......
Page 286: ......
Page 287: ......
Page 288: ......
Page 289: ......
Page 290: ......
Page 291: ......
Page 292: ......
Page 293: ......
Page 294: ......
Page 295: ......
Page 296: ......
Page 297: ......
Page 298: ......
Page 299: ......
Page 300: ......
Page 301: ......
Page 302: ......