mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2025-01-05 03:32:05 +00:00
309 lines
5.0 KiB
HTML
309 lines
5.0 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Basic arguments</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="Ophis Command Reference"
|
|
HREF="a505.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Ophis Command Reference"
|
|
HREF="a505.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Compound Arguments"
|
|
HREF="x620.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="a505.html"
|
|
ACCESSKEY="P"
|
|
><<< Previous</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Ophis Command Reference</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x620.html"
|
|
ACCESSKEY="N"
|
|
>Next >>></A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECTION"
|
|
><H1
|
|
CLASS="SECTION"
|
|
><A
|
|
NAME="AEN572"
|
|
>Basic arguments</A
|
|
></H1
|
|
><P
|
|
> Most arguments are just a number or label. The formats for
|
|
these are below.
|
|
</P
|
|
><DIV
|
|
CLASS="SECTION"
|
|
><H2
|
|
CLASS="SECTION"
|
|
><A
|
|
NAME="AEN575"
|
|
>Numeric types</A
|
|
></H2
|
|
><P
|
|
></P
|
|
><UL
|
|
><LI
|
|
><P
|
|
><I
|
|
CLASS="EMPHASIS"
|
|
>Hex:</I
|
|
> <TT
|
|
CLASS="LITERAL"
|
|
>$41</TT
|
|
> (Prefixed with $)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><I
|
|
CLASS="EMPHASIS"
|
|
>Decimal:</I
|
|
> <TT
|
|
CLASS="LITERAL"
|
|
>65</TT
|
|
> (No markings)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><I
|
|
CLASS="EMPHASIS"
|
|
>Octal:</I
|
|
> <TT
|
|
CLASS="LITERAL"
|
|
>0101</TT
|
|
> (Prefixed with zero)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><I
|
|
CLASS="EMPHASIS"
|
|
>Binary:</I
|
|
> <TT
|
|
CLASS="LITERAL"
|
|
>%01000001</TT
|
|
> (Prefixed with %)</P
|
|
></LI
|
|
><LI
|
|
><P
|
|
><I
|
|
CLASS="EMPHASIS"
|
|
>Character:</I
|
|
> <TT
|
|
CLASS="LITERAL"
|
|
>'A</TT
|
|
> (Prefixed with single quote)</P
|
|
></LI
|
|
></UL
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECTION"
|
|
><H2
|
|
CLASS="SECTION"
|
|
><A
|
|
NAME="AEN598"
|
|
>Label types</A
|
|
></H2
|
|
><P
|
|
> Normal labels are simply referred to by name. Anonymous
|
|
labels may be referenced with strings of - or + signs (the
|
|
label <TT
|
|
CLASS="LITERAL"
|
|
>-</TT
|
|
> refers to the immediate
|
|
previous anonymous label, <TT
|
|
CLASS="LITERAL"
|
|
>--</TT
|
|
> the
|
|
one before that, etc., while <TT
|
|
CLASS="LITERAL"
|
|
>+</TT
|
|
>
|
|
refers to the next anonymous label), and the special
|
|
label <TT
|
|
CLASS="LITERAL"
|
|
>^</TT
|
|
> refers to the program
|
|
counter at the start of the current instruction or directive.
|
|
</P
|
|
><P
|
|
> Normal labels are <I
|
|
CLASS="EMPHASIS"
|
|
>defined</I
|
|
> by
|
|
prefixing a line with the label name and then a colon
|
|
(e.g., <TT
|
|
CLASS="LITERAL"
|
|
>label:</TT
|
|
>). Anonymous labels
|
|
are defined by prefixing a line with an asterisk
|
|
(e.g., <TT
|
|
CLASS="LITERAL"
|
|
>*</TT
|
|
>).
|
|
</P
|
|
><P
|
|
> Temporary labels are only reachable from inside the
|
|
innermost enclosing <TT
|
|
CLASS="LITERAL"
|
|
>.scope</TT
|
|
>
|
|
statement. They are identical to normal labels in every
|
|
way, except that they start with an underscore.
|
|
</P
|
|
></DIV
|
|
><DIV
|
|
CLASS="SECTION"
|
|
><H2
|
|
CLASS="SECTION"
|
|
><A
|
|
NAME="AEN611"
|
|
>String types</A
|
|
></H2
|
|
><P
|
|
> Strings are enclosed in double quotation marks. Backslashed
|
|
characters (including backslashes and double quotes) are
|
|
treated literally, so the string <TT
|
|
CLASS="LITERAL"
|
|
>"The man said,
|
|
\"The \\ character is the backslash.\""</TT
|
|
> produces
|
|
the ASCII sequence for <TT
|
|
CLASS="LITERAL"
|
|
>The man said, "The \
|
|
character is the backslash."</TT
|
|
>
|
|
</P
|
|
><P
|
|
> Strings are generally only used as arguments to assembler
|
|
directives—usually for filenames
|
|
(e.g., <TT
|
|
CLASS="LITERAL"
|
|
>.include</TT
|
|
>) but also for string
|
|
data (in association with <TT
|
|
CLASS="LITERAL"
|
|
>.byte</TT
|
|
>).
|
|
</P
|
|
><P
|
|
> It is legal, though unusual, to attempt to pass a string to
|
|
the other data statements. This will produces a series of
|
|
words/dwords where all bytes that aren't least-significant
|
|
are zero. Endianness and size will match what the directive
|
|
itself indicated.
|
|
</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="a505.html"
|
|
ACCESSKEY="P"
|
|
><<< 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="x620.html"
|
|
ACCESSKEY="N"
|
|
>Next >>></A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Ophis Command Reference</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="a505.html"
|
|
ACCESSKEY="U"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>Compound Arguments</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |