Mercurial > hg > index.cgi
comparison docs/manual/x197.html @ 333:507f442dc71e
Add support for 6800 compatibility instructions.
The occasional program uses the 6800 compatibility instructions since they
are actually specified by Motorola in at least some documentation. They
advertised the 6809 as source compatible with the 6800.
This mode is not enabled by default, however. It is my belief that receiving
an error when using a non-6809 instruction is more useful since it is
unlikely that much 6800 source code is being assembled for the 6809 these
days. Nevertheless, the --6809compat option is present for just those
purposes so one does not have to resort to using macros (which would work
equally well in most cases).
author | William Astle <lost@l-w.ca> |
---|---|
date | Tue, 15 Apr 2014 10:57:34 -0600 |
parents | b30091890d62 |
children |
comparison
equal
deleted
inserted
replaced
332:26bfe8d557e2 | 333:507f442dc71e |
---|---|
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 >Source Format</TITLE | 5 >Dialects</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="Dialects" | 16 TITLE="LWASM" |
17 HREF="x190.html"><LINK | 17 HREF="c62.html"><LINK |
18 REL="NEXT" | 18 REL="NEXT" |
19 TITLE="Symbols" | 19 TITLE="Source Format" |
20 HREF="x207.html"></HEAD | 20 HREF="x206.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="x190.html" | 48 HREF="c62.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="x207.html" | 62 HREF="x206.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="AEN197" | 76 NAME="AEN197" |
77 >3.3. Source Format</A | 77 >3.2. Dialects</A |
78 ></H1 | 78 ></H1 |
79 ><P | 79 ><P |
80 >LWASM accepts plain text files in a relatively free form. It can handle | 80 > LWASM supports all documented MC6809 instructions as defined by |
81 lines terminated with CR, LF, CRLF, or LFCR which means it should be able | 81 Motorola. By default, this does not include any MC6800 compatibility |
82 to assemble files on any platform on which it compiles.</P | 82 instructions. As of LWASM 4.11, those compatibility instructions can be |
83 enabled using the <CODE | |
84 CLASS="PARAMETER" | |
85 >--6800compat</CODE | |
86 > option or the | |
87 <CODE | |
88 CLASS="PARAMETER" | |
89 >6800compat</CODE | |
90 > pragma. It also supports all known HD6309 | |
91 instructions. While there is general agreement on the pneumonics for most | |
92 of the 6309 instructions, there is some variance with the block transfer | |
93 instructions. TFM for all four variations seems to have gained the most | |
94 traction and, thus, this is the form that is recommended for LWASM. | |
95 However, it also supports COPY, COPY-, IMP, EXP, TFRP, TFRM, TFRS, and TFRR. | |
96 It further adds COPY+ as a synomym for COPY, IMPLODE for IMP, and EXPAND for | |
97 EXP. </P | |
83 ><P | 98 ><P |
84 >Each line may start with a symbol. If a symbol is present, there must not | 99 >By default, LWASM accepts 6309 instructions. However, using the |
85 be any whitespace preceding it. It is legal for a line to contain nothing | 100 <CODE |
86 but a symbol.</P | 101 CLASS="PARAMETER" |
102 >--6809</CODE | |
103 > parameter, you can cause it to throw errors on | |
104 6309 instructions instead.</P | |
87 ><P | 105 ><P |
88 >The op code is separated from the symbol by whitespace. If there is | 106 >The standard addressing mode specifiers are supported. These are the |
89 no symbol, there must be at least one white space character preceding it. | 107 hash sign ("#") for immediate mode, the less than sign ("<") for forced |
90 If applicable, the operand follows separated by whitespace. Following the | 108 eight bit modes, and the greater than sign (">") for forced sixteen bit modes.</P |
91 opcode and operand is an optional comment.</P | |
92 ><P | 109 ><P |
93 > It is important to note that operands cannot contain any whitespace | 110 >Additionally, LWASM supports using the asterisk ("*") to indicate |
94 except in the case of delimited strings. This is because the first | 111 base page addressing. This should not be used in hand-written source code, |
95 whitespace character will be interpreted as the separator between the | 112 however, because it is non-standard and may or may not be present in future |
96 operand column and the comment. This behaviour is required for approximate | 113 versions of LWASM.</P |
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 | |
116 ></DIV | 114 ></DIV |
117 ><DIV | 115 ><DIV |
118 CLASS="NAVFOOTER" | 116 CLASS="NAVFOOTER" |
119 ><HR | 117 ><HR |
120 ALIGN="LEFT" | 118 ALIGN="LEFT" |
128 ><TD | 126 ><TD |
129 WIDTH="33%" | 127 WIDTH="33%" |
130 ALIGN="left" | 128 ALIGN="left" |
131 VALIGN="top" | 129 VALIGN="top" |
132 ><A | 130 ><A |
133 HREF="x190.html" | 131 HREF="c62.html" |
134 ACCESSKEY="P" | 132 ACCESSKEY="P" |
135 >Prev</A | 133 >Prev</A |
136 ></TD | 134 ></TD |
137 ><TD | 135 ><TD |
138 WIDTH="34%" | 136 WIDTH="34%" |
146 ><TD | 144 ><TD |
147 WIDTH="33%" | 145 WIDTH="33%" |
148 ALIGN="right" | 146 ALIGN="right" |
149 VALIGN="top" | 147 VALIGN="top" |
150 ><A | 148 ><A |
151 HREF="x207.html" | 149 HREF="x206.html" |
152 ACCESSKEY="N" | 150 ACCESSKEY="N" |
153 >Next</A | 151 >Next</A |
154 ></TD | 152 ></TD |
155 ></TR | 153 ></TR |
156 ><TR | 154 ><TR |
157 ><TD | 155 ><TD |
158 WIDTH="33%" | 156 WIDTH="33%" |
159 ALIGN="left" | 157 ALIGN="left" |
160 VALIGN="top" | 158 VALIGN="top" |
161 >Dialects</TD | 159 >LWASM</TD |
162 ><TD | 160 ><TD |
163 WIDTH="34%" | 161 WIDTH="34%" |
164 ALIGN="center" | 162 ALIGN="center" |
165 VALIGN="top" | 163 VALIGN="top" |
166 ><A | 164 ><A |
170 ></TD | 168 ></TD |
171 ><TD | 169 ><TD |
172 WIDTH="33%" | 170 WIDTH="33%" |
173 ALIGN="right" | 171 ALIGN="right" |
174 VALIGN="top" | 172 VALIGN="top" |
175 >Symbols</TD | 173 >Source Format</TD |
176 ></TR | 174 ></TR |
177 ></TABLE | 175 ></TABLE |
178 ></DIV | 176 ></DIV |
179 ></BODY | 177 ></BODY |
180 ></HTML | 178 ></HTML |