neingeist
/
arduinisten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

102 lines
5.9 KiB
HTML

<html lang="en">
<head>
<title>M68K-Syntax - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="M68K_002dDependent.html#M68K_002dDependent" title="M68K-Dependent">
<link rel="prev" href="M68K_002dOpts.html#M68K_002dOpts" title="M68K-Opts">
<link rel="next" href="M68K_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax" title="M68K-Moto-Syntax">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
2006, 2007 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
man end-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="M68K_002dSyntax"></a>Next:&nbsp;<a rel="next" accesskey="n" href="M68K_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax">M68K-Moto-Syntax</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="M68K_002dOpts.html#M68K_002dOpts">M68K-Opts</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="M68K_002dDependent.html#M68K_002dDependent">M68K-Dependent</a>
<hr><br>
</div>
<h4 class="subsection">9.20.2 Syntax</h4>
<p><a name="index-_0040sc_007bmit_007d-1107"></a>This syntax for the Motorola 680x0 was developed at <span class="sc">mit</span>.
<p><a name="index-M680x0-syntax-1108"></a><a name="index-syntax_002c-M680x0-1109"></a><a name="index-M680x0-size-modifiers-1110"></a><a name="index-size-modifiers_002c-M680x0-1111"></a>The 680x0 version of <code>as</code> uses instructions names and
syntax compatible with the Sun assembler. Intervening periods are
ignored; for example, <span class="samp">movl</span> is equivalent to <span class="samp">mov.l</span>.
<p>In the following table <var>apc</var> stands for any of the address registers
(<span class="samp">%a0</span> through <span class="samp">%a7</span>), the program counter (<span class="samp">%pc</span>), the
zero-address relative to the program counter (<span class="samp">%zpc</span>), a suppressed
address register (<span class="samp">%za0</span> through <span class="samp">%za7</span>), or it may be omitted
entirely. The use of <var>size</var> means one of <span class="samp">w</span> or <span class="samp">l</span>, and
it may be omitted, along with the leading colon, unless a scale is also
specified. The use of <var>scale</var> means one of <span class="samp">1</span>, <span class="samp">2</span>,
<span class="samp">4</span>, or <span class="samp">8</span>, and it may always be omitted along with the
leading colon.
<p><a name="index-M680x0-addressing-modes-1112"></a><a name="index-addressing-modes_002c-M680x0-1113"></a>The following addressing modes are understood:
<dl>
<dt><dfn>Immediate</dfn><dd><span class="samp">#</span><var>number</var>
<br><dt><dfn>Data Register</dfn><dd><span class="samp">%d0</span> through <span class="samp">%d7</span>
<br><dt><dfn>Address Register</dfn><dd><span class="samp">%a0</span> through <span class="samp">%a7</span><br>
<span class="samp">%a7</span> is also known as <span class="samp">%sp</span>, i.e., the Stack Pointer. <code>%a6</code>
is also known as <span class="samp">%fp</span>, the Frame Pointer.
<br><dt><dfn>Address Register Indirect</dfn><dd><span class="samp">%a0@</span> through <span class="samp">%a7@</span>
<br><dt><dfn>Address Register Postincrement</dfn><dd><span class="samp">%a0@+</span> through <span class="samp">%a7@+</span>
<br><dt><dfn>Address Register Predecrement</dfn><dd><span class="samp">%a0@-</span> through <span class="samp">%a7@-</span>
<br><dt><dfn>Indirect Plus Offset</dfn><dd><var>apc</var><span class="samp">@(</span><var>number</var><span class="samp">)</span>
<br><dt><dfn>Index</dfn><dd><var>apc</var><span class="samp">@(</span><var>number</var><span class="samp">,</span><var>register</var><span class="samp">:</span><var>size</var><span class="samp">:</span><var>scale</var><span class="samp">)</span>
<p>The <var>number</var> may be omitted.
<br><dt><dfn>Postindex</dfn><dd><var>apc</var><span class="samp">@(</span><var>number</var><span class="samp">)@(</span><var>onumber</var><span class="samp">,</span><var>register</var><span class="samp">:</span><var>size</var><span class="samp">:</span><var>scale</var><span class="samp">)</span>
<p>The <var>onumber</var> or the <var>register</var>, but not both, may be omitted.
<br><dt><dfn>Preindex</dfn><dd><var>apc</var><span class="samp">@(</span><var>number</var><span class="samp">,</span><var>register</var><span class="samp">:</span><var>size</var><span class="samp">:</span><var>scale</var><span class="samp">)@(</span><var>onumber</var><span class="samp">)</span>
<p>The <var>number</var> may be omitted. Omitting the <var>register</var> produces
the Postindex addressing mode.
<br><dt><dfn>Absolute</dfn><dd><var>symbol</var>, or <var>digits</var>, optionally followed by
<span class="samp">:b</span>, <span class="samp">:w</span>, or <span class="samp">:l</span>.
</dl>
</body></html>