SPRU513Y August 2001 – June 2022 SM320F28335-EP
The following are examples of typical archiver operations:
ar2000 -a function sine.obj cos.obj flt.obj
The archiver responds as follows:
==> new archive 'function.lib'
==> building new archive 'function.lib'
ar2000 -t function
The archiver responds as follows:
SIZE DATE FILE NAME
-------- ------------------------ -----------------
4260 Thu Mar 28 15:38:18 2019 sine.obj
4260 Thu Mar 28 15:38:18 2019 cos.obj
4260 Thu Mar 28 15:38:18 2019 flt.obj
ar2000 -as function atan.obj
The archiver responds as follows:
==> symbol defined: '_sin'
==> symbol defined: '_cos'
==> symbol defined: '_tan'
==> symbol defined: '_atan
==> building archive 'function.lib'
Because this example does not specify an extension for the libname, the archiver adds the files to the library called function.lib. If function.lib does not exist, the archiver creates it. (The -s option tells the archiver to list the global symbols that are defined in the library.)
ar2000 -x macros push.asm
The archiver makes a copy of push.asm and places it in the current directory; it does not remove push.asm from the library. Now you can edit the extracted file. To replace the copy of push.asm in the library with the edited copy, enter:
ar2000 -r macros push.asm
ar2000 -@modules.cmd
The archiver responds as follows:
==> building archive 'modules.lib'
Archiver Command File is the modules.cmd command file. The r command specifies that the filenames given in the command file replace files of the same name in the modules.lib library. The -u option specifies that these files are replaced only when the current file has a more recent revision date than the file that is in the library.
; Command file to replace members of the
; modules library with updated files
; Use r command and u option:
ru
; Specify library name:
modules.lib
; List filenames to be replaced if updated:
align.asm
bss.asm
data.asm
text.asm
sect.asm
clink.asm
copy.asm
double.asm
drnolist.asm
emsg.asm
end.asm