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
|
Normal labels are <emphasis>defined</emphasis> by
|
||||||
prefixing a line with the label name and then a colon
|
prefixing a line with the label name and then a colon
|
||||||
(e.g., <literal>label:</literal>). Anonymous labels
|
(e.g., <literal>label:</literal>). Anonymous labels
|
||||||
are defined by prefixing a line with an asterisk
|
are defined by prefixing a line with just a colon or
|
||||||
(e.g., <literal>*</literal>).
|
with an asterisk.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Temporary labels are only reachable from inside the
|
Temporary labels are only reachable from inside the
|
||||||
@@ -103,9 +103,9 @@
|
|||||||
bytes of 16-bit values, respectively.
|
bytes of 16-bit values, respectively.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Use brackets [ ] instead of parentheses ( ) when grouping
|
You may use parentheses ( ), brackets [ ], or curly braces { }
|
||||||
arithmetic operations, as the parentheses are needed for the
|
to group arithmetic expressions. Note that a fully parenthesized
|
||||||
indirect addressing modes.
|
expression will be interpreted as an indirect addressing mode.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Examples:
|
Examples:
|
||||||
|
|||||||
Binary file not shown.
+1
-1
@@ -20,7 +20,7 @@
|
|||||||
<bookinfo>
|
<bookinfo>
|
||||||
<title>Programming with Ophis</title>
|
<title>Programming with Ophis</title>
|
||||||
<author><firstname>Michael</firstname><surname>Martin</surname></author>
|
<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>
|
</bookinfo>
|
||||||
&pre1;
|
&pre1;
|
||||||
<part label="I">
|
<part label="I">
|
||||||
|
|||||||
+3
-1
@@ -87,7 +87,9 @@
|
|||||||
<emphasis>that</emphasis>, enough bug reports and bug fixes had
|
<emphasis>that</emphasis>, enough bug reports and bug fixes had
|
||||||
trickled in to justify a fresh release, and 2.2 was published in
|
trickled in to justify a fresh release, and 2.2 was published in
|
||||||
2024—a lightly polished update that now fit more neatly
|
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>
|
||||||
<para>
|
<para>
|
||||||
In the twenty years since I first started this project, I've
|
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
|
Anonymous labels are a way to handle short-ranged branches
|
||||||
without having to come up with names for the then and else
|
without having to come up with names for the then and else
|
||||||
branches, for brief loops, and other such purposes. To define
|
branches, for brief loops, and other such purposes. To define
|
||||||
an anonymous label, use an asterisk. To refer to an anonymous
|
an anonymous label, use a bare colon or an asterisk. To refer
|
||||||
label, use a series of <literal>+</literal>
|
to an anonymous label, use a series of <literal>+</literal>
|
||||||
or <literal>-</literal> signs. <literal>+</literal> refers to
|
or <literal>-</literal> signs. <literal>+</literal> refers to
|
||||||
the next anonymous label, <literal>++</literal> the label
|
the next anonymous label, <literal>++</literal> the label
|
||||||
after that, etc. Likewise, <literal>-</literal> is the most
|
after that, etc. Likewise, <literal>-</literal> is the most
|
||||||
@@ -74,7 +74,7 @@ _next: .word 0 ; End of program
|
|||||||
jsr $ffd2
|
jsr $ffd2
|
||||||
inx
|
inx
|
||||||
bne -
|
bne -
|
||||||
* rts
|
: rts
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
+3
-4
@@ -100,7 +100,7 @@ _done: rts
|
|||||||
</row>
|
</row>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<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>Byte selection (low, high)</entry></row>
|
||||||
<row><entry><literal>* /</literal></entry><entry>Multiply, divide</entry></row>
|
<row><entry><literal>* /</literal></entry><entry>Multiply, divide</entry></row>
|
||||||
<row><entry><literal>+ -</literal></entry><entry>Add, subtract</entry></row>
|
<row><entry><literal>+ -</literal></entry><entry>Add, subtract</entry></row>
|
||||||
@@ -108,10 +108,9 @@ _done: rts
|
|||||||
</tbody>
|
</tbody>
|
||||||
</tgroup>
|
</tgroup>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note that brackets, not parentheses, are used to group arithmetic
|
Until version 2.3, only brackets were allowed to parenthesize expressions.
|
||||||
operations. Parentheses are reserved for the indirect addressing
|
|
||||||
modes.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
Reference in new issue
Block a user