Mercurial > hg > index.cgi
diff 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 |
line wrap: on
line diff
--- a/docs/manual/x227.html Tue Jul 14 23:12:24 2015 -0600 +++ b/docs/manual/x227.html Wed Jul 15 19:54:57 2015 -0600 @@ -2,7 +2,7 @@ <HTML ><HEAD ><TITLE ->Symbols</TITLE +>Source Format</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK @@ -13,11 +13,11 @@ TITLE="LWASM" HREF="c62.html"><LINK REL="PREVIOUS" -TITLE="Source Format" -HREF="x217.html"><LINK +TITLE="Dialects" +HREF="x218.html"><LINK REL="NEXT" -TITLE="Numbers and Expressions" -HREF="x232.html"></HEAD +TITLE="Symbols" +HREF="x237.html"></HEAD ><BODY CLASS="SECTION" BGCOLOR="#FFFFFF" @@ -45,7 +45,7 @@ ALIGN="left" VALIGN="bottom" ><A -HREF="x217.html" +HREF="x218.html" ACCESSKEY="P" >Prev</A ></TD @@ -59,7 +59,7 @@ ALIGN="right" VALIGN="bottom" ><A -HREF="x232.html" +HREF="x237.html" ACCESSKEY="N" >Next</A ></TD @@ -74,27 +74,45 @@ CLASS="SECTION" ><A NAME="AEN227" ->3.4. Symbols</A +>3.3. Source Format</A ></H1 ><P ->Symbols have no length restriction. They may contain letters, numbers, dots, -dollar signs, and underscores. They must start with a letter, dot, or -underscore.</P +>LWASM accepts plain text files in a relatively free form. It can handle +lines terminated with CR, LF, CRLF, or LFCR which means it should be able +to assemble files on any platform on which it compiles.</P +><P +>Each line may start with a symbol. If a symbol is present, there must not +be any whitespace preceding it. It is legal for a line to contain nothing +but a symbol.</P +><P +>The op code is separated from the symbol by whitespace. If there is +no symbol, there must be at least one white space character preceding it. +If applicable, the operand follows separated by whitespace. Following the +opcode and operand is an optional comment.</P ><P ->LWASM also supports the concept of a local symbol. A local symbol is one -which contains either a "?" or a "@", which can appear anywhere in the symbol. -The scope of a local symbol is determined by a number of factors. First, -each included file gets its own local symbol scope. A blank line will also -be considered a local scope barrier. Macros each have their own local symbol -scope as well (which has a side effect that you cannot use a local symbol -as an argument to a macro). There are other factors as well. In general, -a local symbol is restricted to the block of code it is defined within.</P +> It is important to note that operands cannot contain any whitespace +except in the case of delimited strings. This is because the first +whitespace character will be interpreted as the separator between the +operand column and the comment. This behaviour is required for approximate +source compatibility with other 6x09 assemblers. </P +><P +>A comment can also be introduced with a * or a ;. The comment character is +optional for end of statement comments. However, if a symbol is the only +thing present on the line other than the comment, the comment character is +mandatory to prevent the assembler from interpreting the comment as an opcode.</P ><P ->By default, unless assembling to the os9 target, a "$" in the symbol will -also make it local. This can be controlled by the "dollarlocal" and -"nodollarlocal" pragmas. In the absence of a pragma to the contrary, for -the os9 target, a "$" in the symbol will not make it considered local while -for all other targets it will.</P +>For compatibility with the output generated by some C preprocessors, LWASM +will also ignore lines that begin with a #. This should not be used as a general +comment character, however.</P +><P +>The opcode is not treated case sensitively. Neither are register names in +the operand fields. Symbols, however, are case sensitive.</P +><P +> As of version 2.6, LWASM supports files with line numbers. If line +numbers are present, the line must start with a digit. The line number +itself must consist only of digits. The line number must then be followed +by either the end of the line or exactly one white space character. After +that white space character, the lines are interpreted exactly as above. </P ></DIV ><DIV CLASS="NAVFOOTER" @@ -112,7 +130,7 @@ ALIGN="left" VALIGN="top" ><A -HREF="x217.html" +HREF="x218.html" ACCESSKEY="P" >Prev</A ></TD @@ -130,7 +148,7 @@ ALIGN="right" VALIGN="top" ><A -HREF="x232.html" +HREF="x237.html" ACCESSKEY="N" >Next</A ></TD @@ -140,7 +158,7 @@ WIDTH="33%" ALIGN="left" VALIGN="top" ->Source Format</TD +>Dialects</TD ><TD WIDTH="34%" ALIGN="center" @@ -154,7 +172,7 @@ WIDTH="33%" ALIGN="right" VALIGN="top" ->Numbers and Expressions</TD +>Symbols</TD ></TR ></TABLE ></DIV