Update webpage for 2.2 release

This commit is contained in:
Michael Martin
2024-07-30 21:04:09 -07:00
parent f01e4c09ae
commit 3468e2fe09
75 changed files with 2225 additions and 1818 deletions

View File

@@ -11,10 +11,10 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="Example: Fibonnacci Numbers"
HREF="x1104.html"><LINK
HREF="x1135.html"><LINK
REL="NEXT"
TITLE="hello2.oph"
HREF="x1119.html"></HEAD
HREF="x1150.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
@@ -42,7 +42,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1104.html"
HREF="x1135.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -56,7 +56,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1119.html"
HREF="x1150.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -69,7 +69,7 @@ WIDTH="100%"></DIV
CLASS="APPENDIX"
><H1
><A
NAME="AEN1112"
NAME="AEN1143"
></A
>Example Programs</H1
><P
@@ -135,7 +135,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1104.html"
HREF="x1135.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -153,7 +153,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1119.html"
HREF="x1150.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD

View File

@@ -11,10 +11,10 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="fibonacci.oph"
HREF="x1163.html"><LINK
HREF="x1194.html"><LINK
REL="NEXT"
TITLE="Basic arguments"
HREF="x1234.html"></HEAD
HREF="x1265.html"></HEAD
><BODY
CLASS="APPENDIX"
BGCOLOR="#FFFFFF"
@@ -42,7 +42,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1163.html"
HREF="x1194.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -56,7 +56,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1234.html"
HREF="x1265.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -77,7 +77,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1169"
NAME="AEN1200"
>Command Modes</A
></H1
><P
@@ -261,7 +261,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1163.html"
HREF="x1194.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -279,7 +279,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1234.html"
HREF="x1265.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD

View File

@@ -37,7 +37,7 @@ NAME="AEN4"
>Michael Martin</H3
><P
CLASS="COPYRIGHT"
>Copyright &copy; 2006-2014 Michael Martin</P
>Copyright &copy; 2006-2024 Michael Martin</P
><HR></DIV
><DIV
CLASS="TOC"
@@ -60,333 +60,343 @@ HREF="f10.html#AEN15"
></DT
><DT
><A
HREF="x30.html"
HREF="x32.html"
>Getting a copy of Ophis</A
></DT
><DT
><A
HREF="x42.html"
HREF="x44.html"
>About the examples</A
></DT
></DL
></DD
><DT
>I. <A
HREF="p51.html"
HREF="p53.html"
>Using the Ophis Assembler</A
></DT
><DD
><DL
><DT
><A
HREF="c56.html"
HREF="c58.html"
>The basics</A
></DT
><DD
><DL
><DT
><A
HREF="c56.html#AEN69"
HREF="c58.html#AEN71"
>A note on numeric notation</A
></DT
><DT
><A
HREF="x72.html"
HREF="x74.html"
>Producing Commodore 64 programs</A
></DT
><DT
><A
HREF="x141.html"
HREF="x156.html"
>Related commands and options</A
></DT
><DT
><A
HREF="x162.html"
HREF="x177.html"
>Writing the actual code</A
></DT
><DT
><A
HREF="x171.html"
HREF="x186.html"
>Assembling the code</A
></DT
></DL
></DD
><DT
><A
HREF="c236.html"
HREF="c251.html"
>Labels and aliases</A
></DT
><DD
><DL
><DT
><A
HREF="c236.html#AEN242"
HREF="c251.html#AEN257"
>Temporary labels</A
></DT
><DT
><A
HREF="x251.html"
HREF="x266.html"
>Anonymous labels</A
></DT
><DT
><A
HREF="x262.html"
HREF="x277.html"
>Aliasing</A
></DT
></DL
></DD
><DT
><A
HREF="c273.html"
HREF="c288.html"
>Headers, Libraries, and Macros</A
></DT
><DD
><DL
><DT
><A
HREF="c273.html#AEN277"
HREF="c288.html#AEN292"
>Header files and libraries</A
></DT
><DT
><A
HREF="x298.html"
HREF="x313.html"
>Macros</A
></DT
><DT
><A
HREF="x328.html"
HREF="x342.html"
>Example code</A
></DT
></DL
></DD
><DT
><A
HREF="c333.html"
HREF="c347.html"
>Character maps</A
></DT
><DT
><A
HREF="c367.html"
HREF="c383.html"
>Local variables and memory segments</A
></DT
><DT
><A
HREF="c409.html"
HREF="c427.html"
>Expressions</A
></DT
><DT
><A
HREF="c460.html"
HREF="c478.html"
>Advanced Memory Segments</A
></DT
><DD
><DL
><DT
><A
HREF="c460.html#AEN465"
HREF="c478.html#AEN483"
>The Problem</A
></DT
><DT
><A
HREF="x471.html"
HREF="x489.html"
>The Solution</A
></DT
></DL
></DD
><DT
><A
HREF="c489.html"
>Platform-Specific Techniques</A
HREF="c507.html"
>Included Platform Support</A
></DT
><DD
><DL
><DT
><A
HREF="c489.html#AEN492"
HREF="c507.html#AEN510"
>The Commodore 64 and VIC-20</A
></DT
><DT
><A
HREF="x606.html"
HREF="x624.html"
>The Nintendo Entertainment System</A
></DT
><DT
><A
HREF="x611.html"
HREF="x632.html"
>The Atari 2600 VCS</A
></DT
><DT
><A
HREF="x640.html"
>Other Atari 8-bits</A
></DT
><DT
><A
HREF="x645.html"
>The Apple II series</A
></DT
></DL
></DD
></DL
></DD
><DT
>II. <A
HREF="p618.html"
HREF="p649.html"
>To HLL and Back</A
></DT
><DD
><DL
><DT
><A
HREF="c623.html"
HREF="c654.html"
>The Second Step</A
></DT
><DD
><DL
><DT
><A
HREF="c623.html#AEN626"
HREF="c654.html#AEN657"
>The problem</A
></DT
><DT
><A
HREF="x635.html"
HREF="x666.html"
>The solution</A
></DT
><DT
><A
HREF="x641.html"
HREF="x672.html"
>Unsigned arithmetic</A
></DT
><DT
><A
HREF="x664.html"
HREF="x695.html"
>16-bit addition and subtraction</A
></DT
><DT
><A
HREF="x674.html"
HREF="x705.html"
>16-bit comparisons</A
></DT
></DL
></DD
><DT
><A
HREF="c680.html"
HREF="c711.html"
>Structured Programming</A
></DT
><DD
><DL
><DT
><A
HREF="c680.html#AEN685"
HREF="c711.html#AEN716"
>Control constructs</A
></DT
><DT
><A
HREF="x734.html"
HREF="x765.html"
>The stack</A
></DT
><DT
><A
HREF="x740.html"
HREF="x771.html"
>Procedures and register saving</A
></DT
><DT
><A
HREF="x758.html"
HREF="x789.html"
>Variables</A
></DT
><DT
><A
HREF="x803.html"
HREF="x834.html"
>Data structures</A
></DT
><DT
><A
HREF="x856.html"
HREF="x887.html"
>A modest example: Insertion sort on linked lists</A
></DT
></DL
></DD
><DT
><A
HREF="c885.html"
HREF="c916.html"
>Pointers and Indirection</A
></DT
><DD
><DL
><DT
><A
HREF="c885.html#AEN890"
HREF="c916.html#AEN921"
>The absolute basics</A
></DT
><DT
><A
HREF="x919.html"
HREF="x950.html"
>Pointer arithmetic</A
></DT
><DT
><A
HREF="x935.html"
HREF="x966.html"
>What about Indexed Indirect?</A
></DT
><DT
><A
HREF="x942.html"
HREF="x973.html"
>Comparison with the other indexed forms</A
></DT
><DT
><A
HREF="x950.html"
HREF="x981.html"
>Conclusion</A
></DT
></DL
></DD
><DT
><A
HREF="c953.html"
HREF="c984.html"
>Functionals</A
></DT
><DD
><DL
><DT
><A
HREF="c953.html#AEN958"
HREF="c984.html#AEN989"
>Function Pointers</A
></DT
><DT
><A
HREF="x973.html"
HREF="x1004.html"
>A quick digression on how subroutines work</A
></DT
><DT
><A
HREF="x992.html"
HREF="x1023.html"
>Dispatch-on-type and Data-Directed Assembler</A
></DT
><DT
><A
HREF="x1008.html"
HREF="x1039.html"
>VTables and Object-Oriented Assembler</A
></DT
><DT
><A
HREF="x1029.html"
HREF="x1060.html"
>A final reminder</A
></DT
></DL
></DD
><DT
><A
HREF="c1037.html"
HREF="c1068.html"
>Call Stacks</A
></DT
><DD
><DL
><DT
><A
HREF="c1037.html#AEN1041"
HREF="c1068.html#AEN1072"
>Recursion</A
></DT
><DT
><A
HREF="x1052.html"
HREF="x1083.html"
>Our Goals</A
></DT
><DT
><A
HREF="x1104.html"
HREF="x1135.html"
>Example: Fibonnacci Numbers</A
></DT
></DL
@@ -395,14 +405,14 @@ HREF="x1104.html"
></DD
><DT
><A
HREF="a1112.html"
HREF="a1143.html"
>Example Programs</A
></DT
><DD
><DL
><DT
><A
HREF="a1112.html#TUTOR1-SRC"
HREF="a1143.html#TUTOR1-SRC"
><TT
CLASS="FILENAME"
>hello1.oph</TT
@@ -410,7 +420,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1119.html"
HREF="x1150.html"
><TT
CLASS="FILENAME"
>hello2.oph</TT
@@ -418,7 +428,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1123.html"
HREF="x1154.html"
><TT
CLASS="FILENAME"
>c64-1.oph</TT
@@ -426,7 +436,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1127.html"
HREF="x1158.html"
><TT
CLASS="FILENAME"
>c64kernal.oph</TT
@@ -434,7 +444,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1131.html"
HREF="x1162.html"
><TT
CLASS="FILENAME"
>hello3.oph</TT
@@ -442,7 +452,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1135.html"
HREF="x1166.html"
><TT
CLASS="FILENAME"
>hello4a.oph</TT
@@ -450,7 +460,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1139.html"
HREF="x1170.html"
><TT
CLASS="FILENAME"
>hello4b.oph</TT
@@ -458,7 +468,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1143.html"
HREF="x1174.html"
><TT
CLASS="FILENAME"
>hello4c.oph</TT
@@ -466,7 +476,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1147.html"
HREF="x1178.html"
><TT
CLASS="FILENAME"
>hello5.oph</TT
@@ -474,7 +484,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1151.html"
HREF="x1182.html"
><TT
CLASS="FILENAME"
>hello6.oph</TT
@@ -482,7 +492,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1155.html"
HREF="x1186.html"
><TT
CLASS="FILENAME"
>hello7.oph</TT
@@ -490,7 +500,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1159.html"
HREF="x1190.html"
><TT
CLASS="FILENAME"
>structuredemo.oph</TT
@@ -498,7 +508,7 @@ CLASS="FILENAME"
></DT
><DT
><A
HREF="x1163.html"
HREF="x1194.html"
><TT
CLASS="FILENAME"
>fibonacci.oph</TT
@@ -508,101 +518,101 @@ CLASS="FILENAME"
></DD
><DT
><A
HREF="a1167.html"
HREF="a1198.html"
>Ophis Command Reference</A
></DT
><DD
><DL
><DT
><A
HREF="a1167.html#AEN1169"
HREF="a1198.html#AEN1200"
>Command Modes</A
></DT
><DT
><A
HREF="x1234.html"
HREF="x1265.html"
>Basic arguments</A
></DT
><DD
><DL
><DT
><A
HREF="x1234.html#AEN1237"
HREF="x1265.html#AEN1268"
>Numeric types</A
></DT
><DT
><A
HREF="x1234.html#AEN1260"
HREF="x1265.html#AEN1291"
>Label types</A
></DT
><DT
><A
HREF="x1234.html#AEN1273"
HREF="x1265.html#AEN1304"
>String types</A
></DT
></DL
></DD
><DT
><A
HREF="x1282.html"
HREF="x1313.html"
>Compound Arguments</A
></DT
><DT
><A
HREF="x1309.html"
HREF="x1340.html"
>Memory Model</A
></DT
><DD
><DL
><DT
><A
HREF="x1309.html#AEN1312"
HREF="x1340.html#AEN1343"
>Basic PC tracking</A
></DT
><DT
><A
HREF="x1309.html#AEN1321"
HREF="x1340.html#AEN1352"
>Basic Segmentation simulation</A
></DT
><DT
><A
HREF="x1309.html#AEN1345"
HREF="x1340.html#AEN1376"
>General Segmentation Simulation</A
></DT
></DL
></DD
><DT
><A
HREF="x1354.html"
HREF="x1385.html"
>Macros</A
></DT
><DD
><DL
><DT
><A
HREF="x1354.html#AEN1358"
HREF="x1385.html#AEN1389"
>Defining Macros</A
></DT
><DT
><A
HREF="x1354.html#AEN1364"
HREF="x1385.html#AEN1395"
>Invoking Macros</A
></DT
><DT
><A
HREF="x1354.html#AEN1372"
HREF="x1385.html#AEN1403"
>Passing Arguments to Macros</A
></DT
><DT
><A
HREF="x1354.html#AEN1382"
HREF="x1385.html#AEN1413"
>Features and Restrictions of the Ophis Macro Model</A
></DT
></DL
></DD
><DT
><A
HREF="x1394.html"
HREF="x1425.html"
>Assembler directives</A
></DT
></DL

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="To HLL and Back"
HREF="p618.html"><LINK
HREF="p649.html"><LINK
REL="PREVIOUS"
TITLE="A final reminder"
HREF="x1029.html"><LINK
HREF="x1060.html"><LINK
REL="NEXT"
TITLE="Our Goals"
HREF="x1052.html"></HEAD
HREF="x1083.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1029.html"
HREF="x1060.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1052.html"
HREF="x1083.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -72,7 +72,7 @@ WIDTH="100%"></DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN1037"
NAME="AEN1068"
></A
>Call Stacks</H1
><P
@@ -82,7 +82,7 @@ NAME="AEN1037"
end up stomping on its previous values, and everything will be
hideously scrambled. Various workarounds for this are covered
in <A
HREF="c680.html"
HREF="c711.html"
>the Chapter called <I
>Structured Programming</I
></A
@@ -92,7 +92,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1041"
NAME="AEN1072"
>Recursion</A
></H1
><P
@@ -127,7 +127,7 @@ CLASS="LITERAL"
</P
><P
> As we saw in <A
HREF="c885.html"
HREF="c916.html"
>the Chapter called <I
>Pointers and Indirection</I
></A
@@ -158,7 +158,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1029.html"
HREF="x1060.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -176,7 +176,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1052.html"
HREF="x1083.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -192,7 +192,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Assembling the code"
HREF="x171.html"><LINK
HREF="x186.html"><LINK
REL="NEXT"
TITLE="Anonymous labels"
HREF="x251.html"></HEAD
HREF="x266.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x171.html"
HREF="x186.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x251.html"
HREF="x266.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -72,7 +72,7 @@ WIDTH="100%"></DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN236"
NAME="AEN251"
></A
>Labels and aliases</H1
><P
@@ -99,7 +99,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN242"
NAME="AEN257"
>Temporary labels</A
></H1
><P
@@ -118,12 +118,12 @@ CLASS="LITERAL"
currently active scope.
</P
><P
> We can thus rewrite our header data using temporary labels, thus
allowing the main program to have a label
named <TT
> We can rewrite our header data using temporary labels, allowing
the main program to have a label named <TT
CLASS="LITERAL"
>next</TT
> if it wants.
>
if it wants.
</P
><TABLE
BORDER="0"
@@ -170,7 +170,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x171.html"
HREF="x186.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -188,7 +188,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x251.html"
HREF="x266.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -204,7 +204,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Aliasing"
HREF="x262.html"><LINK
HREF="x277.html"><LINK
REL="NEXT"
TITLE="Macros"
HREF="x298.html"></HEAD
HREF="x313.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x262.html"
HREF="x277.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x298.html"
HREF="x313.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -90,7 +90,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN277"
NAME="AEN292"
>Header files and libraries</A
></H1
><P
@@ -113,7 +113,8 @@ CLASS="LITERAL"
>.require</TT
>, will include
the file as long as it hasn't been included yet elsewhere. It
is useful for ensuring a library is linked in.
is useful for ensuring a library is present somewhere in the
final code.
</P
><P
> For pre-assembled code or raw binary data,
@@ -158,14 +159,14 @@ CLASS="LITERAL"
> Since there have been no interesting changes to the prelude, and
the KERNAL values are standard, we do not reproduce them here.
(The files in question are <A
HREF="x1123.html"
HREF="x1154.html"
><I
><I
>c64-1.oph</I
></I
></A
> and <A
HREF="x1127.html"
HREF="x1158.html"
><I
><I
>c64kernal.oph</I
@@ -200,7 +201,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x262.html"
HREF="x277.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -218,7 +219,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x298.html"
HREF="x313.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -234,7 +235,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Example code"
HREF="x328.html"><LINK
HREF="x342.html"><LINK
REL="NEXT"
TITLE="Local variables and memory segments"
HREF="c367.html"></HEAD
HREF="c383.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x328.html"
HREF="x342.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c367.html"
HREF="c383.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -93,14 +93,14 @@ CLASS="USERINPUT"
><P
> There actually are better ways of getting a time-delay on the
Commodore 64; we'll deal with those in <A
HREF="c367.html"
HREF="c383.html"
>the Chapter called <I
>Local variables and memory segments</I
></A
>.
As a result, there isn't really a lot to discuss here. The later
tutorials will be building off of <A
HREF="x1135.html"
HREF="x1166.html"
><I
><I
>hello4a.oph</I
@@ -124,13 +124,13 @@ CLASS="LITERAL"
>lower'case</TT
> aliases back
in <A
HREF="c273.html"
HREF="c288.html"
>the Chapter called <I
>Headers, Libraries, and Macros</I
></A
> as part of the
standard <A
HREF="x1127.html"
HREF="x1158.html"
><I
><I
>c64kernal.oph</I
@@ -186,7 +186,7 @@ target10: .byte "Universe", 0</PRE
></TABLE
><P
> The code that does this is in <A
HREF="x1139.html"
HREF="x1170.html"
><I
><I
>hello4b.oph</I
@@ -248,7 +248,7 @@ CLASS="QUOTE"
</P
><P
> The fixed code is in <A
HREF="x1143.html"
HREF="x1174.html"
><I
><I
>hello4c.oph</I
@@ -271,6 +271,16 @@ CLASS="FILENAME"
>petscii.map</TT
>.
</P
><P
> Versions of Ophis prior to 2.2 have a bug where only the first
argument to <TT
CLASS="LITERAL"
>.byte</TT
> would be translated. That's
fine for our example code here, with only one string per line, but
a more text-heavy title that relied on this should confirm their
version before getting too far in.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
@@ -288,7 +298,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x328.html"
HREF="x342.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -306,7 +316,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c367.html"
HREF="c383.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -322,7 +332,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Character maps"
HREF="c333.html"><LINK
HREF="c347.html"><LINK
REL="NEXT"
TITLE="Expressions"
HREF="c409.html"></HEAD
HREF="c427.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c333.html"
HREF="c347.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c409.html"
HREF="c427.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -77,7 +77,7 @@ NAME="CH5-LINK"
>Local variables and memory segments</H1
><P
> As mentioned in <A
HREF="c333.html"
HREF="c347.html"
>the Chapter called <I
>Character maps</I
></A
@@ -246,7 +246,17 @@ CLASS="LITERAL"
CLASS="LITERAL"
>.text</TT
>
segment, but this is nearly always wrong.
segment, but this is nearly always wrong. Remember,
both <TT
CLASS="LITERAL"
>.org</TT
> and <TT
CLASS="LITERAL"
>.space</TT
> only
ever alter the way that Ophis computes labels. They do not output
any bytes, nor do they change where in the output file the bytes
are actually written.
</P
><P
> The final version of <TT
@@ -331,7 +341,7 @@ CLASS="PROGRAMLISTING"
></TABLE
><P
> The final program is available as <A
HREF="x1147.html"
HREF="x1178.html"
><I
><I
>hello5.oph</I
@@ -358,7 +368,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c333.html"
HREF="c347.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -376,7 +386,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c409.html"
HREF="c427.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -392,7 +402,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Local variables and memory segments"
HREF="c367.html"><LINK
HREF="c383.html"><LINK
REL="NEXT"
TITLE="Advanced Memory Segments"
HREF="c460.html"></HEAD
HREF="c478.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c367.html"
HREF="c383.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c460.html"
HREF="c478.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -72,7 +72,7 @@ WIDTH="100%"></DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN409"
NAME="AEN427"
></A
>Expressions</H1
><P
@@ -192,8 +192,8 @@ CLASS="LITERAL"
>cache</TT
> once, but
can use addition to refer to any offset from it.<A
NAME="AEN425"
HREF="#FTN.AEN425"
NAME="AEN443"
HREF="#FTN.AEN443"
><SPAN
CLASS="footnote"
>[1]</SPAN
@@ -207,7 +207,7 @@ CLASS="footnote"
><DIV
CLASS="TABLE"
><A
NAME="AEN429"
NAME="AEN447"
></A
><P
><B
@@ -280,13 +280,13 @@ CLASS="LITERAL"
></DIV
><P
> Note that brackets, not parentheses, are used to group arithmetic
operations. This is because parentheses are used for the indirect
addressing modes, and it makes parsing much easier.
operations. Parentheses are reserved for the indirect addressing
modes.
</P
><P
> The code for this version of the code is
in <A
HREF="x1151.html"
HREF="x1182.html"
><I
><I
>hello6.oph</I
@@ -308,8 +308,8 @@ ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN425"
HREF="c409.html#AEN425"
NAME="FTN.AEN443"
HREF="c427.html#AEN443"
><SPAN
CLASS="footnote"
>[1]</SPAN
@@ -346,7 +346,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c367.html"
HREF="c383.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -364,7 +364,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c460.html"
HREF="c478.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -380,7 +380,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Expressions"
HREF="c409.html"><LINK
HREF="c427.html"><LINK
REL="NEXT"
TITLE="The Solution"
HREF="x471.html"></HEAD
HREF="x489.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c409.html"
HREF="c427.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x471.html"
HREF="x489.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -72,7 +72,7 @@ WIDTH="100%"></DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN460"
NAME="AEN478"
></A
>Advanced Memory Segments</H1
><P
@@ -93,7 +93,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN465"
NAME="AEN483"
>The Problem</A
></H1
><P
@@ -102,7 +102,7 @@ CLASS="LITERAL"
>print'str</TT
> routine
in <A
HREF="x1151.html"
HREF="x1182.html"
><I
><I
>hello6.oph</I
@@ -112,7 +112,7 @@ HREF="x1151.html"
memory locations $10 and $11 directly. We'd prefer to have
symbolic names for them. This reprises our concerns back in
<A
HREF="c367.html"
HREF="c383.html"
>the Chapter called <I
>Local variables and memory segments</I
></A
@@ -140,7 +140,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c409.html"
HREF="c427.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -158,7 +158,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x471.html"
HREF="x489.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -174,7 +174,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -2,7 +2,7 @@
<HTML
><HEAD
><TITLE
>Platform-Specific Techniques</TITLE
>Included Platform Support</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="The Solution"
HREF="x471.html"><LINK
HREF="x489.html"><LINK
REL="NEXT"
TITLE="The Nintendo Entertainment System"
HREF="x606.html"></HEAD
HREF="x624.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x471.html"
HREF="x489.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x606.html"
HREF="x624.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -72,9 +72,9 @@ WIDTH="100%"></DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN489"
NAME="AEN507"
></A
>Platform-Specific Techniques</H1
>Included Platform Support</H1
><P
> Ophis is intended to produce cross-assembled binaries that will
run in a variety of contexts. The expectation is that most users
@@ -89,16 +89,14 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN492"
NAME="AEN510"
>The Commodore 64 and VIC-20</A
></H1
><P
> In a real sense, the Commodore 64 is the "native"
target platform for Ophis. It was the first platform targeted
and it's the one that has received the most additional
support. It's also one where the developer needs to take the
most care about exactly what kind of program they are
writing.
support.
</P
><P
></P
@@ -213,7 +211,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN520"
NAME="AEN538"
>Using LIBBASIC64</A
></H2
><P
@@ -479,7 +477,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x471.html"
HREF="x489.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -497,7 +495,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x606.html"
HREF="x624.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -513,7 +511,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="PREVIOUS"
TITLE="Using the Ophis Assembler"
HREF="p51.html"><LINK
HREF="p53.html"><LINK
REL="NEXT"
TITLE="Producing Commodore 64 programs"
HREF="x72.html"></HEAD
HREF="x74.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x72.html"
HREF="x74.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -110,7 +110,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN69"
NAME="AEN71"
>A note on numeric notation</A
></H1
><P
@@ -136,7 +136,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -154,7 +154,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x72.html"
HREF="x74.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -170,7 +170,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="To HLL and Back"
HREF="p618.html"><LINK
HREF="p649.html"><LINK
REL="PREVIOUS"
TITLE="To HLL and Back"
HREF="p618.html"><LINK
HREF="p649.html"><LINK
REL="NEXT"
TITLE="The solution"
HREF="x635.html"></HEAD
HREF="x666.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x635.html"
HREF="x666.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -84,7 +84,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN626"
NAME="AEN657"
>The problem</A
></H1
><P
@@ -134,7 +134,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -152,7 +152,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x635.html"
HREF="x666.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -168,7 +168,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="To HLL and Back"
HREF="p618.html"><LINK
HREF="p649.html"><LINK
REL="PREVIOUS"
TITLE="16-bit comparisons"
HREF="x674.html"><LINK
HREF="x705.html"><LINK
REL="NEXT"
TITLE="The stack"
HREF="x734.html"></HEAD
HREF="x765.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x674.html"
HREF="x705.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x734.html"
HREF="x765.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -96,7 +96,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN685"
NAME="AEN716"
>Control constructs</A
></H1
><DIV
@@ -104,7 +104,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN687"
NAME="AEN718"
>Branches: <TT
CLASS="LITERAL"
>if x then y else z</TT
@@ -188,7 +188,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN698"
NAME="AEN729"
>Free loops: <TT
CLASS="LITERAL"
>while x do y</TT
@@ -264,7 +264,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN710"
NAME="AEN741"
>Bounded loops: <TT
CLASS="LITERAL"
>for i = x to y do z</TT
@@ -461,7 +461,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x674.html"
HREF="x705.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -479,7 +479,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x734.html"
HREF="x765.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -495,7 +495,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="To HLL and Back"
HREF="p618.html"><LINK
HREF="p649.html"><LINK
REL="PREVIOUS"
TITLE="A modest example: Insertion sort on linked lists"
HREF="x856.html"><LINK
HREF="x887.html"><LINK
REL="NEXT"
TITLE="Pointer arithmetic"
HREF="x919.html"></HEAD
HREF="x950.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x856.html"
HREF="x887.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x919.html"
HREF="x950.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -79,7 +79,7 @@ NAME="HLL3"
> The basics of pointers versus cursors (or, at the 6502 assembler
level, the indirect indexed addressing mode versus the absolute
indexed ones) were covered in <A
HREF="c680.html"
HREF="c711.html"
>the Chapter called <I
>Structured Programming</I
></A
@@ -96,7 +96,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN890"
NAME="AEN921"
>The absolute basics</A
></H1
><P
@@ -121,7 +121,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN895"
NAME="AEN926"
>The simplest example</A
></H2
><P
@@ -241,7 +241,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x856.html"
HREF="x887.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -259,7 +259,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x919.html"
HREF="x950.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -275,7 +275,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="To HLL and Back"
HREF="p618.html"><LINK
HREF="p649.html"><LINK
REL="PREVIOUS"
TITLE="Conclusion"
HREF="x950.html"><LINK
HREF="x981.html"><LINK
REL="NEXT"
TITLE="A quick digression on how subroutines work"
HREF="x973.html"></HEAD
HREF="x1004.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x950.html"
HREF="x981.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x973.html"
HREF="x1004.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -72,7 +72,7 @@ WIDTH="100%"></DIV
CLASS="CHAPTER"
><H1
><A
NAME="AEN953"
NAME="AEN984"
></A
>Functionals</H1
><P
@@ -93,7 +93,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN958"
NAME="AEN989"
>Function Pointers</A
></H1
><P
@@ -169,7 +169,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x950.html"
HREF="x981.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -187,7 +187,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x973.html"
HREF="x1004.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -203,7 +203,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p618.html"
HREF="p649.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -14,7 +14,7 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="NEXT"
TITLE="Getting a copy of Ophis"
HREF="x30.html"></HEAD
HREF="x32.html"></HEAD
><BODY
CLASS="PREFACE"
BGCOLOR="#FFFFFF"
@@ -56,7 +56,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x30.html"
HREF="x32.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -78,7 +78,7 @@ NAME="AEN10"
consoles. Its primary design goals are code readability and output
flexibility - Ophis has successfully been used to create programs
for the Nintendo Entertainment System, the Atari 2600, and various
8-bit Commodore machines.
8-bit Commodore and Apple machines.
</P
><P
> Ophis's syntax is noticably different from the formats
@@ -117,13 +117,13 @@ NAME="AEN15"
cross-assembler for the 6502 chip the C64 used in both.
</P
><P
> The Perl one&#8212;uncreatively
dubbed <SPAN
> The Perl one&#8212;uncreatively dubbed
<SPAN
CLASS="QUOTE"
>"Perl65"</SPAN
>&#8212;was quickly abandoned, but
the Python one saw more work. When it came time to name it, one
of the things I had been hoping to do with the assembler was to
>&#8212;was quickly abandoned, but the
Python one saw more work. When it came time to name it, one of
the things I had been hoping to do with the assembler was to
produce working Apple II programs. <SPAN
CLASS="QUOTE"
>"Ophis"</SPAN
@@ -160,24 +160,47 @@ CLASS="footnote"
</P
><P
> After its release Ophis 2 was picked up by a number of
developers work with actual hardware from the period, including
prototype machines that never saw production. Some of their
contributions have refined the code generators for version 2.1.
developers working with actual hardware from the period,
including prototype machines that never saw production. Some
of their contributions have refined the code generators for
version 2.1.
</P
><P
> This is an updated edition of <I
> At that point, the program was basically done, and very little
changes for about five years. The world, however, moved on, and
Python 2, my implementation language, was deprecated and
rendered obsolete. That didn't change much about the 2.1
release&#8212;Python 2 was still installed on non-Windows
machines by default, and the Windows distribution was as a
bundled .EXE file&#8212;but it threatened the viability of the
program overall. In 2019, then, I converted the source base to
the backwards-incompatible Python 3, in the hopes of
future-proofing the system. Five years after
<I
CLASS="EMPHASIS"
>Programming With
Ophis</I
>, including documentation for all new features
introduced and expanding the examples to include simple
demonstration programs for platforms besides the Commodore
64. It also includes updated versions of the <I
>that</I
>, enough bug reports and bug fixes had
trickled in to justify a fresh release, and 2.2 was published in
2024&#8212;a lightly polished update that now fit more neatly
into the Python toolchains of the 2020s.
</P
><P
> In the twenty years since I first started this project, I've
gained quite a bit more experience with programming the computer
systems of the 1970s and 1980s. I have left this manual largely
as it was in its 2014 edition, including its versions of the
<I
CLASS="EMPHASIS"
>To HLL
and Back</I
> essays I wrote using Ophis and Perl65 as
example languages.
>To HLL and Back</I
> essays I wrote using Ophis
and Perl65 as example languages. I don't think I stand behind my
design decisions back then as firmly as I did when I wrote those
essays, but there's noting <I
CLASS="EMPHASIS"
>wrong</I
> with them
either so I'm happy to leave them as a testament to my younger,
brasher self.
</P
></DIV
></DIV
@@ -207,10 +230,10 @@ VALIGN="TOP"
WIDTH="95%"
><P
>Ironically, cross-platform development
for the Apple II is extremely difficult, and while Ophis has
been very successfully used to develop code for the Commodore
64, Nintendo Entertainment System, and Atari 2600, it has yet to
actually be deployed on any of the Apples which inspired its
for the Apple II is much less straightforward than for the
Commodore 8-bits or ROM-based consoles, and it took many years
after its release before it was actually used to write code
deployed on any of the Apples which inspired its
name.</P
></TD
></TR
@@ -249,7 +272,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x30.html"
HREF="x32.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD

View File

@@ -11,10 +11,10 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="About the examples"
HREF="x42.html"><LINK
HREF="x44.html"><LINK
REL="NEXT"
TITLE="The basics"
HREF="c56.html"></HEAD
HREF="c58.html"></HEAD
><BODY
CLASS="PART"
BGCOLOR="#FFFFFF"
@@ -42,7 +42,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x42.html"
HREF="x44.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -56,7 +56,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -68,7 +68,7 @@ WIDTH="100%"></DIV
><DIV
CLASS="PART"
><A
NAME="AEN51"
NAME="AEN53"
></A
><DIV
CLASS="TITLEPAGE"
@@ -78,7 +78,7 @@ CLASS="TITLE"
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN53"
NAME="AEN55"
></A
><P
> The chapters in Part 1 are a tutorial guiding you through the
@@ -99,43 +99,43 @@ CLASS="TOC"
></DT
><DT
><A
HREF="c56.html"
HREF="c58.html"
>The basics</A
></DT
><DT
><A
HREF="c236.html"
HREF="c251.html"
>Labels and aliases</A
></DT
><DT
><A
HREF="c273.html"
HREF="c288.html"
>Headers, Libraries, and Macros</A
></DT
><DT
><A
HREF="c333.html"
HREF="c347.html"
>Character maps</A
></DT
><DT
><A
HREF="c367.html"
HREF="c383.html"
>Local variables and memory segments</A
></DT
><DT
><A
HREF="c409.html"
HREF="c427.html"
>Expressions</A
></DT
><DT
><A
HREF="c460.html"
HREF="c478.html"
>Advanced Memory Segments</A
></DT
><DT
><A
HREF="c489.html"
>Platform-Specific Techniques</A
HREF="c507.html"
>Included Platform Support</A
></DT
></DL
></DIV
@@ -157,7 +157,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x42.html"
HREF="x44.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -175,7 +175,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD

View File

@@ -10,11 +10,11 @@ REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="The Atari 2600 VCS"
HREF="x611.html"><LINK
TITLE="The Apple II series"
HREF="x645.html"><LINK
REL="NEXT"
TITLE="The Second Step"
HREF="c623.html"></HEAD
HREF="c654.html"></HEAD
><BODY
CLASS="PART"
BGCOLOR="#FFFFFF"
@@ -42,7 +42,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x611.html"
HREF="x645.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -56,7 +56,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -68,7 +68,7 @@ WIDTH="100%"></DIV
><DIV
CLASS="PART"
><A
NAME="AEN618"
NAME="AEN649"
></A
><DIV
CLASS="TITLEPAGE"
@@ -78,7 +78,7 @@ CLASS="TITLE"
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN620"
NAME="AEN651"
></A
><P
> This is a compilation of an essay series I wrote from
@@ -100,27 +100,27 @@ CLASS="TOC"
></DT
><DT
><A
HREF="c623.html"
HREF="c654.html"
>The Second Step</A
></DT
><DT
><A
HREF="c680.html"
HREF="c711.html"
>Structured Programming</A
></DT
><DT
><A
HREF="c885.html"
HREF="c916.html"
>Pointers and Indirection</A
></DT
><DT
><A
HREF="c953.html"
HREF="c984.html"
>Functionals</A
></DT
><DT
><A
HREF="c1037.html"
HREF="c1068.html"
>Call Stacks</A
></DT
></DL
@@ -143,7 +143,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x611.html"
HREF="x645.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -161,7 +161,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -171,7 +171,7 @@ ACCESSKEY="N"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>The Atari 2600 VCS</TD
>The Apple II series</TD
><TD
WIDTH="34%"
ALIGN="center"

215
book/x1004.html Normal file
View File

@@ -0,0 +1,215 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>A quick digression on how subroutines work</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Functionals"
HREF="c984.html"><LINK
REL="PREVIOUS"
TITLE="Functionals"
HREF="c984.html"><LINK
REL="NEXT"
TITLE="Dispatch-on-type and Data-Directed Assembler"
HREF="x1023.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c984.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Functionals</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1023.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1004"
>A quick digression on how subroutines work</A
></H1
><P
> Ordinarily, subroutines are called with <TT
CLASS="LITERAL"
>JSR</TT
> and
finished with <TT
CLASS="LITERAL"
>RTS</TT
>. The <TT
CLASS="LITERAL"
>JSR</TT
>
instruction takes its own address, adds 2 to it, and pushes this
16-bit value on the stack, high byte first, then low byte (so that
the low byte will be popped off first).
</P
><P
> But wait, you may object. All <TT
CLASS="LITERAL"
>JSR</TT
> instructions
are three bytes long. This <SPAN
CLASS="QUOTE"
>"return address"</SPAN
> is in
the middle of the instruction. And you would be quite right;
the <TT
CLASS="LITERAL"
>RTS</TT
> instruction pops off the 16-bit
address, adds one to it, and <I
CLASS="EMPHASIS"
>then</I
> sets the
program counter to that value.
</P
><P
> So it <I
CLASS="EMPHASIS"
>is</I
> possible to set up
a <SPAN
CLASS="QUOTE"
>"<TT
CLASS="LITERAL"
>JSR</TT
> indirect"</SPAN
> kind of operation
by adding two to the indirect jump's address and then pushing that
value onto the stack before making the jump; however, you wouldn't
want to do this. It takes six bytes and trashes your accumulator,
and you can get the same functionality with half the space and
with no register corruption by simply defining the indirect jump
to be a one-instruction routine and <TT
CLASS="LITERAL"
>JSR</TT
>-ing to
it directly. As an added bonus, that way if you have multiple
indirect jumps through the same pointer, you don't need to
duplicate the jump instruction.
</P
><P
> Does this mean that abusing <TT
CLASS="LITERAL"
>JSR</TT
>
and <TT
CLASS="LITERAL"
>RTS</TT
> is a dead-end, though? Not at all...
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c984.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1023.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Functionals</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c984.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Dispatch-on-type and Data-Directed Assembler</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Functionals"
HREF="c953.html"><LINK
HREF="c984.html"><LINK
REL="PREVIOUS"
TITLE="A quick digression on how subroutines work"
HREF="x973.html"><LINK
HREF="x1004.html"><LINK
REL="NEXT"
TITLE="VTables and Object-Oriented Assembler"
HREF="x1008.html"></HEAD
HREF="x1039.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x973.html"
HREF="x1004.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1008.html"
HREF="x1039.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN992"
NAME="AEN1023"
>Dispatch-on-type and Data-Directed Assembler</A
></H1
><P
@@ -198,7 +198,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x973.html"
HREF="x1004.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -216,7 +216,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1008.html"
HREF="x1039.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -232,7 +232,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c953.html"
HREF="c984.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Functionals"
HREF="c953.html"><LINK
HREF="c984.html"><LINK
REL="PREVIOUS"
TITLE="Dispatch-on-type and Data-Directed Assembler"
HREF="x992.html"><LINK
HREF="x1023.html"><LINK
REL="NEXT"
TITLE="A final reminder"
HREF="x1029.html"></HEAD
HREF="x1060.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x992.html"
HREF="x1023.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1029.html"
HREF="x1060.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1008"
NAME="AEN1039"
>VTables and Object-Oriented Assembler</A
></H1
><P
@@ -184,7 +184,7 @@ CLASS="LITERAL"
>invokevirtual</TT
>, probably in some global
argument array somewhere as discussed back in <A
HREF="c680.html"
HREF="c711.html"
>the Chapter called <I
>Structured Programming</I
></A
@@ -207,7 +207,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x992.html"
HREF="x1023.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -225,7 +225,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1029.html"
HREF="x1060.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -241,7 +241,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c953.html"
HREF="c984.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Functionals"
HREF="c953.html"><LINK
HREF="c984.html"><LINK
REL="PREVIOUS"
TITLE="VTables and Object-Oriented Assembler"
HREF="x1008.html"><LINK
HREF="x1039.html"><LINK
REL="NEXT"
TITLE="Call Stacks"
HREF="c1037.html"></HEAD
HREF="c1068.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1008.html"
HREF="x1039.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c1037.html"
HREF="c1068.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1029"
NAME="AEN1060"
>A final reminder</A
></H1
><P
@@ -127,7 +127,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1008.html"
HREF="x1039.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -145,7 +145,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c1037.html"
HREF="c1068.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -161,7 +161,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c953.html"
HREF="c984.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Call Stacks"
HREF="c1037.html"><LINK
HREF="c1068.html"><LINK
REL="PREVIOUS"
TITLE="Call Stacks"
HREF="c1037.html"><LINK
HREF="c1068.html"><LINK
REL="NEXT"
TITLE="Example: Fibonnacci Numbers"
HREF="x1104.html"></HEAD
HREF="x1135.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c1037.html"
HREF="c1068.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1104.html"
HREF="x1135.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1052"
NAME="AEN1083"
>Our Goals</A
></H1
><P
@@ -285,7 +285,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c1037.html"
HREF="c1068.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -303,7 +303,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1104.html"
HREF="x1135.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -319,7 +319,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c1037.html"
HREF="c1068.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -1,219 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Example: Fibonnacci Numbers</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Call Stacks"
HREF="c1037.html"><LINK
REL="PREVIOUS"
TITLE="Our Goals"
HREF="x1052.html"><LINK
REL="NEXT"
TITLE="Example Programs"
HREF="a1112.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1052.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Call Stacks</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="a1112.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1104"
>Example: Fibonnacci Numbers</A
></H1
><P
> About the simplest <SPAN
CLASS="QUOTE"
>"interesting"</SPAN
> recursive function
is the Fibonacci numbers. The function fib(x) is defined as being
1 if x is 0 or 1, and being fib(x-2)+fib(x-1) otherwise.
</P
><P
> Actually expressing it like that directly produces a very
inefficient implementation, but it's a simple demonstration of the
system. Here's code for expressing the fib function:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>.scope
; Uint16 fib (Uint8 x): compute Xth fibonnaci number.
; fib(0) = fib(1) = 1.
; Stack usage: 3.
fib: lda #$03
jsr save'stack
lda fun'vars
cmp #$02
bcc _base
dec fun'args
jsr fib
lda fun'args
sta fun'vars+1
lda fun'args+1
sta fun'vars+2
lda fun'vars
sec
sbc #$02
sta fun'args
jsr fib
clc
lda fun'args
adc fun'vars+1
sta fun'args
lda fun'args+1
adc fun'vars+2
sta fun'args+1
jmp _done
_base: ldy #$01
sty fun'args
dey
sty fun'args+1
_done: lda #$03
jsr restore'stack
rts
.scend</PRE
></TD
></TR
></TABLE
><P
> The full application, which deals with interfacing with CBM BASIC
and handles console I/O and such, is in <A
HREF="x1163.html"
><I
><I
>fibonacci.oph</I
></I
></A
>.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1052.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="a1112.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Our Goals</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c1037.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Example Programs</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -2,7 +2,7 @@
<HTML
><HEAD
><TITLE
>hello4a.oph</TITLE
>Example: Fibonnacci Numbers</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
@@ -10,14 +10,14 @@ REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
TITLE="Call Stacks"
HREF="c1068.html"><LINK
REL="PREVIOUS"
TITLE="hello3.oph"
HREF="x1131.html"><LINK
TITLE="Our Goals"
HREF="x1083.html"><LINK
REL="NEXT"
TITLE="hello4b.oph"
HREF="x1139.html"></HEAD
TITLE="Example Programs"
HREF="a1143.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1131.html"
HREF="x1083.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -53,13 +53,13 @@ ACCESSKEY="P"
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Example Programs</TD
>Call Stacks</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1139.html"
HREF="a1143.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,12 +73,22 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="TUTOR4A-SRC"
><TT
CLASS="FILENAME"
>hello4a.oph</TT
></A
NAME="AEN1135"
>Example: Fibonnacci Numbers</A
></H1
><P
> About the simplest <SPAN
CLASS="QUOTE"
>"interesting"</SPAN
> recursive function
is the Fibonacci numbers. The function fib(x) is defined as being
1 if x is 0 or 1, and being fib(x-2)+fib(x-1) otherwise.
</P
><P
> Actually expressing it like that directly produces a very
inefficient implementation, but it's a simple demonstration of the
system. Here's code for expressing the fib function:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
@@ -87,76 +97,60 @@ WIDTH="100%"
><TD
><PRE
CLASS="PROGRAMLISTING"
>.include "c64-1.oph"
.outfile "hello.prg"
>.scope
; Uint16 fib (Uint8 x): compute Xth fibonnaci number.
; fib(0) = fib(1) = 1.
; Stack usage: 3.
.macro print
ldx #0
_loop: lda _1, x
beq _done
jsr chrout
inx
bne _loop
_done:
.macend
fib: lda #$03
jsr save'stack
lda fun'vars
cmp #$02
bcc _base
.macro greet
lda #30
jsr delay
`print hello1
`print _1
`print hello2
.macend
dec fun'args
jsr fib
lda fun'args
sta fun'vars+1
lda fun'args+1
sta fun'vars+2
lda fun'vars
sec
sbc #$02
sta fun'args
jsr fib
clc
lda fun'args
adc fun'vars+1
sta fun'args
lda fun'args+1
adc fun'vars+2
sta fun'args+1
jmp _done
lda #147
jsr chrout
`greet target1
`greet target2
`greet target3
`greet target4
`greet target5
`greet target6
`greet target7
`greet target8
`greet target9
`greet target10
_base: ldy #$01
sty fun'args
dey
sty fun'args+1
_done: lda #$03
jsr restore'stack
rts
hello1: .byte "HELLO, ",0
hello2: .byte "!", 13, 0
target1: .byte "PROGRAMMER", 0
target2: .byte "ROOM", 0
target3: .byte "BUILDING", 0
target4: .byte "NEIGHBORHOOD", 0
target5: .byte "CITY", 0
target6: .byte "NATION", 0
target7: .byte "WORLD", 0
target8: .byte "SOLAR SYSTEM", 0
target9: .byte "GALAXY", 0
target10: .byte "UNIVERSE", 0
; DELAY routine. Executes 2,560*(A) NOP statements.
delay: tax
ldy #00
* nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
iny
bne -
dex
bne -
rts</PRE
.scend</PRE
></TD
></TR
></TABLE
><P
> The full application, which deals with interfacing with CBM BASIC
and handles console I/O and such, is in <A
HREF="x1194.html"
><I
><I
>fibonacci.oph</I
></I
></A
>.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
@@ -174,7 +168,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1131.html"
HREF="x1083.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -192,7 +186,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1139.html"
HREF="a1143.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -202,16 +196,13 @@ ACCESSKEY="N"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><TT
CLASS="FILENAME"
>hello3.oph</TT
></TD
>Our Goals</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="c1068.html"
ACCESSKEY="U"
>Up</A
></TD
@@ -219,10 +210,7 @@ ACCESSKEY="U"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><TT
CLASS="FILENAME"
>hello4b.oph</TT
></TD
>Example Programs</TD
></TR
></TABLE
></DIV

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="NEXT"
TITLE="c64-1.oph"
HREF="x1123.html"></HEAD
HREF="x1154.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1123.html"
HREF="x1154.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -130,7 +130,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -148,7 +148,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1123.html"
HREF="x1154.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -164,7 +164,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello2.oph"
HREF="x1119.html"><LINK
HREF="x1150.html"><LINK
REL="NEXT"
TITLE="c64kernal.oph"
HREF="x1127.html"></HEAD
HREF="x1158.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1119.html"
HREF="x1150.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1127.html"
HREF="x1158.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -119,7 +119,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1119.html"
HREF="x1150.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -137,7 +137,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1127.html"
HREF="x1158.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -156,7 +156,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="c64-1.oph"
HREF="x1123.html"><LINK
HREF="x1154.html"><LINK
REL="NEXT"
TITLE="hello3.oph"
HREF="x1131.html"></HEAD
HREF="x1162.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1123.html"
HREF="x1154.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1131.html"
HREF="x1162.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -174,7 +174,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1123.html"
HREF="x1154.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -192,7 +192,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1131.html"
HREF="x1162.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -211,7 +211,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="c64kernal.oph"
HREF="x1127.html"><LINK
HREF="x1158.html"><LINK
REL="NEXT"
TITLE="hello4a.oph"
HREF="x1135.html"></HEAD
HREF="x1166.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1127.html"
HREF="x1158.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1135.html"
HREF="x1166.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -153,7 +153,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1127.html"
HREF="x1158.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -171,7 +171,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1135.html"
HREF="x1166.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -190,7 +190,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

231
book/x1166.html Normal file
View File

@@ -0,0 +1,231 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>hello4a.oph</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello3.oph"
HREF="x1162.html"><LINK
REL="NEXT"
TITLE="hello4b.oph"
HREF="x1170.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1162.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Example Programs</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1170.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="TUTOR4A-SRC"
><TT
CLASS="FILENAME"
>hello4a.oph</TT
></A
></H1
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>.include "c64-1.oph"
.outfile "hello.prg"
.macro print
ldx #0
_loop: lda _1, x
beq _done
jsr chrout
inx
bne _loop
_done:
.macend
.macro greet
lda #30
jsr delay
`print hello1
`print _1
`print hello2
.macend
lda #147
jsr chrout
`greet target1
`greet target2
`greet target3
`greet target4
`greet target5
`greet target6
`greet target7
`greet target8
`greet target9
`greet target10
rts
hello1: .byte "HELLO, ",0
hello2: .byte "!", 13, 0
target1: .byte "PROGRAMMER", 0
target2: .byte "ROOM", 0
target3: .byte "BUILDING", 0
target4: .byte "NEIGHBORHOOD", 0
target5: .byte "CITY", 0
target6: .byte "NATION", 0
target7: .byte "WORLD", 0
target8: .byte "SOLAR SYSTEM", 0
target9: .byte "GALAXY", 0
target10: .byte "UNIVERSE", 0
; DELAY routine. Executes 2,560*(A) NOP statements.
delay: tax
ldy #00
* nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
iny
bne -
dex
bne -
rts</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1162.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1170.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><TT
CLASS="FILENAME"
>hello3.oph</TT
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><TT
CLASS="FILENAME"
>hello4b.oph</TT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello4a.oph"
HREF="x1135.html"><LINK
HREF="x1166.html"><LINK
REL="NEXT"
TITLE="hello4c.oph"
HREF="x1143.html"></HEAD
HREF="x1174.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1135.html"
HREF="x1166.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1143.html"
HREF="x1174.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -176,7 +176,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1135.html"
HREF="x1166.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -194,7 +194,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1143.html"
HREF="x1174.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -213,7 +213,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello4b.oph"
HREF="x1139.html"><LINK
HREF="x1170.html"><LINK
REL="NEXT"
TITLE="hello5.oph"
HREF="x1147.html"></HEAD
HREF="x1178.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1139.html"
HREF="x1170.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1147.html"
HREF="x1178.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -179,7 +179,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1139.html"
HREF="x1170.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -197,7 +197,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1147.html"
HREF="x1178.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -216,7 +216,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello4c.oph"
HREF="x1143.html"><LINK
HREF="x1174.html"><LINK
REL="NEXT"
TITLE="hello6.oph"
HREF="x1151.html"></HEAD
HREF="x1182.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1143.html"
HREF="x1174.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1151.html"
HREF="x1182.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -183,7 +183,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1143.html"
HREF="x1174.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -201,7 +201,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1151.html"
HREF="x1182.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -220,7 +220,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello5.oph"
HREF="x1147.html"><LINK
HREF="x1178.html"><LINK
REL="NEXT"
TITLE="hello7.oph"
HREF="x1155.html"></HEAD
HREF="x1186.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1147.html"
HREF="x1178.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1155.html"
HREF="x1186.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -210,7 +210,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1147.html"
HREF="x1178.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -228,7 +228,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1155.html"
HREF="x1186.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -247,7 +247,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello6.oph"
HREF="x1151.html"><LINK
HREF="x1182.html"><LINK
REL="NEXT"
TITLE="structuredemo.oph"
HREF="x1159.html"></HEAD
HREF="x1190.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1151.html"
HREF="x1182.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1159.html"
HREF="x1190.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -184,7 +184,7 @@ _done: rts
.checkpc $D000
.data zp
.checkpc $80</PRE
.checkpc $90</PRE
></TD
></TR
></TABLE
@@ -205,7 +205,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1151.html"
HREF="x1182.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -223,7 +223,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1159.html"
HREF="x1190.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -242,7 +242,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="hello7.oph"
HREF="x1155.html"><LINK
HREF="x1186.html"><LINK
REL="NEXT"
TITLE="fibonacci.oph"
HREF="x1163.html"></HEAD
HREF="x1194.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1155.html"
HREF="x1186.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1163.html"
HREF="x1194.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -338,7 +338,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1155.html"
HREF="x1186.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -356,7 +356,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1163.html"
HREF="x1194.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -375,7 +375,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Example Programs"
HREF="a1112.html"><LINK
HREF="a1143.html"><LINK
REL="PREVIOUS"
TITLE="structuredemo.oph"
HREF="x1159.html"><LINK
HREF="x1190.html"><LINK
REL="NEXT"
TITLE="Ophis Command Reference"
HREF="a1167.html"></HEAD
HREF="a1198.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1159.html"
HREF="x1190.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -320,7 +320,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1159.html"
HREF="x1190.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -338,7 +338,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -357,7 +357,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1112.html"
HREF="a1143.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Ophis Command Reference"
HREF="a1167.html"><LINK
HREF="a1198.html"><LINK
REL="PREVIOUS"
TITLE="Ophis Command Reference"
HREF="a1167.html"><LINK
HREF="a1198.html"><LINK
REL="NEXT"
TITLE="Compound Arguments"
HREF="x1282.html"></HEAD
HREF="x1313.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1282.html"
HREF="x1313.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1234"
NAME="AEN1265"
>Basic arguments</A
></H1
><P
@@ -85,7 +85,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1237"
NAME="AEN1268"
>Numeric types</A
></H2
><P
@@ -148,7 +148,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1260"
NAME="AEN1291"
>Label types</A
></H2
><P
@@ -204,7 +204,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1273"
NAME="AEN1304"
>String types</A
></H2
><P
@@ -258,7 +258,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -276,7 +276,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1282.html"
HREF="x1313.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -292,7 +292,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Ophis Command Reference"
HREF="a1167.html"><LINK
HREF="a1198.html"><LINK
REL="PREVIOUS"
TITLE="Basic arguments"
HREF="x1234.html"><LINK
HREF="x1265.html"><LINK
REL="NEXT"
TITLE="Memory Model"
HREF="x1309.html"></HEAD
HREF="x1340.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1234.html"
HREF="x1265.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1309.html"
HREF="x1340.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1282"
NAME="AEN1313"
>Compound Arguments</A
></H1
><P
@@ -161,7 +161,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1234.html"
HREF="x1265.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -179,7 +179,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1309.html"
HREF="x1340.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -195,7 +195,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Ophis Command Reference"
HREF="a1167.html"><LINK
HREF="a1198.html"><LINK
REL="PREVIOUS"
TITLE="Compound Arguments"
HREF="x1282.html"><LINK
HREF="x1313.html"><LINK
REL="NEXT"
TITLE="Macros"
HREF="x1354.html"></HEAD
HREF="x1385.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1282.html"
HREF="x1313.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1354.html"
HREF="x1385.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1309"
NAME="AEN1340"
>Memory Model</A
></H1
><P
@@ -88,7 +88,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1312"
NAME="AEN1343"
>Basic PC tracking</A
></H2
><P
@@ -127,7 +127,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1321"
NAME="AEN1352"
>Basic Segmentation simulation</A
></H2
><P
@@ -243,7 +243,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1345"
NAME="AEN1376"
>General Segmentation Simulation</A
></H2
><P
@@ -322,7 +322,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1282.html"
HREF="x1313.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -340,7 +340,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1354.html"
HREF="x1385.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -356,7 +356,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Ophis Command Reference"
HREF="a1167.html"><LINK
HREF="a1198.html"><LINK
REL="PREVIOUS"
TITLE="Memory Model"
HREF="x1309.html"><LINK
HREF="x1340.html"><LINK
REL="NEXT"
TITLE="Assembler directives"
HREF="x1394.html"></HEAD
HREF="x1425.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1309.html"
HREF="x1340.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1394.html"
HREF="x1425.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1354"
NAME="AEN1385"
>Macros</A
></H1
><P
@@ -92,7 +92,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1358"
NAME="AEN1389"
>Defining Macros</A
></H2
><P
@@ -128,7 +128,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1364"
NAME="AEN1395"
>Invoking Macros</A
></H2
><P
@@ -175,7 +175,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1372"
NAME="AEN1403"
>Passing Arguments to Macros</A
></H2
><P
@@ -234,7 +234,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN1382"
NAME="AEN1413"
>Features and Restrictions of the Ophis Macro Model</A
></H2
><P
@@ -307,7 +307,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1309.html"
HREF="x1340.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -325,7 +325,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1394.html"
HREF="x1425.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -341,7 +341,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,10 +11,10 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Ophis Command Reference"
HREF="a1167.html"><LINK
HREF="a1198.html"><LINK
REL="PREVIOUS"
TITLE="Macros"
HREF="x1354.html"></HEAD
HREF="x1385.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -42,7 +42,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x1354.html"
HREF="x1385.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -66,7 +66,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN1394"
NAME="AEN1425"
>Assembler directives</A
></H1
><P
@@ -576,7 +576,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x1354.html"
HREF="x1385.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -606,7 +606,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="a1167.html"
HREF="a1198.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The basics"
HREF="c56.html"><LINK
HREF="c58.html"><LINK
REL="PREVIOUS"
TITLE="Producing Commodore 64 programs"
HREF="x72.html"><LINK
HREF="x74.html"><LINK
REL="NEXT"
TITLE="Writing the actual code"
HREF="x162.html"></HEAD
HREF="x177.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x72.html"
HREF="x74.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x162.html"
HREF="x177.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN141"
NAME="AEN156"
>Related commands and options</A
></H1
><P
@@ -155,7 +155,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x72.html"
HREF="x74.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -173,7 +173,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x162.html"
HREF="x177.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -189,7 +189,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The basics"
HREF="c56.html"><LINK
HREF="c58.html"><LINK
REL="PREVIOUS"
TITLE="Related commands and options"
HREF="x141.html"><LINK
HREF="x156.html"><LINK
REL="NEXT"
TITLE="Assembling the code"
HREF="x171.html"></HEAD
HREF="x186.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x141.html"
HREF="x156.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x171.html"
HREF="x186.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN162"
NAME="AEN177"
>Writing the actual code</A
></H1
><P
@@ -121,7 +121,7 @@ hello: .byte "HELLO, WORLD!", 0
><P
> The complete, final source is available in
the <A
HREF="a1112.html#TUTOR1-SRC"
HREF="a1143.html#TUTOR1-SRC"
><I
><I
>hello1.oph</I
@@ -146,7 +146,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x141.html"
HREF="x156.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -164,7 +164,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x171.html"
HREF="x186.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -180,7 +180,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The basics"
HREF="c56.html"><LINK
HREF="c58.html"><LINK
REL="PREVIOUS"
TITLE="Writing the actual code"
HREF="x162.html"><LINK
HREF="x177.html"><LINK
REL="NEXT"
TITLE="Labels and aliases"
HREF="c236.html"></HEAD
HREF="c251.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x162.html"
HREF="x177.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c236.html"
HREF="c251.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN171"
NAME="AEN186"
>Assembling the code</A
></H1
><P
@@ -143,7 +143,7 @@ CLASS="OPTION"
><DIV
CLASS="TABLE"
><A
NAME="AEN186"
NAME="AEN201"
></A
><P
><B
@@ -311,7 +311,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x162.html"
HREF="x177.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -329,7 +329,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c236.html"
HREF="c251.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -345,7 +345,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Labels and aliases"
HREF="c236.html"><LINK
HREF="c251.html"><LINK
REL="PREVIOUS"
TITLE="Labels and aliases"
HREF="c236.html"><LINK
HREF="c251.html"><LINK
REL="NEXT"
TITLE="Aliasing"
HREF="x262.html"></HEAD
HREF="x277.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c236.html"
HREF="c251.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x262.html"
HREF="x277.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN251"
NAME="AEN266"
>Anonymous labels</A
></H1
><P
@@ -147,7 +147,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c236.html"
HREF="c251.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -165,7 +165,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x262.html"
HREF="x277.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -181,7 +181,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c236.html"
HREF="c251.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Labels and aliases"
HREF="c236.html"><LINK
HREF="c251.html"><LINK
REL="PREVIOUS"
TITLE="Anonymous labels"
HREF="x251.html"><LINK
HREF="x266.html"><LINK
REL="NEXT"
TITLE="Headers, Libraries, and Macros"
HREF="c273.html"></HEAD
HREF="c288.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x251.html"
HREF="x266.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c273.html"
HREF="c288.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN262"
NAME="AEN277"
>Aliasing</A
></H1
><P
@@ -119,7 +119,7 @@ CLASS="PROGRAMLISTING"
></TABLE
><P
> The final version of the code is in <A
HREF="x1119.html"
HREF="x1150.html"
><I
><I
>hello2.oph</I
@@ -127,7 +127,7 @@ HREF="x1119.html"
></A
>. It should
assemble to exactly the same program as <A
HREF="a1112.html#TUTOR1-SRC"
HREF="a1143.html#TUTOR1-SRC"
><I
><I
>hello1.oph</I
@@ -152,7 +152,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x251.html"
HREF="x266.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -170,7 +170,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c273.html"
HREF="c288.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -186,7 +186,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c236.html"
HREF="c251.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Headers, Libraries, and Macros"
HREF="c273.html"><LINK
HREF="c288.html"><LINK
REL="PREVIOUS"
TITLE="Headers, Libraries, and Macros"
HREF="c273.html"><LINK
HREF="c288.html"><LINK
REL="NEXT"
TITLE="Example code"
HREF="x328.html"></HEAD
HREF="x342.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c273.html"
HREF="c288.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x328.html"
HREF="x342.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN298"
NAME="AEN313"
>Macros</A
></H1
><P
@@ -99,7 +99,7 @@ CLASS="EMPHASIS"
body. This produces effects much closer to those of a
traditional function call. A more detailed discussion of the
tradeoffs may be found in <A
HREF="a1167.html"
HREF="a1198.html"
>the Appendix called <I
>Ophis Command Reference</I
></A
@@ -110,7 +110,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN306"
NAME="AEN321"
>Macro definitions</A
></H2
><P
@@ -180,14 +180,10 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN319"
NAME="AEN334"
>Macro invocations</A
></H2
><P
> Macros may be invoked in two ways: one that looks like a
directive, and one that looks like an instruction.
</P
><P
> The most common way to invoke a macro is to backquote the name
of the macro. It is also possible to use
the <TT
@@ -240,7 +236,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c273.html"
HREF="c288.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -258,7 +254,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x328.html"
HREF="x342.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -274,7 +270,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c273.html"
HREF="c288.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -17,7 +17,7 @@ TITLE="Preface"
HREF="f10.html"><LINK
REL="NEXT"
TITLE="About the examples"
HREF="x42.html"></HEAD
HREF="x44.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x42.html"
HREF="x44.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,12 +73,28 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN30"
NAME="AEN32"
>Getting a copy of Ophis</A
></H1
><P
> As of this writing, the Ophis assembler is hosted at Github. The
latest downloads and documentation will be available
> As of version 2.2, the Python Package Index offers Ophis
at <A
HREF="https://pypi.org/manage/project/ophis-asm/"
TARGET="_top"
>https://pypi.org/manage/project/ophis-asm/</A
>.
This version may be installed on any system
where <TT
CLASS="LITERAL"
>pip</TT
> or <TT
CLASS="LITERAL"
>pipx</TT
> works.
</P
><P
> Development is hosted at Github. The latest downloads and
documentation will be available
at <A
HREF="http://github.com/michaelcmartin/Ophis"
TARGET="_top"
@@ -92,21 +108,6 @@ CLASS="QUOTE"
page.
</P
><P
> Ophis is written entirely in Python and packaged using the
distutils. The default installation script on Unix and Mac OS X
systems should put the files where they need to go. If you are
running it locally, you will need to install
the <TT
CLASS="LITERAL"
>Ophis</TT
> package somewhere in your Python
package path, and then put the <B
CLASS="COMMAND"
>ophis</B
> script
somewhere in your path.
</P
><P
> For Windows users, a prepackaged system made
with <B
CLASS="COMMAND"
@@ -118,13 +119,6 @@ CLASS="COMMAND"
>ophis.exe</B
> in your path.
</P
><P
> If you are working on a system with Python installed but to
which you do not wish to install software, there is also a
standalone pure-Python edition with an ophis.py script. This may
be placed anywhere and running ophis.py will temporarily set the
library path to point to your directory.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
@@ -160,7 +154,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x42.html"
HREF="x44.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Headers, Libraries, and Macros"
HREF="c273.html"><LINK
HREF="c288.html"><LINK
REL="PREVIOUS"
TITLE="Macros"
HREF="x298.html"><LINK
HREF="x313.html"><LINK
REL="NEXT"
TITLE="Character maps"
HREF="c333.html"></HEAD
HREF="c347.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x298.html"
HREF="x313.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c333.html"
HREF="c347.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,12 +73,12 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN328"
NAME="AEN342"
>Example code</A
></H1
><P
> <A
HREF="x1131.html"
HREF="x1162.html"
><I
><I
>hello3.oph</I
@@ -110,7 +110,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x298.html"
HREF="x313.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -128,7 +128,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c333.html"
HREF="c347.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -144,7 +144,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c273.html"
HREF="c288.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -14,10 +14,10 @@ TITLE="Preface"
HREF="f10.html"><LINK
REL="PREVIOUS"
TITLE="Getting a copy of Ophis"
HREF="x30.html"><LINK
HREF="x32.html"><LINK
REL="NEXT"
TITLE="Using the Ophis Assembler"
HREF="p51.html"></HEAD
HREF="p53.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x30.html"
HREF="x32.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN42"
NAME="AEN44"
>About the examples</A
></H1
><P
@@ -128,7 +128,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x30.html"
HREF="x32.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -146,7 +146,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="p51.html"
HREF="p53.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Advanced Memory Segments"
HREF="c460.html"><LINK
HREF="c478.html"><LINK
REL="PREVIOUS"
TITLE="Advanced Memory Segments"
HREF="c460.html"><LINK
HREF="c478.html"><LINK
REL="NEXT"
TITLE="Platform-Specific Techniques"
HREF="c489.html"></HEAD
TITLE="Included Platform Support"
HREF="c507.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c460.html"
HREF="c478.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c489.html"
HREF="c507.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN471"
NAME="AEN489"
>The Solution</A
></H1
><P
@@ -220,13 +220,13 @@ WIDTH="100%"
><PRE
CLASS="PROGRAMLISTING"
>.data zp
.checkpc $80</PRE
.checkpc $90</PRE
></TD
></TR
></TABLE
><P
> The final source file is <A
HREF="x1155.html"
HREF="x1186.html"
><I
><I
>hello7.oph</I
@@ -251,7 +251,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c460.html"
HREF="c478.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -269,7 +269,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c489.html"
HREF="c507.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -285,7 +285,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c460.html"
HREF="c478.html"
ACCESSKEY="U"
>Up</A
></TD
@@ -293,7 +293,7 @@ ACCESSKEY="U"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Platform-Specific Techniques</TD
>Included Platform Support</TD
></TR
></TABLE
></DIV

View File

@@ -1,169 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>The Nintendo Entertainment System</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Platform-Specific Techniques"
HREF="c489.html"><LINK
REL="PREVIOUS"
TITLE="Platform-Specific Techniques"
HREF="c489.html"><LINK
REL="NEXT"
TITLE="The Atari 2600 VCS"
HREF="x611.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c489.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Platform-Specific Techniques</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x611.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN606"
>The Nintendo Entertainment System</A
></H1
><P
> The NES development community is somewhat more fragmented than
the others. A skeletal <TT
CLASS="LITERAL"
>nes.oph</TT
> file is
provided, but memory locations are not as consistently
named. Much sample code doesn't provide aliases for control
registers at all.
</P
><P
> Conveniently creating runnable NES programs is somewhat
involved. Any given product was generally burned onto several
chips that were affixed to one of a large number of circuit
boards. These are often referred to as "mappers" by
developers because their effect is to implement various
bankswitching schemes. The result is a program built out of
parts, each with its own origin. A "Hello World"
sample program ships with Ophis. It does not use a bankswitcher,
but it does split its contents into a program chip and a
graphics chip, with one of two wrapper files to knit them
together into a file that other software will recognize. Samples
are given for the common iNES format and the defunct UNIF
format.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c489.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x611.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Platform-Specific Techniques</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c489.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The Atari 2600 VCS</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

184
book/x624.html Normal file
View File

@@ -0,0 +1,184 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>The Nintendo Entertainment System</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Included Platform Support"
HREF="c507.html"><LINK
REL="PREVIOUS"
TITLE="Included Platform Support"
HREF="c507.html"><LINK
REL="NEXT"
TITLE="The Atari 2600 VCS"
HREF="x632.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c507.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Included Platform Support</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x632.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN624"
>The Nintendo Entertainment System</A
></H1
><P
> The NES development community in 2024 has standardized on the
sophisticated <TT
CLASS="LITERAL"
>ca65</TT
> assembler for major
homebrew projects, but Ophis's simpler output model has
advantages of its own. A skeletal <TT
CLASS="LITERAL"
>nes.oph</TT
>
file is provided in the platform support directory, but most
NES code you'll find in the wild doesn't use aliases for control
registers at all&#8212;it just sticks with the register numbers.
</P
><P
> Creating output files that emulators or other tools will
recognize as complete NES programs is somewhat involved.
Any given product was generally one of a large selection of
circuit boards with several ROM or support-logic chips
affixed to it. These circuit board configurations are generally
referred to as "mappers" by developers because their
effect is to implement various bankswitching schemes. The result
is a program built out of parts, each with its own origin.
A simple <SPAN
CLASS="QUOTE"
>"Hello World"</SPAN
> sample program ships with
Ophis. It is configured to use "Mapper Zero", or a simulation of
the <SPAN
CLASS="QUOTE"
>"NROM"</SPAN
> circuit board, which had no special
bankswitching logic and simply wired the program chip and the
graphics chip directly into the address bus. The sample code
includes one source file for each chip, and then two wrapper
files to knit them together into a file that other software will
recognize. As of 2024, the UNIF format is entirely abandoned in
favor of the backwards-compatible iNES 2.0 format.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c507.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x632.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Included Platform Support</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c507.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The Atari 2600 VCS</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -10,14 +10,14 @@ REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Platform-Specific Techniques"
HREF="c489.html"><LINK
TITLE="Included Platform Support"
HREF="c507.html"><LINK
REL="PREVIOUS"
TITLE="The Nintendo Entertainment System"
HREF="x606.html"><LINK
HREF="x624.html"><LINK
REL="NEXT"
TITLE="To HLL and Back"
HREF="p618.html"></HEAD
TITLE="Other Atari 8-bits"
HREF="x640.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x606.html"
HREF="x624.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -53,13 +53,13 @@ ACCESSKEY="P"
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Platform-Specific Techniques</TD
>Included Platform Support</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="p618.html"
HREF="x640.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,30 +73,36 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN611"
NAME="AEN632"
>The Atari 2600 VCS</A
></H1
><P
> Of all the 8-bit development communities, the Atari developers
seem to be the most cohesive. The development documents
available are universal, and analysts and developers alike all
use the register names in the <I
CLASS="EMPHASIS"
>Stella Developer's
Guide</I
>. Ophis follows their lead, providing these
names in the header <TT
> Ophis provides a <TT
CLASS="LITERAL"
>stella.oph</TT
>.
> header that names
the system's registers to match the documentation in
the <I
CLASS="EMPHASIS"
>Stella Programmer's Guide</I
>. It also
replicates two macros that were widely shared on mailing lists
and other tutorial documents at the time Ophis was first
released. See the file itself for details.
</P
><P
> The <TT
> Atari 2600 ROM images are simple ROM dumps and do not require
any more sophisticated organization in the Ophis source files
than an <TT
CLASS="LITERAL"
>stella.oph</TT
> header also replicates two
macros that appear in the header files distributed to budding
VCS developers. They are documented in the file.
>.advance</TT
> directive to pad the output
to the appropriate size.
</P
><P
> Two sample programs ship with Ophis 2.2; a tiny hello-world
program, and a more sophisticated interactive program that
explores the system's color palette.
</P
></DIV
><DIV
@@ -115,7 +121,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x606.html"
HREF="x624.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -133,7 +139,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="p618.html"
HREF="x640.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -149,7 +155,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c489.html"
HREF="c507.html"
ACCESSKEY="U"
>Up</A
></TD
@@ -157,7 +163,7 @@ ACCESSKEY="U"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>To HLL and Back</TD
>Other Atari 8-bits</TD
></TR
></TABLE
></DIV

162
book/x640.html Normal file
View File

@@ -0,0 +1,162 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Other Atari 8-bits</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Included Platform Support"
HREF="c507.html"><LINK
REL="PREVIOUS"
TITLE="The Atari 2600 VCS"
HREF="x632.html"><LINK
REL="NEXT"
TITLE="The Apple II series"
HREF="x645.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x632.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Included Platform Support</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x645.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN640"
>Other Atari 8-bits</A
></H1
><P
> The Atari 2600's successor, the Atari 5200, shares much of its
architecture with the Atari 400/800/1200/XL/XE line. Atari DOS
had an executable format that divided itself up into chunks that
were independently loaded, with some chunks being special and
identifying program entry points or intervening processing to be
done mid-load.
</P
><P
> A simple Hello World program compatible with Atari DOS is
included in the examples directory. The output file may be
loaded and run directly in many emulators, or may be copied
into a disk image with a tool like <TT
CLASS="LITERAL"
>atr</TT
> or
Altirra and executed from the DOS prompt.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x632.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x645.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>The Atari 2600 VCS</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c507.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The Apple II series</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

158
book/x645.html Normal file
View File

@@ -0,0 +1,158 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>The Apple II series</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Included Platform Support"
HREF="c507.html"><LINK
REL="PREVIOUS"
TITLE="Other Atari 8-bits"
HREF="x640.html"><LINK
REL="NEXT"
TITLE="To HLL and Back"
HREF="p649.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x640.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Included Platform Support</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="p649.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN645"
>The Apple II series</A
></H1
><P
> For most of its lifespan, Apple II systems ran either a
primitive system named "DOS 3.3" or more sophisticated one
named ProDOS. ProDOS 8 is as of 2024 still under active
development, and its superior support for machine-language
interfacing with the disk drive makes it the preferable
choice for Ophis-based development.
</P
><P
> A simple Hello World program is included in the examples
directory. To actually run the resulting binary, it must be
added to a ProDOS-formatted disk using a tool such as CADIUS
or CiderPress.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x640.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="p649.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Other Atari 8-bits</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c507.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>To HLL and Back</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The Second Step"
HREF="c623.html"><LINK
HREF="c654.html"><LINK
REL="PREVIOUS"
TITLE="The Second Step"
HREF="c623.html"><LINK
HREF="c654.html"><LINK
REL="NEXT"
TITLE="Unsigned arithmetic"
HREF="x641.html"></HEAD
HREF="x672.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x641.html"
HREF="x672.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN635"
NAME="AEN666"
>The solution</A
></H1
><P
@@ -115,7 +115,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -133,7 +133,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x641.html"
HREF="x672.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -149,7 +149,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The Second Step"
HREF="c623.html"><LINK
HREF="c654.html"><LINK
REL="PREVIOUS"
TITLE="The solution"
HREF="x635.html"><LINK
HREF="x666.html"><LINK
REL="NEXT"
TITLE="16-bit addition and subtraction"
HREF="x664.html"></HEAD
HREF="x695.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x635.html"
HREF="x666.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x664.html"
HREF="x695.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN641"
NAME="AEN672"
>Unsigned arithmetic</A
></H1
><P
@@ -216,7 +216,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x635.html"
HREF="x666.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -234,7 +234,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x664.html"
HREF="x695.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -250,7 +250,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The Second Step"
HREF="c623.html"><LINK
HREF="c654.html"><LINK
REL="PREVIOUS"
TITLE="Unsigned arithmetic"
HREF="x641.html"><LINK
HREF="x672.html"><LINK
REL="NEXT"
TITLE="16-bit comparisons"
HREF="x674.html"></HEAD
HREF="x705.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x641.html"
HREF="x672.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x674.html"
HREF="x705.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN664"
NAME="AEN695"
>16-bit addition and subtraction</A
></H1
><P
@@ -145,7 +145,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x641.html"
HREF="x672.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -163,7 +163,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x674.html"
HREF="x705.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -179,7 +179,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The Second Step"
HREF="c623.html"><LINK
HREF="c654.html"><LINK
REL="PREVIOUS"
TITLE="16-bit addition and subtraction"
HREF="x664.html"><LINK
HREF="x695.html"><LINK
REL="NEXT"
TITLE="Structured Programming"
HREF="c680.html"></HEAD
HREF="c711.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x664.html"
HREF="x695.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN674"
NAME="AEN705"
>16-bit comparisons</A
></H1
><P
@@ -127,7 +127,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x664.html"
HREF="x695.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -145,7 +145,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -161,7 +161,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c623.html"
HREF="c654.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="The basics"
HREF="c56.html"><LINK
HREF="c58.html"><LINK
REL="PREVIOUS"
TITLE="The basics"
HREF="c56.html"><LINK
HREF="c58.html"><LINK
REL="NEXT"
TITLE="Related commands and options"
HREF="x141.html"></HEAD
HREF="x156.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x141.html"
HREF="x156.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN72"
NAME="AEN74"
>Producing Commodore 64 programs</A
></H1
><P
@@ -128,7 +128,7 @@ CLASS="PROGRAMLISTING"
CLASS="USERINPUT"
>SAVE</KBD
> this program to a file, then
study it in a debugger. It's 15 bytes long:
study it with a hex dumper. It's 15 bytes long:
</P
><TABLE
BORDER="0"
@@ -138,7 +138,7 @@ WIDTH="100%"
><TD
><PRE
CLASS="SCREEN"
>1070:0100 01 08 0C 08 0A 00 9E 20-32 30 36 34 00 00 00
>00000000 01 08 0c 08 0a 00 9e 20 32 30 36 34 00 00 00 |....... 2064...|
</PRE
></TD
></TR
@@ -150,7 +150,7 @@ CLASS="SCREEN"
><DIV
CLASS="TABLE"
><A
NAME="AEN86"
NAME="AEN88"
></A
><P
><B
@@ -166,6 +166,9 @@ CLASS="CALSTABLE"
><TR
><TH
ALIGN="CENTER"
>File Offsets</TH
><TH
ALIGN="CENTER"
>Memory Locations</TH
><TH
ALIGN="CENTER"
@@ -175,18 +178,32 @@ ALIGN="CENTER"
><TBODY
><TR
><TD
>0-1</TD
><TD
>Nowhere</TD
><TD
>2-byte pointer to where in memory to load the rest of the file ($0801).</TD
></TR
><TR
><TD
>2-3</TD
><TD
>$0801-$0802</TD
><TD
>2-byte pointer to the next line of BASIC code ($080C).</TD
></TR
><TR
><TD
>4-5</TD
><TD
>$0803-$0804</TD
><TD
>2-byte line number ($000A = 10).</TD
></TR
><TR
><TD
>6</TD
><TD
>$0805</TD
><TD
>Byte code for the <KBD
@@ -196,6 +213,8 @@ CLASS="USERINPUT"
></TR
><TR
><TD
>7-11</TD
><TD
>$0806-$080A</TD
><TD
>The rest of the line, which is just the string <SPAN
@@ -205,12 +224,16 @@ CLASS="QUOTE"
></TR
><TR
><TD
>12</TD
><TD
>$080B</TD
><TD
>Null byte, terminating the line.</TD
></TR
><TR
><TD
>13-14</TD
><TD
>$080C-$080D</TD
><TD
>2-byte pointer to the next line of BASIC code ($0000 = end of program).</TD
@@ -219,10 +242,11 @@ CLASS="QUOTE"
></TABLE
></DIV
><P
> That's 13 bytes. We started at 2049, so we need 2 more bytes of
filler to make our code actually start at location 2064. These
17 bytes will give us the file format and the BASIC code we need
to have our machine language program run.
> That's 15 bytes, of which 13 are actually loaded into memory.
We started at 2049, so we need 2 more bytes of filler to make
our code actually start at location 2064. These 17 bytes will
give us the file format and the BASIC code we need to have our
machine language program run.
</P
><P
> These are just bytes&#8212;indistinguishable from any other sort of
@@ -363,6 +387,18 @@ CLASS="LITERAL"
></UL
>
</P
><P
> We can do better still, though. That initial starting address
of 2064 was only ever a guess; now that we know that we overshot
by two bytes, we can simply change the starting address to 2062
and omit the <TT
CLASS="LITERAL"
>.advance</TT
> directive entirely. In
fact, we can even remove the space before the number and make it
2061 instead&#8212;BASIC doesn't need that space in its
instruction and it's arguably a wasted byte.
</P
></DIV
><DIV
CLASS="NAVFOOTER"
@@ -380,7 +416,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -398,7 +434,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x141.html"
HREF="x156.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -414,7 +450,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c56.html"
HREF="c58.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Structured Programming"
HREF="c680.html"><LINK
HREF="c711.html"><LINK
REL="PREVIOUS"
TITLE="Structured Programming"
HREF="c680.html"><LINK
HREF="c711.html"><LINK
REL="NEXT"
TITLE="Procedures and register saving"
HREF="x740.html"></HEAD
HREF="x771.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x740.html"
HREF="x771.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN734"
NAME="AEN765"
>The stack</A
></H1
><P
@@ -121,7 +121,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -139,7 +139,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x740.html"
HREF="x771.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -155,7 +155,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Structured Programming"
HREF="c680.html"><LINK
HREF="c711.html"><LINK
REL="PREVIOUS"
TITLE="The stack"
HREF="x734.html"><LINK
HREF="x765.html"><LINK
REL="NEXT"
TITLE="Variables"
HREF="x758.html"></HEAD
HREF="x789.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x734.html"
HREF="x765.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x758.html"
HREF="x789.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,14 +73,14 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN740"
NAME="AEN771"
>Procedures and register saving</A
></H1
><P
> All programming languages are designed around the concept of
procedures.<A
NAME="AEN743"
HREF="#FTN.AEN743"
NAME="AEN774"
HREF="#FTN.AEN774"
><SPAN
CLASS="footnote"
>[1]</SPAN
@@ -193,8 +193,8 @@ ALIGN="LEFT"
VALIGN="TOP"
WIDTH="5%"
><A
NAME="FTN.AEN743"
HREF="x740.html#AEN743"
NAME="FTN.AEN774"
HREF="x771.html#AEN774"
><SPAN
CLASS="footnote"
>[1]</SPAN
@@ -232,7 +232,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x734.html"
HREF="x765.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -250,7 +250,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x758.html"
HREF="x789.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -266,7 +266,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Structured Programming"
HREF="c680.html"><LINK
HREF="c711.html"><LINK
REL="PREVIOUS"
TITLE="Procedures and register saving"
HREF="x740.html"><LINK
HREF="x771.html"><LINK
REL="NEXT"
TITLE="Data structures"
HREF="x803.html"></HEAD
HREF="x834.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x740.html"
HREF="x771.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x803.html"
HREF="x834.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN758"
NAME="AEN789"
>Variables</A
></H1
><P
@@ -84,7 +84,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN761"
NAME="AEN792"
>Global variables</A
></H2
><P
@@ -102,7 +102,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN764"
NAME="AEN795"
>Local variables</A
></H2
><P
@@ -123,7 +123,7 @@ CLASS="SECTION"
><H3
CLASS="SECTION"
><A
NAME="AEN768"
NAME="AEN799"
>Treat local variables like registers</A
></H3
><P
@@ -144,7 +144,7 @@ CLASS="SECTION"
><H3
CLASS="SECTION"
><A
NAME="AEN772"
NAME="AEN803"
>Procedure-based memory allocation</A
></H3
><P
@@ -191,7 +191,7 @@ CLASS="SECTION"
><H3
CLASS="SECTION"
><A
NAME="AEN781"
NAME="AEN812"
>Partition-based memory allocation</A
></H3
><P
@@ -260,7 +260,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN798"
NAME="AEN829"
>Constants</A
></H2
><P
@@ -297,7 +297,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x740.html"
HREF="x771.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -315,7 +315,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x803.html"
HREF="x834.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -331,7 +331,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Structured Programming"
HREF="c680.html"><LINK
HREF="c711.html"><LINK
REL="PREVIOUS"
TITLE="Variables"
HREF="x758.html"><LINK
HREF="x789.html"><LINK
REL="NEXT"
TITLE="A modest example: Insertion sort on linked lists"
HREF="x856.html"></HEAD
HREF="x887.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x758.html"
HREF="x789.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x856.html"
HREF="x887.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN803"
NAME="AEN834"
>Data structures</A
></H1
><P
@@ -86,7 +86,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN806"
NAME="AEN837"
>Arrays</A
></H2
><P
@@ -203,7 +203,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN819"
NAME="AEN850"
>Records</A
></H2
><P
@@ -334,7 +334,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN838"
NAME="AEN869"
>Bitfields</A
></H2
><P
@@ -398,7 +398,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x758.html"
HREF="x789.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -416,7 +416,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x856.html"
HREF="x887.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -432,7 +432,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Structured Programming"
HREF="c680.html"><LINK
HREF="c711.html"><LINK
REL="PREVIOUS"
TITLE="Data structures"
HREF="x803.html"><LINK
HREF="x834.html"><LINK
REL="NEXT"
TITLE="Pointers and Indirection"
HREF="c885.html"></HEAD
HREF="c916.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x803.html"
HREF="x834.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c885.html"
HREF="c916.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN856"
NAME="AEN887"
>A modest example: Insertion sort on linked lists</A
></H1
><P
@@ -89,7 +89,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN859"
NAME="AEN890"
>The data structure</A
></H2
><P
@@ -159,7 +159,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN868"
NAME="AEN899"
>Doing an insertion sort</A
></H2
><P
@@ -230,7 +230,7 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN874"
NAME="AEN905"
>Inserting an element</A
></H2
><P
@@ -360,14 +360,14 @@ CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN881"
NAME="AEN912"
>The complete application</A
></H2
><P
> The full application, which deals with interfacing with CBM
BASIC and handles console I/O and such, is
in <A
HREF="x1159.html"
HREF="x1190.html"
><I
><I
>structuredemo.oph</I
@@ -393,7 +393,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x803.html"
HREF="x834.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -411,7 +411,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c885.html"
HREF="c916.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -427,7 +427,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c680.html"
HREF="c711.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -1,253 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Pointer arithmetic</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Pointers and Indirection"
HREF="c885.html"><LINK
REL="PREVIOUS"
TITLE="Pointers and Indirection"
HREF="c885.html"><LINK
REL="NEXT"
TITLE="What about Indexed Indirect?"
HREF="x935.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c885.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Pointers and Indirection</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x935.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN919"
>Pointer arithmetic</A
></H1
><P
> Pointer arithmetic is an obscenely powerful and dangerous
technique. However, it's the most straightforward way to deal
with enormous arrays, structs, indexable stacks, and nearly
everything you do in C. (C has no native array or string types
primarily because it allows arbitrary pointer arithmetic, which is
strong enough to handle all of those without complaint and at
blazing speed. It also allows for all kinds of buffer overrun
security holes, but let's face it, who's going to be cracking root
on your Apple II?) There are a number of ways to implement this
on the 6502. We'll deal with them in increasing order of design
complexity.
</P
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN922"
>The straightforward, slow way</A
></H2
><P
> When computing a pointer value, you simply treat the pointer as
if it were a 16-bit integer. Do all the math you need, then
when the time comes to dereference it, simply do a direct
dereference as above. This is definitely doable, and it's not
difficult. However, it is costly in both space and time.
</P
><P
> When dealing with arbitrary indices large enough that they won't
fit in the Y register, or when creating values that you don't
intend to dereference (such as subtracting two pointers to find
the length of a string), this is also the only truly usable
technique.
</P
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN926"
>The clever fast way</A
></H2
><P
> But wait, you say. Often when we compute a value, at least one
of the operations is going to be an addition, and we're almost
certain to have that value be less than 256! Surely we may save
ourselves an operation by loading that value into the Y register
and having the load operation itself perform the final
addition!
</P
><P
> Very good. This is the fastest technique, and sometimes it's
even the most readable. These cases usually involve repeated
reading of various fields from a structure or record. The base
pointer always points to the base of the structure (or the top
of the local variable list, or what have you) and the Y register
takes values that index into that structure. This lets you keep
the pointer variable in memory largely static and requires no
explicit arithmetic instructions at all.
</P
><P
> However, this technique is highly opaque and should always be
well documented, indicating exactly what you think you're
pointing at. Then, when you get garbage results, you can
compare your comments and the resulting Y values with the actual
definition of the structure to see who's screwing up.
</P
><P
> For a case where we still need to do arithmetic, consider the
classic case of needing to clear out a large chunk of memory.
The following code fills the 4KB of memory between $C000 and
$D000 with zeroes:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> lda #$C0 ; Store #$C000 in mem (low byte first)
sta mem+1
lda #$00
sta mem
ldx #$04 ; x holds number of times to execute outer loop
tay ; accumulator and y are both 0
loop: sta (mem), y
iny
bne loop ; Inner loop ends when y wraps around to 0
inc mem+1 ; "Carry" from the iny to the core pointer
dex ; Decrement outer loop count, quit if done
bne loop</PRE
></TD
></TR
></TABLE
><P
> Used carefully, proper use of the Y register can make your code
smaller, faster, <I
CLASS="EMPHASIS"
>and</I
> more readable. Used
carelessly it can make your code an unreadable, unmaintainable
mess. Use it wisely, and with care, and it will be your
greatest ally in writing flexible code.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c885.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x935.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Pointers and Indirection</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c885.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>What about Indexed Indirect?</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -1,193 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Comparison with the other indexed forms</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Pointers and Indirection"
HREF="c885.html"><LINK
REL="PREVIOUS"
TITLE="What about Indexed Indirect?"
HREF="x935.html"><LINK
REL="NEXT"
TITLE="Conclusion"
HREF="x950.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x935.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Pointers and Indirection</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x950.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN942"
>Comparison with the other indexed forms</A
></H1
><P
> Pointers are slow. It sounds odd saying this, when C is the
fastest language around on modern machines precisely because of
its powerful and extensive use of pointers. However, modern
architectures are designed to be optimized for C-style code (as an
example, the x86 architecture allows statements like <TT
CLASS="LITERAL"
>mov
eax, [bs+bx+4*di]</TT
> as a single instruction), while the
6502 is not. An (Indirect, Y) operation can take up to 6 cycles
to complete just on its own, while the preparation of that command
costs additional time <I
CLASS="EMPHASIS"
>and</I
> scribbles over a
bunch of registers, meaning memory operations to save the values
and yet more time spent. The simple code given at the beginning
of this essay&#8212;loading <TT
CLASS="LITERAL"
>*b</TT
> into the
accumulator&#8212;takes 7 cycles, not counting the 6 it takes to
load b with the appropriate value to begin with. If b is known to
contain a specific value, we can write a single Absolute mode
instruction to load its value, which takes only 4 cycles and also
preserves the value in the Y register. Clearly, Absolute mode
should be used whenever possible.
</P
><P
> One might be tempted to use self-modifying code to solve this
problem. This actually doesn't pay off near enough for the hassle
it generates; for self-modifying code, the address must be
generated, then stored in the instruction, and then the data must
be loaded. Cost: 16 cycles for 2 immediate loads, 2 absolute
stores, and 1 absolute load. For the straight pointer
dereference, we generate the address, store it in the pointer,
clear the index, then dereference that. Cost: 17 cycles for 3
immediate loads, 2 zero page stores, and 1 indexed indirect load.
Furthermore, unlike in the self-modifying case, loops where simple
arithmetic is being continuously performed only require repeating
the final load instruction, which allows for much greater time
savings over an equivalent self-modifying loop.
</P
><P
> (This point is also completely moot for NES programmers or anyone
else whose programs are sitting in ROM, because programs stored on
a ROM cannot modify themselves.)
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x935.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x950.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>What about Indexed Indirect?</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c885.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Conclusion</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -2,7 +2,7 @@
<HTML
><HEAD
><TITLE
>Conclusion</TITLE
>Pointer arithmetic</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Pointers and Indirection"
HREF="c885.html"><LINK
HREF="c916.html"><LINK
REL="PREVIOUS"
TITLE="Comparison with the other indexed forms"
HREF="x942.html"><LINK
TITLE="Pointers and Indirection"
HREF="c916.html"><LINK
REL="NEXT"
TITLE="Functionals"
HREF="c953.html"></HEAD
TITLE="What about Indexed Indirect?"
HREF="x966.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x942.html"
HREF="c916.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c953.html"
HREF="x966.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -74,18 +74,117 @@ CLASS="SECTION"
CLASS="SECTION"
><A
NAME="AEN950"
>Conclusion</A
>Pointer arithmetic</A
></H1
><P
> That's pretty much it for pointers. Though they tend to make
programs hairy, and learning how to properly deal with pointers is
what separates real C programmers from the novices, the basic
mechanics of them are not complex. With pointers you can do
efficient passing of large structures, pass-by-reference,
complicated return values, and dynamic memory management&#8212;and
now these wondrous toys may be added to your assembler programs,
too (assuming you have that kind of space to play with).
> Pointer arithmetic is an obscenely powerful and dangerous
technique. However, it's the most straightforward way to deal
with enormous arrays, structs, indexable stacks, and nearly
everything you do in C. (C has no native array or string types
primarily because it allows arbitrary pointer arithmetic, which is
strong enough to handle all of those without complaint and at
blazing speed. It also allows for all kinds of buffer overrun
security holes, but let's face it, who's going to be cracking root
on your Apple II?) There are a number of ways to implement this
on the 6502. We'll deal with them in increasing order of design
complexity.
</P
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN953"
>The straightforward, slow way</A
></H2
><P
> When computing a pointer value, you simply treat the pointer as
if it were a 16-bit integer. Do all the math you need, then
when the time comes to dereference it, simply do a direct
dereference as above. This is definitely doable, and it's not
difficult. However, it is costly in both space and time.
</P
><P
> When dealing with arbitrary indices large enough that they won't
fit in the Y register, or when creating values that you don't
intend to dereference (such as subtracting two pointers to find
the length of a string), this is also the only truly usable
technique.
</P
></DIV
><DIV
CLASS="SECTION"
><H2
CLASS="SECTION"
><A
NAME="AEN957"
>The clever fast way</A
></H2
><P
> But wait, you say. Often when we compute a value, at least one
of the operations is going to be an addition, and we're almost
certain to have that value be less than 256! Surely we may save
ourselves an operation by loading that value into the Y register
and having the load operation itself perform the final
addition!
</P
><P
> Very good. This is the fastest technique, and sometimes it's
even the most readable. These cases usually involve repeated
reading of various fields from a structure or record. The base
pointer always points to the base of the structure (or the top
of the local variable list, or what have you) and the Y register
takes values that index into that structure. This lets you keep
the pointer variable in memory largely static and requires no
explicit arithmetic instructions at all.
</P
><P
> However, this technique is highly opaque and should always be
well documented, indicating exactly what you think you're
pointing at. Then, when you get garbage results, you can
compare your comments and the resulting Y values with the actual
definition of the structure to see who's screwing up.
</P
><P
> For a case where we still need to do arithmetic, consider the
classic case of needing to clear out a large chunk of memory.
The following code fills the 4KB of memory between $C000 and
$D000 with zeroes:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> lda #$C0 ; Store #$C000 in mem (low byte first)
sta mem+1
lda #$00
sta mem
ldx #$04 ; x holds number of times to execute outer loop
tay ; accumulator and y are both 0
loop: sta (mem), y
iny
bne loop ; Inner loop ends when y wraps around to 0
inc mem+1 ; "Carry" from the iny to the core pointer
dex ; Decrement outer loop count, quit if done
bne loop</PRE
></TD
></TR
></TABLE
><P
> Used carefully, proper use of the Y register can make your code
smaller, faster, <I
CLASS="EMPHASIS"
>and</I
> more readable. Used
carelessly it can make your code an unreadable, unmaintainable
mess. Use it wisely, and with care, and it will be your
greatest ally in writing flexible code.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
@@ -103,7 +202,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x942.html"
HREF="c916.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -121,7 +220,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c953.html"
HREF="x966.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -131,13 +230,13 @@ ACCESSKEY="N"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Comparison with the other indexed forms</TD
>Pointers and Indirection</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c885.html"
HREF="c916.html"
ACCESSKEY="U"
>Up</A
></TD
@@ -145,7 +244,7 @@ ACCESSKEY="U"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Functionals</TD
>What about Indexed Indirect?</TD
></TR
></TABLE
></DIV

View File

@@ -11,13 +11,13 @@ TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Pointers and Indirection"
HREF="c885.html"><LINK
HREF="c916.html"><LINK
REL="PREVIOUS"
TITLE="Pointer arithmetic"
HREF="x919.html"><LINK
HREF="x950.html"><LINK
REL="NEXT"
TITLE="Comparison with the other indexed forms"
HREF="x942.html"></HEAD
HREF="x973.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x919.html"
HREF="x950.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -59,7 +59,7 @@ WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x942.html"
HREF="x973.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -73,7 +73,7 @@ CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN935"
NAME="AEN966"
>What about Indexed Indirect?</A
></H1
><P
@@ -145,7 +145,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x919.html"
HREF="x950.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -163,7 +163,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x942.html"
HREF="x973.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -179,7 +179,7 @@ WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c885.html"
HREF="c916.html"
ACCESSKEY="U"
>Up</A
></TD

View File

@@ -2,7 +2,7 @@
<HTML
><HEAD
><TITLE
>A quick digression on how subroutines work</TITLE
>Comparison with the other indexed forms</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
@@ -10,14 +10,14 @@ REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Functionals"
HREF="c953.html"><LINK
TITLE="Pointers and Indirection"
HREF="c916.html"><LINK
REL="PREVIOUS"
TITLE="Functionals"
HREF="c953.html"><LINK
TITLE="What about Indexed Indirect?"
HREF="x966.html"><LINK
REL="NEXT"
TITLE="Dispatch-on-type and Data-Directed Assembler"
HREF="x992.html"></HEAD
TITLE="Conclusion"
HREF="x981.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
@@ -45,7 +45,7 @@ WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c953.html"
HREF="x966.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -53,13 +53,13 @@ ACCESSKEY="P"
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Functionals</TD
>Pointers and Indirection</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x992.html"
HREF="x981.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -74,78 +74,56 @@ CLASS="SECTION"
CLASS="SECTION"
><A
NAME="AEN973"
>A quick digression on how subroutines work</A
>Comparison with the other indexed forms</A
></H1
><P
> Ordinarily, subroutines are called with <TT
> Pointers are slow. It sounds odd saying this, when C is the
fastest language around on modern machines precisely because of
its powerful and extensive use of pointers. However, modern
architectures are designed to be optimized for C-style code (as an
example, the x86 architecture allows statements like <TT
CLASS="LITERAL"
>JSR</TT
> and
finished with <TT
CLASS="LITERAL"
>RTS</TT
>. The <TT
CLASS="LITERAL"
>JSR</TT
>
instruction takes its own address, adds 2 to it, and pushes this
16-bit value on the stack, high byte first, then low byte (so that
the low byte will be popped off first).
</P
><P
> But wait, you may object. All <TT
CLASS="LITERAL"
>JSR</TT
> instructions
are three bytes long. This <SPAN
CLASS="QUOTE"
>"return address"</SPAN
> is in
the middle of the instruction. And you would be quite right;
the <TT
CLASS="LITERAL"
>RTS</TT
> instruction pops off the 16-bit
address, adds one to it, and <I
>mov
eax, [bs+bx+4*di]</TT
> as a single instruction), while the
6502 is not. An (Indirect, Y) operation can take up to 6 cycles
to complete just on its own, while the preparation of that command
costs additional time <I
CLASS="EMPHASIS"
>then</I
> sets the
program counter to that value.
>and</I
> scribbles over a
bunch of registers, meaning memory operations to save the values
and yet more time spent. The simple code given at the beginning
of this essay&#8212;loading <TT
CLASS="LITERAL"
>*b</TT
> into the
accumulator&#8212;takes 7 cycles, not counting the 6 it takes to
load b with the appropriate value to begin with. If b is known to
contain a specific value, we can write a single Absolute mode
instruction to load its value, which takes only 4 cycles and also
preserves the value in the Y register. Clearly, Absolute mode
should be used whenever possible.
</P
><P
> So it <I
CLASS="EMPHASIS"
>is</I
> possible to set up
a <SPAN
CLASS="QUOTE"
>"<TT
CLASS="LITERAL"
>JSR</TT
> indirect"</SPAN
> kind of operation
by adding two to the indirect jump's address and then pushing that
value onto the stack before making the jump; however, you wouldn't
want to do this. It takes six bytes and trashes your accumulator,
and you can get the same functionality with half the space and
with no register corruption by simply defining the indirect jump
to be a one-instruction routine and <TT
CLASS="LITERAL"
>JSR</TT
>-ing to
it directly. As an added bonus, that way if you have multiple
indirect jumps through the same pointer, you don't need to
duplicate the jump instruction.
> One might be tempted to use self-modifying code to solve this
problem. This actually doesn't pay off near enough for the hassle
it generates; for self-modifying code, the address must be
generated, then stored in the instruction, and then the data must
be loaded. Cost: 16 cycles for 2 immediate loads, 2 absolute
stores, and 1 absolute load. For the straight pointer
dereference, we generate the address, store it in the pointer,
clear the index, then dereference that. Cost: 17 cycles for 3
immediate loads, 2 zero page stores, and 1 indexed indirect load.
Furthermore, unlike in the self-modifying case, loops where simple
arithmetic is being continuously performed only require repeating
the final load instruction, which allows for much greater time
savings over an equivalent self-modifying loop.
</P
><P
> Does this mean that abusing <TT
CLASS="LITERAL"
>JSR</TT
>
and <TT
CLASS="LITERAL"
>RTS</TT
> is a dead-end, though? Not at all...
> (This point is also completely moot for NES programmers or anyone
else whose programs are sitting in ROM, because programs stored on
a ROM cannot modify themselves.)
</P
></DIV
><DIV
@@ -164,7 +142,7 @@ WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c953.html"
HREF="x966.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
@@ -182,7 +160,7 @@ WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x992.html"
HREF="x981.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
@@ -192,13 +170,13 @@ ACCESSKEY="N"
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Functionals</TD
>What about Indexed Indirect?</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c953.html"
HREF="c916.html"
ACCESSKEY="U"
>Up</A
></TD
@@ -206,7 +184,7 @@ ACCESSKEY="U"
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Dispatch-on-type and Data-Directed Assembler</TD
>Conclusion</TD
></TR
></TABLE
></DIV

154
book/x981.html Normal file
View File

@@ -0,0 +1,154 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Conclusion</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Programming with Ophis"
HREF="book1.html"><LINK
REL="UP"
TITLE="Pointers and Indirection"
HREF="c916.html"><LINK
REL="PREVIOUS"
TITLE="Comparison with the other indexed forms"
HREF="x973.html"><LINK
REL="NEXT"
TITLE="Functionals"
HREF="c984.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Programming with Ophis</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x973.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Pointers and Indirection</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c984.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="AEN981"
>Conclusion</A
></H1
><P
> That's pretty much it for pointers. Though they tend to make
programs hairy, and learning how to properly deal with pointers is
what separates real C programmers from the novices, the basic
mechanics of them are not complex. With pointers you can do
efficient passing of large structures, pass-by-reference,
complicated return values, and dynamic memory management&#8212;and
now these wondrous toys may be added to your assembler programs,
too (assuming you have that kind of space to play with).
</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x973.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="c984.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Comparison with the other indexed forms</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c916.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Functionals</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

View File

@@ -21,10 +21,11 @@
<div id="header">
<nav>
<li class="fork"><a href="https://github.com/michaelcmartin/Ophis">GitHub Page</a></li>
<li class="fork"><a href="https://github.com/michaelcmartin/Ophis/blob/master/doc/ophismanual.pdf?raw=true">PDF Manual</a></li>
<li class="fork"><a href="https://github.com/michaelcmartin/Ophis/blob/v2.2/doc/ophismanual.pdf?raw=true">PDF Manual</a></li>
<li class="fork"><a href="book/book1.html">HTML Manual</a></li>
<li class="downloads"><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.1/Ophis-2.1.tgz">Mac and Linux</a></li>
<li class="downloads"><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.1/Ophis-2.1-win32-installer.exe">Windows</a></li>
<li class="downloads"><a href="https://pypi.org/project/ophis-asm/">PyPI Page</a></li>
<li class="downloads"><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.2/Ophis-2.2.tgz">Source Tarball</a></li>
<li class="downloads"><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.2/Ophis-2.2-win64-installer.exe">Windows</a></li>
<li class="title">DOWNLOADS</li>
</nav>
</div><!-- end header -->
@@ -47,22 +48,9 @@
<h2>Downloads</h2>
<ul>
<li><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.1/Ophis-2.1-win32-installer.exe">The
standalone Windows installer</a> will be what most people
want. All you need is this file. It contains all the
examples and documentation. You will probably want to add
the install directory to your PATH to make it easier to
invoke from the command-line.</li>
<li><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.1/Ophis-2.1.tgz">The
standalone script</a> is for systems that have Python
installed and want to keep Ophis as a set of personal
files. It requires Python 2.3 or later to be installed on
the target machine. (Python 3 will <i>not</i> work - Python
3 is effectively a separate language.) This will be the most
convenient choice for most users on Mac and Linux.</li>
<li>If you want to install with the distutils, a script is
part of the GitHub repository.</li>
</ul>
<li><a href="https://pypi.org/project/ophis-asm/">Ophis is on PyPI</a>. On any system with Python and Pip installed the command <code>pip install --user ophis-asm</code> (or whatever variations your local install demands) will install the latest version. It does not include the documentation or example code.</li>
<li><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.2/Ophis-2.2-support.zip">The documentation and sample code</a> is available as a separate download.</li>
<li><a href="https://github.com/michaelcmartin/Ophis/releases/download/v2.2/Ophis-2.2-win64-installer.exe">The standalone Windows installer</a> requires no additional software to be installed. It contains all the examples and documentation. You will probably want to add the install directory to your PATH to make it easier to invoke from the command-line.</li>
</section>
</div>