
Copy Source File
.copy, .include
6-17
Assembler Directives
Syntax
.copy “
filename”
.include “
filename”
Description
The .copy and .include directives tell the assembler to read source state-
ments from a different file. The assembler:
1) Stops assembling statements in the current source file
2) Assembles the statements in the copied/included file
3) Resumes assembling statements in the main source file, starting with the
statement that follows the .copy or .include directive
The
filename is a required parameter that names a source file. The filename
must be enclosed in double quotes and must follow operating system conven-
tions. You can specify a full pathname (for example, c:\dsktools\file1.asm). If
you do not specify a full pathname, the assembler searches for the file in the
current directory.
The .copy and .include directives can be nested within a file that is copied or
included. the assembler limits this type of nesting to eight levels; the host oper-
ating system may set additional restrictions.
Example
This example shows how the .include directive is used to tell the assembler
to read and assemble source statements from other files, then to resume as-
sembling into the current file.
Source file: (source .asm)
; Filename: source.asm
.space
10h
; Filename: source.asm
.include
“byte.asm”
; Filename: source.asm
; Filename: source.asm
.space
20h
; Filename: source.asm
First copy file: (byte.asm)
; Filename: byte.asm
.byte
’a’, 0ah, 32
; Filename: byte.asm
.include
“word.asm”
; Filename: byte.asm
.byte
11,12,13
; Filename: byte.asm
; Filename: byte.asm
Second copy file: (word.asm)
; Filename: word.asm
.word
oabcdh, 56
; Filename: word.asm
; Filename: word.asm
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...