mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2026-04-27 02:18:07 +00:00
Update documentation for new features
This commit is contained in:
1 parent
6467727778
commit
49fd3e1e6b
6 files changed
+15
-14
No files matched your search
+5
-5
@@ -58,8 +58,8 @@
|
||||
Normal labels are <emphasis>defined</emphasis> by
|
||||
prefixing a line with the label name and then a colon
|
||||
(e.g., <literal>label:</literal>). Anonymous labels
|
||||
are defined by prefixing a line with an asterisk
|
||||
(e.g., <literal>*</literal>).
|
||||
are defined by prefixing a line with just a colon or
|
||||
with an asterisk.
|
||||
</para>
|
||||
<para>
|
||||
Temporary labels are only reachable from inside the
|
||||
@@ -103,9 +103,9 @@
|
||||
bytes of 16-bit values, respectively.
|
||||
</para>
|
||||
<para>
|
||||
Use brackets [ ] instead of parentheses ( ) when grouping
|
||||
arithmetic operations, as the parentheses are needed for the
|
||||
indirect addressing modes.
|
||||
You may use parentheses ( ), brackets [ ], or curly braces { }
|
||||
to group arithmetic expressions. Note that a fully parenthesized
|
||||
expression will be interpreted as an indirect addressing mode.
|
||||
</para>
|
||||
<para>
|
||||
Examples:
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -20,7 +20,7 @@
|
||||
<bookinfo>
|
||||
<title>Programming with Ophis</title>
|
||||
<author><firstname>Michael</firstname><surname>Martin</surname></author>
|
||||
<copyright><year>2006-2024</year><holder>Michael Martin</holder></copyright>
|
||||
<copyright><year>2006-2026</year><holder>Michael Martin</holder></copyright>
|
||||
</bookinfo>
|
||||
&pre1;
|
||||
<part label="I">
|
||||
|
||||
+3
-1
@@ -87,7 +87,9 @@
|
||||
<emphasis>that</emphasis>, enough bug reports and bug fixes had
|
||||
trickled in to justify a fresh release, and 2.2 was published in
|
||||
2024—a lightly polished update that now fit more neatly
|
||||
into the Python toolchains of the 2020s.
|
||||
into the Python toolchains of the 2020s. 2.3, in 2026, fixed up
|
||||
some infelicities and inconveniences that I finally decided I
|
||||
didn't need to put up with any more.
|
||||
</para>
|
||||
<para>
|
||||
In the twenty years since I first started this project, I've
|
||||
|
||||
+3
-3
@@ -57,8 +57,8 @@ _next: .word 0 ; End of program
|
||||
Anonymous labels are a way to handle short-ranged branches
|
||||
without having to come up with names for the then and else
|
||||
branches, for brief loops, and other such purposes. To define
|
||||
an anonymous label, use an asterisk. To refer to an anonymous
|
||||
label, use a series of <literal>+</literal>
|
||||
an anonymous label, use a bare colon or an asterisk. To refer
|
||||
to an anonymous label, use a series of <literal>+</literal>
|
||||
or <literal>-</literal> signs. <literal>+</literal> refers to
|
||||
the next anonymous label, <literal>++</literal> the label
|
||||
after that, etc. Likewise, <literal>-</literal> is the most
|
||||
@@ -74,7 +74,7 @@ _next: .word 0 ; End of program
|
||||
jsr $ffd2
|
||||
inx
|
||||
bne -
|
||||
* rts
|
||||
: rts
|
||||
</programlisting>
|
||||
|
||||
<para>
|
||||
|
||||
+3
-4
@@ -100,7 +100,7 @@ _done: rts
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row><entry><literal>[ ]</literal></entry><entry>Parenthesized expressions</entry></row>
|
||||
<row><entry><literal>{ } [ ] ( )</literal></entry><entry>Parenthesized expressions</entry></row>
|
||||
<row><entry><literal>< ></literal></entry><entry>Byte selection (low, high)</entry></row>
|
||||
<row><entry><literal>* /</literal></entry><entry>Multiply, divide</entry></row>
|
||||
<row><entry><literal>+ -</literal></entry><entry>Add, subtract</entry></row>
|
||||
@@ -108,10 +108,9 @@ _done: rts
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<para>
|
||||
Note that brackets, not parentheses, are used to group arithmetic
|
||||
operations. Parentheses are reserved for the indirect addressing
|
||||
modes.
|
||||
Until version 2.3, only brackets were allowed to parenthesize expressions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
Reference in new issue
Block a user