comparison docs/manual/x177.html @ 231:2cc599f1bebf

Added --define to lwasm documentation. Added documentation of the -D/--define command line option for lwasm. It has been present for a long time but has somehow escaped documentation.
author William Astle <lost@l-w.ca>
date Sun, 15 Jul 2012 23:12:09 -0600
parents
children
comparison
equal deleted inserted replaced
230:e09985968e64 231:2cc599f1bebf
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 >Source Format</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="UP"
13 TITLE="LWASM"
14 HREF="c45.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Dialects"
17 HREF="x170.html"><LINK
18 REL="NEXT"
19 TITLE="Symbols"
20 HREF="x187.html"></HEAD
21 ><BODY
22 CLASS="SECTION"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >LW Tool Chain</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="x170.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 >Chapter 3. LWASM</TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="x187.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="SECTION"
73 ><H1
74 CLASS="SECTION"
75 ><A
76 NAME="AEN177"
77 >3.3. Source Format</A
78 ></H1
79 ><P
80 >LWASM accepts plain text files in a relatively free form. It can handle
81 lines terminated with CR, LF, CRLF, or LFCR which means it should be able
82 to assemble files on any platform on which it compiles.</P
83 ><P
84 >Each line may start with a symbol. If a symbol is present, there must not
85 be any whitespace preceding it. It is legal for a line to contain nothing
86 but a symbol.</P
87 ><P
88 >The op code is separated from the symbol by whitespace. If there is
89 no symbol, there must be at least one white space character preceding it.
90 If applicable, the operand follows separated by whitespace. Following the
91 opcode and operand is an optional comment.</P
92 ><P
93 > It is important to note that operands cannot contain any whitespace
94 except in the case of delimited strings. This is because the first
95 whitespace character will be interpreted as the separator between the
96 operand column and the comment. This behaviour is required for approximate
97 source compatibility with other 6x09 assemblers. </P
98 ><P
99 >A comment can also be introduced with a * or a ;. The comment character is
100 optional for end of statement comments. However, if a symbol is the only
101 thing present on the line other than the comment, the comment character is
102 mandatory to prevent the assembler from interpreting the comment as an opcode.</P
103 ><P
104 >For compatibility with the output generated by some C preprocessors, LWASM
105 will also ignore lines that begin with a #. This should not be used as a general
106 comment character, however.</P
107 ><P
108 >The opcode is not treated case sensitively. Neither are register names in
109 the operand fields. Symbols, however, are case sensitive.</P
110 ><P
111 > As of version 2.6, LWASM supports files with line numbers. If line
112 numbers are present, the line must start with a digit. The line number
113 itself must consist only of digits. The line number must then be followed
114 by either the end of the line or exactly one white space character. After
115 that white space character, the lines are interpreted exactly as above. </P
116 ></DIV
117 ><DIV
118 CLASS="NAVFOOTER"
119 ><HR
120 ALIGN="LEFT"
121 WIDTH="100%"><TABLE
122 SUMMARY="Footer navigation table"
123 WIDTH="100%"
124 BORDER="0"
125 CELLPADDING="0"
126 CELLSPACING="0"
127 ><TR
128 ><TD
129 WIDTH="33%"
130 ALIGN="left"
131 VALIGN="top"
132 ><A
133 HREF="x170.html"
134 ACCESSKEY="P"
135 >Prev</A
136 ></TD
137 ><TD
138 WIDTH="34%"
139 ALIGN="center"
140 VALIGN="top"
141 ><A
142 HREF="index.html"
143 ACCESSKEY="H"
144 >Home</A
145 ></TD
146 ><TD
147 WIDTH="33%"
148 ALIGN="right"
149 VALIGN="top"
150 ><A
151 HREF="x187.html"
152 ACCESSKEY="N"
153 >Next</A
154 ></TD
155 ></TR
156 ><TR
157 ><TD
158 WIDTH="33%"
159 ALIGN="left"
160 VALIGN="top"
161 >Dialects</TD
162 ><TD
163 WIDTH="34%"
164 ALIGN="center"
165 VALIGN="top"
166 ><A
167 HREF="c45.html"
168 ACCESSKEY="U"
169 >Up</A
170 ></TD
171 ><TD
172 WIDTH="33%"
173 ALIGN="right"
174 VALIGN="top"
175 >Symbols</TD
176 ></TR
177 ></TABLE
178 ></DIV
179 ></BODY
180 ></HTML
181 >