Mercurial > hg-old > index.cgi
comparison 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 |
comparison
equal
deleted
inserted
replaced
284:a175fa4a0a9a | 285:9010796c6253 |
---|---|
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 >Numbers and Expressions</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="c35.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="Symbols" | |
17 HREF="x135.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="Assembler Directives" | |
20 HREF="x146.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="x135.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="x146.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="AEN139" | |
77 >3.5. Numbers and Expressions</A | |
78 ></H1 | |
79 ><P | |
80 > Numbers can be expressed in binary, octal, decimal, or hexadecimal. Binary | |
81 numbers may be prefixed with a "%" symbol or suffixed with a "b" or "B". | |
82 Octal numbers may be prefixed with "@" or suffixed with "Q", "q", "O", or | |
83 "o". Hexadecimal numbers may be prefixed with "$", "0x" or "0X", or suffixed | |
84 with "H". No prefix or suffix is required for decimal numbers but they can | |
85 be prefixed with "&" if desired. Any constant which begins with a letter | |
86 must be expressed with the correct prefix base identifier or be prefixed | |
87 with a 0. Thus hexadecimal FF would have to be written either 0FFH or $FF. | |
88 Numbers are not case sensitive. </P | |
89 ><P | |
90 > A symbol may appear at any point where a number is acceptable. The | |
91 special symbol "*" can be used to represent the starting address of the | |
92 current source line within expressions. </P | |
93 ><P | |
94 >The ASCII value of a character can be included by prefixing it with a | |
95 single quote ('). The ASCII values of two characters can be included by | |
96 prefixing the characters with a quote (").</P | |
97 ><P | |
98 >LWASM supports the following basic binary operators: +, -, *, /, and %. | |
99 These represent addition, subtraction, multiplication, division, and modulus. | |
100 It also supports unary negation and unary 1's complement (- and ^ respectively). | |
101 For completeness, a unary positive (+) is supported though it is a no-op.</P | |
102 ><P | |
103 >Operator precedence follows the usual rules. multiplication, division, | |
104 and modulus take precedence over addition and subtraction. Unary operators | |
105 take precedence over binary operators. To force a specific order of evaluation, | |
106 parentheses can be used in the usual manner.</P | |
107 ></DIV | |
108 ><DIV | |
109 CLASS="NAVFOOTER" | |
110 ><HR | |
111 ALIGN="LEFT" | |
112 WIDTH="100%"><TABLE | |
113 SUMMARY="Footer navigation table" | |
114 WIDTH="100%" | |
115 BORDER="0" | |
116 CELLPADDING="0" | |
117 CELLSPACING="0" | |
118 ><TR | |
119 ><TD | |
120 WIDTH="33%" | |
121 ALIGN="left" | |
122 VALIGN="top" | |
123 ><A | |
124 HREF="x135.html" | |
125 ACCESSKEY="P" | |
126 >Prev</A | |
127 ></TD | |
128 ><TD | |
129 WIDTH="34%" | |
130 ALIGN="center" | |
131 VALIGN="top" | |
132 ><A | |
133 HREF="index.html" | |
134 ACCESSKEY="H" | |
135 >Home</A | |
136 ></TD | |
137 ><TD | |
138 WIDTH="33%" | |
139 ALIGN="right" | |
140 VALIGN="top" | |
141 ><A | |
142 HREF="x146.html" | |
143 ACCESSKEY="N" | |
144 >Next</A | |
145 ></TD | |
146 ></TR | |
147 ><TR | |
148 ><TD | |
149 WIDTH="33%" | |
150 ALIGN="left" | |
151 VALIGN="top" | |
152 >Symbols</TD | |
153 ><TD | |
154 WIDTH="34%" | |
155 ALIGN="center" | |
156 VALIGN="top" | |
157 ><A | |
158 HREF="c35.html" | |
159 ACCESSKEY="U" | |
160 >Up</A | |
161 ></TD | |
162 ><TD | |
163 WIDTH="33%" | |
164 ALIGN="right" | |
165 VALIGN="top" | |
166 >Assembler Directives</TD | |
167 ></TR | |
168 ></TABLE | |
169 ></DIV | |
170 ></BODY | |
171 ></HTML | |
172 > |