Mercurial > hg > index.cgi
comparison docs/manual/x227.html @ 394:fc166b3bbae3
Update manual for recent additions.
Document recent feature additions in the manual.
Thanks to Erik G <erik@6809.org> for the text for most of these manual
additions.
author | William Astle <lost@l-w.ca> |
---|---|
date | Wed, 15 Jul 2015 19:54:57 -0600 |
parents | 682524a1f32f |
children |
comparison
equal
deleted
inserted
replaced
393:f2decd9b276d | 394:fc166b3bbae3 |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"> |
2 <HTML | 2 <HTML |
3 ><HEAD | 3 ><HEAD |
4 ><TITLE | 4 ><TITLE |
5 >Symbols</TITLE | 5 >Source Format</TITLE |
6 ><META | 6 ><META |
7 NAME="GENERATOR" | 7 NAME="GENERATOR" |
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK | 8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK |
9 REL="HOME" | 9 REL="HOME" |
10 TITLE="LW Tool Chain" | 10 TITLE="LW Tool Chain" |
11 HREF="index.html"><LINK | 11 HREF="index.html"><LINK |
12 REL="UP" | 12 REL="UP" |
13 TITLE="LWASM" | 13 TITLE="LWASM" |
14 HREF="c62.html"><LINK | 14 HREF="c62.html"><LINK |
15 REL="PREVIOUS" | 15 REL="PREVIOUS" |
16 TITLE="Source Format" | 16 TITLE="Dialects" |
17 HREF="x217.html"><LINK | 17 HREF="x218.html"><LINK |
18 REL="NEXT" | 18 REL="NEXT" |
19 TITLE="Numbers and Expressions" | 19 TITLE="Symbols" |
20 HREF="x232.html"></HEAD | 20 HREF="x237.html"></HEAD |
21 ><BODY | 21 ><BODY |
22 CLASS="SECTION" | 22 CLASS="SECTION" |
23 BGCOLOR="#FFFFFF" | 23 BGCOLOR="#FFFFFF" |
24 TEXT="#000000" | 24 TEXT="#000000" |
25 LINK="#0000FF" | 25 LINK="#0000FF" |
43 ><TD | 43 ><TD |
44 WIDTH="10%" | 44 WIDTH="10%" |
45 ALIGN="left" | 45 ALIGN="left" |
46 VALIGN="bottom" | 46 VALIGN="bottom" |
47 ><A | 47 ><A |
48 HREF="x217.html" | 48 HREF="x218.html" |
49 ACCESSKEY="P" | 49 ACCESSKEY="P" |
50 >Prev</A | 50 >Prev</A |
51 ></TD | 51 ></TD |
52 ><TD | 52 ><TD |
53 WIDTH="80%" | 53 WIDTH="80%" |
57 ><TD | 57 ><TD |
58 WIDTH="10%" | 58 WIDTH="10%" |
59 ALIGN="right" | 59 ALIGN="right" |
60 VALIGN="bottom" | 60 VALIGN="bottom" |
61 ><A | 61 ><A |
62 HREF="x232.html" | 62 HREF="x237.html" |
63 ACCESSKEY="N" | 63 ACCESSKEY="N" |
64 >Next</A | 64 >Next</A |
65 ></TD | 65 ></TD |
66 ></TR | 66 ></TR |
67 ></TABLE | 67 ></TABLE |
72 CLASS="SECTION" | 72 CLASS="SECTION" |
73 ><H1 | 73 ><H1 |
74 CLASS="SECTION" | 74 CLASS="SECTION" |
75 ><A | 75 ><A |
76 NAME="AEN227" | 76 NAME="AEN227" |
77 >3.4. Symbols</A | 77 >3.3. Source Format</A |
78 ></H1 | 78 ></H1 |
79 ><P | 79 ><P |
80 >Symbols have no length restriction. They may contain letters, numbers, dots, | 80 >LWASM accepts plain text files in a relatively free form. It can handle |
81 dollar signs, and underscores. They must start with a letter, dot, or | 81 lines terminated with CR, LF, CRLF, or LFCR which means it should be able |
82 underscore.</P | 82 to assemble files on any platform on which it compiles.</P |
83 ><P | 83 ><P |
84 >LWASM also supports the concept of a local symbol. A local symbol is one | 84 >Each line may start with a symbol. If a symbol is present, there must not |
85 which contains either a "?" or a "@", which can appear anywhere in the symbol. | 85 be any whitespace preceding it. It is legal for a line to contain nothing |
86 The scope of a local symbol is determined by a number of factors. First, | 86 but a symbol.</P |
87 each included file gets its own local symbol scope. A blank line will also | |
88 be considered a local scope barrier. Macros each have their own local symbol | |
89 scope as well (which has a side effect that you cannot use a local symbol | |
90 as an argument to a macro). There are other factors as well. In general, | |
91 a local symbol is restricted to the block of code it is defined within.</P | |
92 ><P | 87 ><P |
93 >By default, unless assembling to the os9 target, a "$" in the symbol will | 88 >The op code is separated from the symbol by whitespace. If there is |
94 also make it local. This can be controlled by the "dollarlocal" and | 89 no symbol, there must be at least one white space character preceding it. |
95 "nodollarlocal" pragmas. In the absence of a pragma to the contrary, for | 90 If applicable, the operand follows separated by whitespace. Following the |
96 the os9 target, a "$" in the symbol will not make it considered local while | 91 opcode and operand is an optional comment.</P |
97 for all other targets it will.</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 | |
98 ></DIV | 116 ></DIV |
99 ><DIV | 117 ><DIV |
100 CLASS="NAVFOOTER" | 118 CLASS="NAVFOOTER" |
101 ><HR | 119 ><HR |
102 ALIGN="LEFT" | 120 ALIGN="LEFT" |
110 ><TD | 128 ><TD |
111 WIDTH="33%" | 129 WIDTH="33%" |
112 ALIGN="left" | 130 ALIGN="left" |
113 VALIGN="top" | 131 VALIGN="top" |
114 ><A | 132 ><A |
115 HREF="x217.html" | 133 HREF="x218.html" |
116 ACCESSKEY="P" | 134 ACCESSKEY="P" |
117 >Prev</A | 135 >Prev</A |
118 ></TD | 136 ></TD |
119 ><TD | 137 ><TD |
120 WIDTH="34%" | 138 WIDTH="34%" |
128 ><TD | 146 ><TD |
129 WIDTH="33%" | 147 WIDTH="33%" |
130 ALIGN="right" | 148 ALIGN="right" |
131 VALIGN="top" | 149 VALIGN="top" |
132 ><A | 150 ><A |
133 HREF="x232.html" | 151 HREF="x237.html" |
134 ACCESSKEY="N" | 152 ACCESSKEY="N" |
135 >Next</A | 153 >Next</A |
136 ></TD | 154 ></TD |
137 ></TR | 155 ></TR |
138 ><TR | 156 ><TR |
139 ><TD | 157 ><TD |
140 WIDTH="33%" | 158 WIDTH="33%" |
141 ALIGN="left" | 159 ALIGN="left" |
142 VALIGN="top" | 160 VALIGN="top" |
143 >Source Format</TD | 161 >Dialects</TD |
144 ><TD | 162 ><TD |
145 WIDTH="34%" | 163 WIDTH="34%" |
146 ALIGN="center" | 164 ALIGN="center" |
147 VALIGN="top" | 165 VALIGN="top" |
148 ><A | 166 ><A |
152 ></TD | 170 ></TD |
153 ><TD | 171 ><TD |
154 WIDTH="33%" | 172 WIDTH="33%" |
155 ALIGN="right" | 173 ALIGN="right" |
156 VALIGN="top" | 174 VALIGN="top" |
157 >Numbers and Expressions</TD | 175 >Symbols</TD |
158 ></TR | 176 ></TR |
159 ></TABLE | 177 ></TABLE |
160 ></DIV | 178 ></DIV |
161 ></BODY | 179 ></BODY |
162 ></HTML | 180 ></HTML |