]> git.sur5r.net Git - cc65/blob - doc/ar65.sgml
Added the io module
[cc65] / doc / ar65.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4
5 <title>ar65 Users Guide
6 <author>Ullrich von Bassewitz, <tt/uz@musoftware.de/
7 <date>
8 <abstract>ar65 is an archiver for object files generated by ca65. It allows
9 to create archives, add or remove modules from archives, and to extract modules
10 from existing archives.
11 </abstract>
12
13 <!-- Table of contents -->
14 <toc>
15
16 <!-- Begin the document -->
17
18 <sect>Overview
19
20 <p>
21 ar65 is a replacement for the libr65 archiver that was part of the cc65 C
22 compiler suite developed by John R. Dunning. libr65 had some problems and
23 the copyright does not permit some things which I wanted to be possible,
24 so I decided to write a completely new assembler/linker/archiver suite
25 for the cc65 compiler. ar65 is part of this suite.
26
27 <sect>Usage
28
29 <p>
30 The archiver is called as follows:
31
32 <tscreen><verb>
33         Usage: ar65 <operation> lib file|module ...
34         Operation is one of:
35                 a       Add modules
36                 d       Delete modules
37                 l       List library contents
38                 x       Extract modules
39                 X       Print the archiver version
40 </verb></tscreen>
41
42 You may add modules to a library using the `a' command. If the library
43 does not exist, it is created (and a warning message is printed which you
44 may ignore if creation of the library was your intention). You may
45 specify any number of modules on the command line following the library.
46
47 If a module with the same name exists in the library, it is replaced by
48 the new one. The archiver prints a warning, if the module in the library
49 has a newer timestamp than the one to add.
50
51 Here's an example:
52
53 <tscreen><verb>
54         ar65 a mysubs.lib sub1.o sub2.o
55 </verb></tscreen>
56
57 This will add two modules to the library `mysubs.lib' creating the
58 library if necessary. If the library contains modules named sub1.o or
59 sub2.o, they are replaced by the new ones.
60
61 Modules names in the library are stored without the path, so, using
62
63 <tscreen><verb>
64         ar65 a mysubs.lib ofiles/sub1.o ofiles/sub2.o
65 </verb></tscreen>
66
67 will add two modules named `sub1.o' and `sub2.o' to the library.
68
69 Deleting modules from a library is done with the `d' command. You may not
70 give a path when naming the modules.
71
72 Example:
73
74 <tscreen><verb>
75         ar65 d mysubs.lib sub1.o
76 </verb></tscreen>
77
78 This will delete the module named `sub1.o' from the library, printing an
79 error if the library does not contain that module.
80
81
82 The `l' command prints a list of all modules in the library. Any module
83 names on the command line are ignored.
84
85 Example:
86
87 <tscreen><verb>
88         ar65 l mysubs.lib
89 </verb></tscreen>
90
91
92 Using the `x' command, you may extract modules from the library. The
93 modules named on the command line are extracted from the library and put
94 into the current directory.
95
96 Note: Because of the indexing done by the archiver, the modules may have
97 a changed binary layout, that is, a binary compare with the old module
98 (before importing it into the library) may yield differences. The
99 extracted modules are accepted by the linker and archiver, however, so
100 this is not a problem.
101
102 Example for extracting a module from the library:
103
104 <tscreen><verb>
105         ar65 x mysubs.lib sub1.o
106 </verb></tscreen>
107
108
109 The `V' command prints the version number of the assembler. If you send
110 any suggestions or bugfixes, please include your version number.
111
112 In addition to these operations, the archiver will check for, and warn
113 about duplicate external symbols in the library, every time when an
114 operation does update the library. This is only a warning, the linker
115 will ignore one of the duplicate symbols (which one is unspecified).
116
117
118 <sect>Bugs/Feedback
119
120 <p>
121 If you have problems using the archiver, if you find any bugs, or if
122 you're doing something interesting with it, I would be glad to hear from
123 you. Feel free to contact me by email (uz@musoftware.de).
124
125
126
127 <sect>Copyright
128
129 <p>
130 ar65 (and all cc65 binutils) are (C) Copyright 1998 Ullrich von Bassewitz.
131 For usage of the binaries and/or sources the following conditions do
132 apply:
133
134 This software is provided 'as-is', without any expressed or implied
135 warranty.  In no event will the authors be held liable for any damages
136 arising from the use of this software.
137
138 Permission is granted to anyone to use this software for any purpose,
139 including commercial applications, and to alter it and redistribute it
140 freely, subject to the following restrictions:
141
142 <enum>
143 <item>  The origin of this software must not be misrepresented; you must not
144         claim that you wrote the original software. If you use this software
145         in a product, an acknowledgment in the product documentation would be
146         appreciated but is not required.
147 <item>  Altered source versions must be plainly marked as such, and must not
148         be misrepresented as being the original software.
149 <item>  This notice may not be removed or altered from any source
150         distribution.
151 </enum>
152
153 </article>
154
155
156