comparison docs/manual/c62.html @ 324:b30091890d62

Add documentation of the new hex output formats. Thanks to text contributed by Tom LeMense, the manual now includes documentation of the hex formats he contributed. This also includes some updated text on the ORG directive. Only minor editorial changes vary the text from Tom's original.
author William Astle <lost@l-w.ca>
date Tue, 04 Mar 2014 23:10:13 -0700
parents
children 507f442dc71e
comparison
equal deleted inserted replaced
323:ba9a0434b115 324:b30091890d62
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >LWASM</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9 REL="HOME"
10 TITLE="LW Tool Chain"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="Object Files"
14 HREF="x54.html"><LINK
15 REL="NEXT"
16 TITLE="Dialects"
17 HREF="x190.html"></HEAD
18 ><BODY
19 CLASS="CHAPTER"
20 BGCOLOR="#FFFFFF"
21 TEXT="#000000"
22 LINK="#0000FF"
23 VLINK="#840084"
24 ALINK="#0000FF"
25 ><DIV
26 CLASS="NAVHEADER"
27 ><TABLE
28 SUMMARY="Header navigation table"
29 WIDTH="100%"
30 BORDER="0"
31 CELLPADDING="0"
32 CELLSPACING="0"
33 ><TR
34 ><TH
35 COLSPAN="3"
36 ALIGN="center"
37 >LW Tool Chain</TH
38 ></TR
39 ><TR
40 ><TD
41 WIDTH="10%"
42 ALIGN="left"
43 VALIGN="bottom"
44 ><A
45 HREF="x54.html"
46 ACCESSKEY="P"
47 >Prev</A
48 ></TD
49 ><TD
50 WIDTH="80%"
51 ALIGN="center"
52 VALIGN="bottom"
53 ></TD
54 ><TD
55 WIDTH="10%"
56 ALIGN="right"
57 VALIGN="bottom"
58 ><A
59 HREF="x190.html"
60 ACCESSKEY="N"
61 >Next</A
62 ></TD
63 ></TR
64 ></TABLE
65 ><HR
66 ALIGN="LEFT"
67 WIDTH="100%"></DIV
68 ><DIV
69 CLASS="CHAPTER"
70 ><H1
71 ><A
72 NAME="AEN62"
73 ></A
74 >Chapter 3. LWASM</H1
75 ><P
76 >The LWTOOLS assembler is called LWASM. This chapter documents the various
77 features of the assembler. It is not, however, a tutorial on 6x09 assembly
78 language programming.</P
79 ><DIV
80 CLASS="SECTION"
81 ><H1
82 CLASS="SECTION"
83 ><A
84 NAME="AEN65"
85 >3.1. Command Line Options</A
86 ></H1
87 ><P
88 >The binary for LWASM is called "lwasm". Note that the binary is in lower
89 case. lwasm takes the following command line arguments.</P
90 ><P
91 ></P
92 ><DIV
93 CLASS="VARIABLELIST"
94 ><DL
95 ><DT
96 ><CODE
97 CLASS="OPTION"
98 >--6309</CODE
99 >, <CODE
100 CLASS="OPTION"
101 >-3</CODE
102 ></DT
103 ><DD
104 ><P
105 >This will cause the assembler to accept the additional instructions available
106 on the 6309 processor. This is the default mode; this option is provided for
107 completeness and to override preset command arguments.</P
108 ></DD
109 ><DT
110 ><CODE
111 CLASS="OPTION"
112 >--6809</CODE
113 >, <CODE
114 CLASS="OPTION"
115 >-9</CODE
116 ></DT
117 ><DD
118 ><P
119 >This will cause the assembler to reject instructions that are only available
120 on the 6309 processor.</P
121 ></DD
122 ><DT
123 ><CODE
124 CLASS="OPTION"
125 >--decb</CODE
126 >, <CODE
127 CLASS="OPTION"
128 >-b</CODE
129 ></DT
130 ><DD
131 ><P
132 >Select the DECB output format target. Equivalent to <CODE
133 CLASS="OPTION"
134 >--format=decb</CODE
135 >.</P
136 ><P
137 >While this is the default output format currently, it is not safe to rely
138 on that fact. Future versions may have different defaults. It is also trivial
139 to modify the source code to change the default. Thus, it is recommended to specify
140 this option if you need DECB output.</P
141 ></DD
142 ><DT
143 ><CODE
144 CLASS="OPTION"
145 >--format=type</CODE
146 >, <CODE
147 CLASS="OPTION"
148 >-f type</CODE
149 ></DT
150 ><DD
151 ><P
152 >Select the output format. Valid values are <CODE
153 CLASS="OPTION"
154 >obj</CODE
155 > for the
156 object file target, <CODE
157 CLASS="OPTION"
158 >decb</CODE
159 > for the DECB LOADM format,
160 <CODE
161 CLASS="OPTION"
162 >os9</CODE
163 > for creating OS9 modules, <CODE
164 CLASS="OPTION"
165 >raw</CODE
166 > for
167 a raw binary, <CODE
168 CLASS="OPTION"
169 >hex</CODE
170 > for ASCII hexadecminal format,
171 <CODE
172 CLASS="OPTION"
173 >srec</CODE
174 > for Motorola S-Record format, and <CODE
175 CLASS="OPTION"
176 >ihex</CODE
177 >
178 for Intel Hex format.</P
179 ></DD
180 ><DT
181 ><CODE
182 CLASS="OPTION"
183 >--list[=file]</CODE
184 >, <CODE
185 CLASS="OPTION"
186 >-l[file]</CODE
187 ></DT
188 ><DD
189 ><P
190 >Cause LWASM to generate a listing. If <CODE
191 CLASS="OPTION"
192 >file</CODE
193 > is specified,
194 the listing will go to that file. Otherwise it will go to the standard output
195 stream. By default, no listing is generated. Unless <CODE
196 CLASS="OPTION"
197 >--symbols</CODE
198 >
199 is specified, the list will not include the symbol table.</P
200 ></DD
201 ><DT
202 ><CODE
203 CLASS="OPTION"
204 >--symbols</CODE
205 >, <CODE
206 CLASS="OPTION"
207 >-s</CODE
208 ></DT
209 ><DD
210 ><P
211 >Causes LWASM to generate a list of symbols when generating a listing.
212 It has no effect unless a listing is being generated.</P
213 ></DD
214 ><DT
215 ><CODE
216 CLASS="OPTION"
217 >--obj</CODE
218 ></DT
219 ><DD
220 ><P
221 >Select the proprietary object file format as the output target.</P
222 ></DD
223 ><DT
224 ><CODE
225 CLASS="OPTION"
226 >--output=FILE</CODE
227 >, <CODE
228 CLASS="OPTION"
229 >-o FILE</CODE
230 ></DT
231 ><DD
232 ><P
233 >This option specifies the name of the output file. If not specified, the
234 default is <CODE
235 CLASS="OPTION"
236 >a.out</CODE
237 >.</P
238 ></DD
239 ><DT
240 ><CODE
241 CLASS="OPTION"
242 >--pragma=pragma</CODE
243 >, <CODE
244 CLASS="OPTION"
245 >-p pragma</CODE
246 ></DT
247 ><DD
248 ><P
249 >Specify assembler pragmas. Multiple pragmas are separated by commas. The
250 pragmas accepted are the same as for the PRAGMA assembler directive described
251 below.</P
252 ></DD
253 ><DT
254 ><CODE
255 CLASS="OPTION"
256 >--raw</CODE
257 >, <CODE
258 CLASS="OPTION"
259 >-r</CODE
260 ></DT
261 ><DD
262 ><P
263 >Select raw binary as the output target.</P
264 ></DD
265 ><DT
266 ><CODE
267 CLASS="OPTION"
268 >--includedir=path</CODE
269 >, <CODE
270 CLASS="OPTION"
271 >-I path</CODE
272 ></DT
273 ><DD
274 ><P
275 >Add <CODE
276 CLASS="OPTION"
277 >path</CODE
278 > to the end of the include path.</P
279 ></DD
280 ><DT
281 ><CODE
282 CLASS="OPTION"
283 >--define=SYM[=VAL]</CODE
284 >, <CODE
285 CLASS="OPTION"
286 >-D SYM[=VAL]</CODE
287 ></DT
288 ><DD
289 ><P
290 >Pre-defines the symbol SYM as either the specified VAL. If VAL is omitted,
291 the symbol is defined as 1. The symbol will be defined as though it were
292 defined using the SET directive in the assembly source. That means it can
293 be overridden by a SET directive within the source code. Attempting to
294 redefine SYM using EQU will result in a multiply defined symbol error.</P
295 ></DD
296 ><DT
297 ><CODE
298 CLASS="OPTION"
299 >--help</CODE
300 >, <CODE
301 CLASS="OPTION"
302 >-?</CODE
303 ></DT
304 ><DD
305 ><P
306 >Present a help screen describing the command line options.</P
307 ></DD
308 ><DT
309 ><CODE
310 CLASS="OPTION"
311 >--usage</CODE
312 ></DT
313 ><DD
314 ><P
315 >Provide a summary of the command line options.</P
316 ></DD
317 ><DT
318 ><CODE
319 CLASS="OPTION"
320 >--version</CODE
321 >, <CODE
322 CLASS="OPTION"
323 >-V</CODE
324 ></DT
325 ><DD
326 ><P
327 >Display the software version.</P
328 ></DD
329 ><DT
330 ><CODE
331 CLASS="OPTION"
332 >--debug</CODE
333 >, <CODE
334 CLASS="OPTION"
335 >-d</CODE
336 ></DT
337 ><DD
338 ><P
339 >Increase the debugging level. Only really useful to people hacking on the
340 LWASM source code itself.</P
341 ></DD
342 ></DL
343 ></DIV
344 ></DIV
345 ></DIV
346 ><DIV
347 CLASS="NAVFOOTER"
348 ><HR
349 ALIGN="LEFT"
350 WIDTH="100%"><TABLE
351 SUMMARY="Footer navigation table"
352 WIDTH="100%"
353 BORDER="0"
354 CELLPADDING="0"
355 CELLSPACING="0"
356 ><TR
357 ><TD
358 WIDTH="33%"
359 ALIGN="left"
360 VALIGN="top"
361 ><A
362 HREF="x54.html"
363 ACCESSKEY="P"
364 >Prev</A
365 ></TD
366 ><TD
367 WIDTH="34%"
368 ALIGN="center"
369 VALIGN="top"
370 ><A
371 HREF="index.html"
372 ACCESSKEY="H"
373 >Home</A
374 ></TD
375 ><TD
376 WIDTH="33%"
377 ALIGN="right"
378 VALIGN="top"
379 ><A
380 HREF="x190.html"
381 ACCESSKEY="N"
382 >Next</A
383 ></TD
384 ></TR
385 ><TR
386 ><TD
387 WIDTH="33%"
388 ALIGN="left"
389 VALIGN="top"
390 >Object Files</TD
391 ><TD
392 WIDTH="34%"
393 ALIGN="center"
394 VALIGN="top"
395 >&nbsp;</TD
396 ><TD
397 WIDTH="33%"
398 ALIGN="right"
399 VALIGN="top"
400 >Dialects</TD
401 ></TR
402 ></TABLE
403 ></DIV
404 ></BODY
405 ></HTML
406 >