annotate docs/manual/x187.html @ 304:d85d173ba120 ccdev

Checkpoint lwcc development - preprocessor is runnable but nonfunctional The preprocessor is currently runnable but doesn't actually do anything useful. This is just a checkpoint.
author William Astle <lost@l-w.ca>
date Tue, 17 Sep 2013 19:33:41 -0600
parents 2cc599f1bebf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
231
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >Symbols</TITLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
9 REL="HOME"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
10 TITLE="LW Tool Chain"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
11 HREF="index.html"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
12 REL="UP"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
13 TITLE="LWASM"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
14 HREF="c45.html"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
15 REL="PREVIOUS"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
16 TITLE="Source Format"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
17 HREF="x177.html"><LINK
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
18 REL="NEXT"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
19 TITLE="Numbers and Expressions"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
20 HREF="x192.html"></HEAD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><BODY
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="SECTION"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
24 TEXT="#000000"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
25 LINK="#0000FF"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
26 VLINK="#840084"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
27 ALINK="#0000FF"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
29 CLASS="NAVHEADER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
30 ><TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
31 SUMMARY="Header navigation table"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
32 WIDTH="100%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
33 BORDER="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
34 CELLPADDING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
35 CELLSPACING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
36 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><TH
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
38 COLSPAN="3"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LW Tool Chain</TH
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
42 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
43 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
44 WIDTH="10%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ALIGN="left"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
46 VALIGN="bottom"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
48 HREF="x177.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ACCESSKEY="P"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Prev</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
53 WIDTH="80%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
54 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
55 VALIGN="bottom"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
56 >Chapter 3. LWASM</TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
58 WIDTH="10%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ALIGN="right"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
60 VALIGN="bottom"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
61 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
62 HREF="x192.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ACCESSKEY="N"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
64 >Next</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
67 ></TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
68 ><HR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
69 ALIGN="LEFT"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
70 WIDTH="100%"></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
72 CLASS="SECTION"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><H1
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
74 CLASS="SECTION"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
75 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
76 NAME="AEN187"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
77 >3.4. Symbols</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ></H1
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
79 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
80 >Symbols have no length restriction. They may contain letters, numbers, dots,
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
81 dollar signs, and underscores. They must start with a letter, dot, or
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
82 underscore.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
83 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
84 >LWASM also supports the concept of a local symbol. A local symbol is one
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
85 which contains either a "?" or a "@", which can appear anywhere in the symbol.
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
86 The scope of a local symbol is determined by a number of factors. First,
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
87 each included file gets its own local symbol scope. A blank line will also
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
88 be considered a local scope barrier. Macros each have their own local symbol
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
89 scope as well (which has a side effect that you cannot use a local symbol
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
90 as an argument to a macro). There are other factors as well. In general,
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
91 a local symbol is restricted to the block of code it is defined within.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
92 ><P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
93 >By default, unless assembling to the os9 target, a "$" in the symbol will
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
94 also make it local. This can be controlled by the "dollarlocal" and
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
95 "nodollarlocal" pragmas. In the absence of a pragma to the contrary, for
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
96 the os9 target, a "$" in the symbol will not make it considered local while
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
97 for all other targets it will.</P
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
98 ></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
99 ><DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
100 CLASS="NAVFOOTER"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
101 ><HR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
102 ALIGN="LEFT"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
103 WIDTH="100%"><TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
104 SUMMARY="Footer navigation table"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
105 WIDTH="100%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
106 BORDER="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
107 CELLPADDING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
108 CELLSPACING="0"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
109 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
110 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
111 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
112 ALIGN="left"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
113 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
114 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
115 HREF="x177.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
116 ACCESSKEY="P"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
117 >Prev</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
118 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
119 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
120 WIDTH="34%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
121 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
122 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
123 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
124 HREF="index.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
125 ACCESSKEY="H"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
126 >Home</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
127 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
128 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
129 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
130 ALIGN="right"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
131 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
132 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
133 HREF="x192.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
134 ACCESSKEY="N"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
135 >Next</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
136 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
137 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
138 ><TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
139 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
140 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
141 ALIGN="left"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
142 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
143 >Source Format</TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
144 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
145 WIDTH="34%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
146 ALIGN="center"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
147 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
148 ><A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
149 HREF="c45.html"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
150 ACCESSKEY="U"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
151 >Up</A
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
152 ></TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
153 ><TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
154 WIDTH="33%"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
155 ALIGN="right"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
156 VALIGN="top"
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
157 >Numbers and Expressions</TD
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
158 ></TR
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
159 ></TABLE
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
160 ></DIV
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
161 ></BODY
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
162 ></HTML
2cc599f1bebf Added --define to lwasm documentation.
William Astle <lost@l-w.ca>
parents:
diff changeset
163 >