User manual

ST Assembler-Linker Linker
Doc ID 11392 Rev 4 39/89
Some examples:
Linking together the modules game.obj, scores.obj, key.obj, game1.obj,
game2.obj and game3.obj without using any libraries and generating a .COD file named
game.cod, requires the following command line:
LYN game+scores+keys+game1+game2+game3;
Linking the same modules in the same environment, but generating a .cod file named
prog.cod requires the following command line:
LYN game+scores+keys+game1+game2+game3,prog;
5.3.2 Response files
Response files are text files that replace the command line to generate the arguments
required. Although they can be used on the assembler and linker, it only really makes sense
to use them on the linker.
The command line given with the name of the program to execute (here LYN) can only take
up to 128 characters as its argument. For most programs this is fine, but the linker allows up
to128 modules to be linked in one run; all their names have to be declared to the linker in its
first argument.
This is where response files come in, they allow you to redirect the command line parser
to a file instead of expecting arguments to come from the command line or the keyboard. A
response file is invoked by giving an ‘@ sign and a filename in response to the first argument
you want to come from the response file.
The filename is assumed to have a suffix '.RSP' if none is supplied. Repeating our example
used as earlier, but this time with a response file called game.rsp:
LYN @game.rsp
is all that needs to be typed, and the file game.rsp must contain:
game+scores+keys+
game1+
game2+game3
prog
Which echoes what would have been typed at the keyboard. If the response file ends
prematurely, the remaining arguments are prompted for at the keyboard. In very large
session, the .OBJ files argument will not fit on one line: it can be continued to the next by
ending the last .OBJ file on the first line with a '+'.
Note: When using response files, there must be at least two carriage returns at the end of the file.