Ophis/site/manual/x119.html

206 lines
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Related commands and options</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="The basics"
HREF="c35.html"><LINK
REL="PREVIOUS"
TITLE="Producing Commodore 64 programs"
HREF="x51.html"><LINK
REL="NEXT"
TITLE="Writing the actual code"
HREF="x140.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="x51.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>The basics</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x140.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="AEN119"
>Related commands and options</A
></H1
><P
> This code includes constants that are both in decimal and in
hex. It is also possible to specify constants in octal, binary,
or with an ASCII character.
<P
></P
><UL
><LI
><P
>To specify decimal constants, simply write the number.</P
></LI
><LI
><P
>To specify hexadecimal constants, put a $ in front.</P
></LI
><LI
><P
>To specify octal constants, put a 0 (zero) in front.</P
></LI
><LI
><P
>To specify binary constants, put a % in front.</P
></LI
><LI
><P
>To specify ASCII constants, put an apostrophe in front.</P
></LI
></UL
>
Example: 65 = $41 = 0101 = %1000001 = 'A
</P
><P
> There are other commands besides <TT
CLASS="LITERAL"
>.byte</TT
>
and <TT
CLASS="LITERAL"
>.word</TT
> to specify data. In particular,
the <TT
CLASS="LITERAL"
>.dword</TT
> command specifies four-byte values
which some applications will find useful. Also, some linking
formats (such as the <TT
CLASS="FILENAME"
>SID</TT
> format) have
header data in big-endian (high byte first) format.
The <TT
CLASS="LITERAL"
>.wordbe</TT
> and <TT
CLASS="LITERAL"
>.dwordbe</TT
>
directives provide a way to specify multibyte constants in
big-endian formats cleanly.
</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="x51.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="x140.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Producing Commodore 64 programs</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c35.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Writing the actual code</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>