annotate doc/manual/x139.html @ 285:9010796c6253 2.3 2.3.1

Generated manual for distribution
author lost
date Fri, 24 Apr 2009 22:36:09 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
285
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
2 <HTML
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
3 ><HEAD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
4 ><TITLE
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
5 >Numbers and Expressions</TITLE
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
6 ><META
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
7 NAME="GENERATOR"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
9 REL="HOME"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
10 TITLE="LW Tool Chain"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
11 HREF="index.html"><LINK
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
12 REL="UP"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
13 TITLE="LWASM"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
14 HREF="c35.html"><LINK
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
15 REL="PREVIOUS"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
16 TITLE="Symbols"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
17 HREF="x135.html"><LINK
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
18 REL="NEXT"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
19 TITLE="Assembler Directives"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
20 HREF="x146.html"></HEAD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
21 ><BODY
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
22 CLASS="SECTION"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
24 TEXT="#000000"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
25 LINK="#0000FF"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
26 VLINK="#840084"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
27 ALINK="#0000FF"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
28 ><DIV
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
29 CLASS="NAVHEADER"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
30 ><TABLE
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
31 SUMMARY="Header navigation table"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
32 WIDTH="100%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
33 BORDER="0"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
34 CELLPADDING="0"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
35 CELLSPACING="0"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
36 ><TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
37 ><TH
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
38 COLSPAN="3"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
39 ALIGN="center"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
40 >LW Tool Chain</TH
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
41 ></TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
42 ><TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
43 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
44 WIDTH="10%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
45 ALIGN="left"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
46 VALIGN="bottom"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
47 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
48 HREF="x135.html"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
49 ACCESSKEY="P"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
50 >Prev</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
51 ></TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
52 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
53 WIDTH="80%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
54 ALIGN="center"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
55 VALIGN="bottom"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
56 >Chapter 3. LWASM</TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
57 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
58 WIDTH="10%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
59 ALIGN="right"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
60 VALIGN="bottom"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
61 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
62 HREF="x146.html"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
63 ACCESSKEY="N"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
64 >Next</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
65 ></TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
66 ></TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
67 ></TABLE
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
68 ><HR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
69 ALIGN="LEFT"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
70 WIDTH="100%"></DIV
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
71 ><DIV
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
72 CLASS="SECTION"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
73 ><H1
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
74 CLASS="SECTION"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
75 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
76 NAME="AEN139"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
77 >3.5. Numbers and Expressions</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
78 ></H1
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
79 ><P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
80 >&#13;Numbers can be expressed in binary, octal, decimal, or hexadecimal. Binary
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
81 numbers may be prefixed with a "%" symbol or suffixed with a "b" or "B".
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
82 Octal numbers may be prefixed with "@" or suffixed with "Q", "q", "O", or
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
83 "o". Hexadecimal numbers may be prefixed with "$", "0x" or "0X", or suffixed
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
84 with "H". No prefix or suffix is required for decimal numbers but they can
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
85 be prefixed with "&amp;" if desired. Any constant which begins with a letter
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
86 must be expressed with the correct prefix base identifier or be prefixed
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
87 with a 0. Thus hexadecimal FF would have to be written either 0FFH or $FF.
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
88 Numbers are not case sensitive.&#13;</P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
89 ><P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
90 > A symbol may appear at any point where a number is acceptable. The
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
91 special symbol "*" can be used to represent the starting address of the
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
92 current source line within expressions. </P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
93 ><P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
94 >The ASCII value of a character can be included by prefixing it with a
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
95 single quote ('). The ASCII values of two characters can be included by
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
96 prefixing the characters with a quote (").</P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
97 ><P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
98 >LWASM supports the following basic binary operators: +, -, *, /, and %.
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
99 These represent addition, subtraction, multiplication, division, and modulus.
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
100 It also supports unary negation and unary 1's complement (- and ^ respectively).
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
101 For completeness, a unary positive (+) is supported though it is a no-op.</P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
102 ><P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
103 >Operator precedence follows the usual rules. multiplication, division,
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
104 and modulus take precedence over addition and subtraction. Unary operators
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
105 take precedence over binary operators. To force a specific order of evaluation,
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
106 parentheses can be used in the usual manner.</P
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
107 ></DIV
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
108 ><DIV
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
109 CLASS="NAVFOOTER"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
110 ><HR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
111 ALIGN="LEFT"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
112 WIDTH="100%"><TABLE
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
113 SUMMARY="Footer navigation table"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
114 WIDTH="100%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
115 BORDER="0"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
116 CELLPADDING="0"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
117 CELLSPACING="0"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
118 ><TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
119 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
120 WIDTH="33%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
121 ALIGN="left"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
122 VALIGN="top"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
123 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
124 HREF="x135.html"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
125 ACCESSKEY="P"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
126 >Prev</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
127 ></TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
128 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
129 WIDTH="34%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
130 ALIGN="center"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
131 VALIGN="top"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
132 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
133 HREF="index.html"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
134 ACCESSKEY="H"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
135 >Home</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
136 ></TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
137 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
138 WIDTH="33%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
139 ALIGN="right"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
140 VALIGN="top"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
141 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
142 HREF="x146.html"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
143 ACCESSKEY="N"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
144 >Next</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
145 ></TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
146 ></TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
147 ><TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
148 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
149 WIDTH="33%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
150 ALIGN="left"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
151 VALIGN="top"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
152 >Symbols</TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
153 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
154 WIDTH="34%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
155 ALIGN="center"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
156 VALIGN="top"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
157 ><A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
158 HREF="c35.html"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
159 ACCESSKEY="U"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
160 >Up</A
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
161 ></TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
162 ><TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
163 WIDTH="33%"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
164 ALIGN="right"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
165 VALIGN="top"
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
166 >Assembler Directives</TD
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
167 ></TR
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
168 ></TABLE
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
169 ></DIV
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
170 ></BODY
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
171 ></HTML
9010796c6253 Generated manual for distribution
lost
parents:
diff changeset
172 >