annotate docs/manual/x27.html @ 434:052c5f335a92

Fix bug in like terms collection in expression simplification Like term collection would lose the actual "variable" part of the term if the second term collected happened to have no coefficient. This would cause the expression to take the value of the calculated coefficient which is obviously wrong. Thanks to hider <stego@satx.rr.com> for reporting the bug and providing a proper test case. Observation: this bug has been present since the first pre-release of lwtools 3.0 when the algebraic expression system was introduced. Apparently people tend not to create expressions that trigger the like terms handler. The specific conditions require the symbol to be undefined and the second operand to the addition has to have no coefficient so it's likely a fairly rare scenario. Still, it is somewhat surprising that nobody tripped on it before now.
author William Astle <lost@l-w.ca>
date Mon, 23 Jan 2017 22:58:36 -0700
parents b30091890d62
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
324
b30091890d62 Add documentation of the new hex output formats.
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">
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >DECB Binaries</TITLE
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
9 REL="HOME"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
10 TITLE="LW Tool Chain"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
11 HREF="index.html"><LINK
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
12 REL="UP"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
13 TITLE="Output Formats"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
14 HREF="c21.html"><LINK
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
15 REL="PREVIOUS"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
16 TITLE="Output Formats"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
17 HREF="c21.html"><LINK
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
18 REL="NEXT"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
19 TITLE="ASCII Hexadecimal"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
20 HREF="x32.html"></HEAD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><BODY
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="SECTION"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
24 TEXT="#000000"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
25 LINK="#0000FF"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
26 VLINK="#840084"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
27 ALINK="#0000FF"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ><DIV
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
29 CLASS="NAVHEADER"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
30 ><TABLE
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
31 SUMMARY="Header navigation table"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
32 WIDTH="100%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
33 BORDER="0"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
34 CELLPADDING="0"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
35 CELLSPACING="0"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
36 ><TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><TH
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
38 COLSPAN="3"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ALIGN="center"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LW Tool Chain</TH
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ></TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
42 ><TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
43 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
44 WIDTH="10%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ALIGN="left"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
46 VALIGN="bottom"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
48 HREF="c21.html"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ACCESSKEY="P"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Prev</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
53 WIDTH="80%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
54 ALIGN="center"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
55 VALIGN="bottom"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
56 >Chapter 2. Output Formats</TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
58 WIDTH="10%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ALIGN="right"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
60 VALIGN="bottom"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
61 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
62 HREF="x32.html"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ACCESSKEY="N"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
64 >Next</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ></TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
67 ></TABLE
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
68 ><HR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
69 ALIGN="LEFT"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
70 WIDTH="100%"></DIV
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DIV
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
72 CLASS="SECTION"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><H1
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
74 CLASS="SECTION"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
75 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
76 NAME="AEN27"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
77 >2.2. DECB Binaries</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ></H1
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
79 ><P
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
80 >A DECB binary is compatible with the LOADM command in Disk Extended
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
81 Color Basic on the CoCo. They are also compatible with CLOADM from Extended
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
82 Color Basic. These binaries include the load address of the binary as well
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
83 as encoding an execution address. These binaries may contain multiple loadable
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
84 sections, each of which has its own load address.</P
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
85 ><P
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
86 >Each binary starts with a preamble. Each preamble is five bytes long. The
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
87 first byte is zero. The next two bytes specify the number of bytes to load
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
88 and the last two bytes specify the address to load the bytes at. Then, a
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
89 string of bytes follows. After this string of bytes, there may be another
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
90 preamble or a postamble. A postamble is also five bytes in length. The first
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
91 byte of the postamble is $FF, the next two are zero, and the last two are
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
92 the execution address for the binary.</P
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
93 ><P
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
94 >Both LWASM and LWLINK can output this format.</P
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
95 ></DIV
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
96 ><DIV
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
97 CLASS="NAVFOOTER"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
98 ><HR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
99 ALIGN="LEFT"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
100 WIDTH="100%"><TABLE
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
101 SUMMARY="Footer navigation table"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
102 WIDTH="100%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
103 BORDER="0"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
104 CELLPADDING="0"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
105 CELLSPACING="0"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
106 ><TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
107 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
108 WIDTH="33%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
109 ALIGN="left"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
110 VALIGN="top"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
111 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
112 HREF="c21.html"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
113 ACCESSKEY="P"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
114 >Prev</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
115 ></TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
116 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
117 WIDTH="34%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
118 ALIGN="center"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
119 VALIGN="top"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
120 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
121 HREF="index.html"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
122 ACCESSKEY="H"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
123 >Home</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
124 ></TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
125 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
126 WIDTH="33%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
127 ALIGN="right"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
128 VALIGN="top"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
129 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
130 HREF="x32.html"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
131 ACCESSKEY="N"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
132 >Next</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
133 ></TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
134 ></TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
135 ><TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
136 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
137 WIDTH="33%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
138 ALIGN="left"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
139 VALIGN="top"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
140 >Output Formats</TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
141 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
142 WIDTH="34%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
143 ALIGN="center"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
144 VALIGN="top"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
145 ><A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
146 HREF="c21.html"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
147 ACCESSKEY="U"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
148 >Up</A
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
149 ></TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
150 ><TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
151 WIDTH="33%"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
152 ALIGN="right"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
153 VALIGN="top"
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
154 >ASCII Hexadecimal</TD
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
155 ></TR
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
156 ></TABLE
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
157 ></DIV
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
158 ></BODY
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
159 ></HTML
b30091890d62 Add documentation of the new hex output formats.
William Astle <lost@l-w.ca>
parents:
diff changeset
160 >