]> git.sur5r.net Git - cc65/blob - doc/ca65html.sgml
Spelling and other small fixes
[cc65] / doc / ca65html.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>ca65html Users Guide
5 <author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
6 <date>2003-10-16
7
8 <abstract>
9 ca65html is an assembler source to HTML converter. It is very useful if you
10 want to publish your assembler sources in the web.
11 </abstract>
12
13 <!-- Table of contents -->
14 <toc>
15
16 <!-- Begin the document -->
17
18 <sect>Overview<p>
19
20 ca65html converts assembler source files written for use with the <tt/<htmlurl
21 url="ca65.html" name="ca65">/ crossassembler into HTML. It is a standalone
22 tool written in Perl, and as such it does not understand the structure of
23 assembler sources in the same depth as ca65 does, so it may fail in very rare
24 cases. In all other cases it generates very nice output.
25
26
27 <sect>Usage<p>
28
29
30 <sect1>Command line option overview<p>
31
32 The HTML converter accepts the following options:
33
34 <tscreen><verb>
35 ---------------------------------------------------------------------------
36 Usage: ca65html [options] file ...
37 Options:
38   --bgcolor c        Use background color c instead of #FFFFFF
39   --colorize         Colorize the output (generates non standard HTML)
40   --commentcolor c   Use color c for comments instead of #B22222
41   --crefs            Generate references to the C source file(s)
42   --ctrlcolor c      Use color c for directives instead of #228B22
43   --cvttabs          Convert tabs to spaces in the output
44   --help             This text
45   --htmldir dir      Specify directory for HTML files
46   --indexcols n      Use n columns on index page (default 6)
47   --indexname file   Use file for the index file instead of index.html
48   --indexpage        Create an index page
49   --indextitle title Use title as the index title instead of Index
50   --keywordcolor c   Use color c for keywords instead of #A020F0
51   --linelabels       Generate a linexxx HTML label for each line
52   --linenumbers      Add line numbers to the output
53   --linkstyle style  Use the given link style
54   --replaceext       Replace source extension instead of appending .html
55   --textcolor c      Use text color c instead of #000000
56   --verbose          Be more verbose
57 ---------------------------------------------------------------------------
58 </verb></tscreen>
59
60
61 <sect1>Command line options in detail<p>
62
63 Here is a description of all the command line options:
64
65 <descrip>
66
67   <tag><tt>--bgcolor c</tt></tag>
68
69   Set the background color. The argument c must be a valid HTML color, usually
70   given as RGB triplet in the form <tt/#rrggbb/, where r, g and b are the
71   respective red, green and blue parts as two digit hex values. The default is
72   <tt/#FFFFFF/ (white). This color is used in the <tt/&lt;body&gt;/ tag of the
73   generated HTML output.
74
75
76   <tag><tt>--colorize</tt></tag>
77
78   Colorize the output. The converter outputs processor instructions, assembler
79   control commands and comments in different colors.
80
81   While this make the output look very nice, it generates invalid HTML,
82   because using colors in a <tt/&lt;pre&gt;/ environment is not allowed.
83   However, most browsers display it well, and it is used by several other
84   tools, so it's up to you.
85
86
87   <tag><tt>--commentcolor c</tt></tag>
88
89   Set the color used for comments. The argument c must be a valid HTML color,
90   usually given as RGB triplet in the form <tt/#rrggbb/, where r, g and b are
91   the respective red, green and blue parts as two digit hex values. The
92   default is <tt/#B22222/ (red).
93
94   Note that this option has no effect if <tt/--colorize/ is not also given.
95
96
97   <tag><tt>--crefs</tt></tag>
98
99   Generate references to the C file, when a <tt/.dbg/ command is found with a
100   file name. The converter assumes that the C source was also converted into
101   HTML (for example by use of <tt/c2html/), has the name <tt/file.c.html/, and
102   lives in the same directory as the assembler file. If the <tt/.dbg/
103   directive specifies a line, a link to the correct line in the C file is
104   generated, using a label in the form <tt/linexxx/, as it is created by
105   <tt/c2html/ by use of the <tt/-n/ option.
106
107
108   <tag><tt>--commentcolor c</tt></tag>
109
110   Set the color used for assembler control commands. The argument c must be a
111   valid HTML color, usually given as RGB triplet in the form <tt/#rrggbb/,
112   where r, g and b are the respective red, green and blue parts as two digit
113   hex values. The default is <tt/#228B22/ (green).
114
115   Note that this option has no effect if <tt/--colorize/ is not also given.
116
117
118   <tag><tt>--cvttabs</tt></tag>
119
120   Convert tabs in the input into spaces in the output, assuming the standard
121   tab width of 8. This is useful if the <tt/--linenumbers/ option is used to
122   retain the indentation.
123
124
125   <tag><tt>--help</tt></tag>
126
127   Print the command line option summary shown above.
128
129
130   <tag><tt>--htmldir dir</tt></tag>
131
132   Specify an output directory for the generated HTML files.
133
134
135   <tag><tt>--indexcols n</tt></tag>
136
137   Use n columns on the index page. This option has no effect if used without
138   <tt/--indexpage/.
139
140
141   <tag><tt>--indexname name</tt></tag>
142
143   Use another index file name instead of <tt/index.html/. This option has no
144   effect if used without <tt/--indexpage/.
145
146
147   <tag><tt>--indexpage</tt></tag>
148
149   Causes the converter to generate an index page listing all label names and
150   exports found in the converted files.
151
152
153   <tag><tt>--indextitle title</tt></tag>
154
155   Use "title" as the title of the index page. This option has no effect if
156   used without <tt/--indexpage/.
157
158
159   <tag><tt>--keywordcolor c</tt></tag>
160
161   Set the color used for processor instructions. The argument c must be a
162   valid HTML color, usually given as RGB triplet in the form <tt/#rrggbb/,
163   where r, g and b are the respective red, green and blue parts as two digit
164   hex values. The default is <tt/#A020F0/ (purple).
165
166   Note that this option has no effect if <tt/--colorize/ is not also given.
167
168   <tag><tt>--linelabels</tt></tag>
169
170   Generate a label for each line using the name <tt/linexxx/ where xxx is the
171   number of the line.
172
173   Note: The converter will not make use of this label. Use this option if you
174   have other HTML pages referencing the converted assembler file.
175
176
177   <tag><tt>--linenumbers</tt></tag>
178
179   Generate line numbers on the left side of the output.
180
181
182   <tag><tt>--linkstyle n</tt></tag>
183
184   Influences the style used when generating links for imports. If n is zero
185   (the default), the converter creates a link to the actual symbol if it is
186   defined somewhere in the input files. If not, it creates a link to the
187   <tt/.import/ statement. If n is one, the converter will always generate a
188   HTML link to <tt/.import/ statement.
189
190
191   <tag><tt>--replaceext</tt></tag>
192
193   Replace the file extension of the input file instead of appending <tt/.html/
194   when generating the output file name.
195
196
197   <tag><tt>--textcolor c</tt></tag>
198
199   Set the color for normal text. The argument c must be a valid HTML color,
200   usually given as RGB triplet in the form <tt/#rrggbb/, where r, g and b are
201   the respective red, green and blue parts as two digit hex values. The
202   default is <tt/#000000/ (black). This color is used in the <tt/&lt;body&gt;/
203   tag of the generated HTML output.
204
205
206   <tag><tt>--verbose</tt></tag>
207
208   Increase the converter verbosity. Without this option, ca65html is quiet
209   when working. If you have a slow machine and lots of files to convert, you
210   may like a little bit more progress information.
211
212 </descrip>
213 <p>
214
215
216 <sect>Peculiarities<p>
217
218 <sect1>Cross links<p>
219
220 Since ca65html is able to generate links between modules, the best way to use
221 it is to supply all modules to it in one run, instead of running each file
222 separately through it.
223
224
225 <sect1>Include files<p>
226
227 For now, ca65html will not read files included with <tt/.include/. Specifying
228 the include files as normal input files on the command line works in many
229 cases.
230
231
232 <sect1>Conversion errors<p>
233
234 Since ca65html does not really parse the input, but does most of its work
235 applying text patterns, it doesn't know anything about scoping and advanced
236 features of the assembler. This means that it may miss a label may choose the
237 wrong color for an item in rare cases. Since it's just a tool for displaying
238 sources in a nice form, I think that's ok. Anyway, if you find a conversion
239 problem, you can send me a short piece of example input code. If possible, I
240 will fix it.
241
242
243 <sect1>Colorization<p>
244
245 While having colors in the output looks really nice, it has two drawbacks:
246
247 <enum>
248
249 <item>The output is not standard compliant HTML, because <tt/&lt;font&gt;/
250 tags are use in a <tt/&lt;pre&gt;/ environment. This works with all browsers
251 I've tested, but it may not work with the one you're using.
252
253 <item>Since lots of <tt/&lt;font&gt;/ tags are created in the output, the size
254 of the output file will literally explode. This seems to be the price, you
255 have to pay for color...
256
257 </enum>
258
259
260 <sect>Bugs/Feedback<p>
261
262 If you have problems using the converter, if you find any bugs, or if you're
263 doing something interesting with the assembler, I would be glad to hear from
264 you. Feel free to contact me by email (<htmlurl url="mailto:uz@cc65.org"
265 name="uz@cc65.org">).
266
267
268
269 <sect>Copyright<p>
270
271 ca65html is (C) Copyright 2000-2003 Ullrich von Bassewitz. For its use the
272 following conditions apply:
273
274 This software is provided 'as-is', without any expressed or implied
275 warranty.  In no event will the authors be held liable for any damages
276 arising from the use of this software.
277
278 Permission is granted to anyone to use this software for any purpose,
279 including commercial applications, and to alter it and redistribute it
280 freely, subject to the following restrictions:
281
282 <enum>
283 <item>  The origin of this software must not be misrepresented; you must not
284         claim that you wrote the original software. If you use this software
285         in a product, an acknowledgment in the product documentation would be
286         appreciated but is not required.
287 <item>  Altered source versions must be plainly marked as such, and must not
288         be misrepresented as being the original software.
289 <item>  This notice may not be removed or altered from any source
290         distribution.
291 </enum>
292
293
294
295 </article>
296
297
298