Ophis/site/manual/x225.html

203 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Aliasing</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="Labels and aliases"
HREF="c200.html"><LINK
REL="PREVIOUS"
TITLE="Anonymous labels"
HREF="x214.html"><LINK
REL="NEXT"
TITLE="Headers, Libraries, and Macros"
HREF="c236.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="x214.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Labels and aliases</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="c236.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="AEN225"
>Aliasing</A
></H1
><P
> Rather the reverse of anonymous labels, aliases are names
given to specific memory locations. These make it easier to
keep track of important constants or locations. The KERNAL
routines are a good example of constants that deserve names.
To assign the traditional name <TT
CLASS="LITERAL"
>chrout</TT
> to
the routine at $FFD2, simply give the directive:
</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>.alias chrout $ffd2</PRE
></TD
></TR
></TABLE
><P
>And change the <KBD
CLASS="USERINPUT"
>jsr</KBD
> command
to:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> jsr chrout</PRE
></TD
></TR
></TABLE
><P
> The final version of the code is in <A
HREF="x461.html"
><I
><I
>tutor2.oph</I
></I
></A
>. It should
assemble to exactly the same program as <A
HREF="a454.html#TUTOR1-SRC"
><I
><I
>tutor1.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="x214.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="c236.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Anonymous labels</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c200.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Headers, Libraries, and Macros</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>