Specifications

About These Program Examples
B-2
B.1 About These Program Examples
Figure B–1 illustrates the basic process for generating executable COFF files:
1) Use any ASCII editor to create:
- An assembly language program (
test.asm
in the figure)
- A linker command file (
240x.cmd
in the figure) that defines address
ranges according to the architecture of the particular device and
where the various sections of the user code should be located
2) Assemble the program. The command shown under Step 2 in the figure
generates an object file (.obj) and list file (.lst) containing a listing of as-
sembler messages.
3) Use the linker to bring together the information in the object file and the
command file and create an executable file (
test.out
in the figure). The
command shown also generates a map file, which explains how the linker
assigned the individual sections in the memory.
Note:
The procedure here applies to the PC development environment and is giv-
en only as an example.
Figure B–1. Procedure for Generating Executable Files
Step 1
Using any ASCII editor, create source program
test.asm
and command file
240x.cmd
Step 2
Assemble source program
dspa test.asm –l –v2xx –s
Step 3
Run linker
dsplnk
test.obj 240x.cmd –o test.out –m test.map
Output files
test.lst – error listings
test.obj – assembled file
Output files
test.out – executable file
test.map – map file
About These Program Examples