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.
156 lines
7.6 KiB
HTML
156 lines
7.6 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<!-- This file documents the GNU Assembler "as".
|
|
|
|
Copyright (C) 1991-2019 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.3
|
|
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".
|
|
-->
|
|
<!-- Created by GNU Texinfo 6.4, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>M68K-Moto-Syntax (Using as)</title>
|
|
|
|
<meta name="description" content="M68K-Moto-Syntax (Using as)">
|
|
<meta name="keywords" content="M68K-Moto-Syntax (Using as)">
|
|
<meta name="resource-type" content="document">
|
|
<meta name="distribution" content="global">
|
|
<meta name="Generator" content="makeinfo">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<link href="index.html#Top" rel="start" title="Top">
|
|
<link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
|
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
|
<link href="M68K_002dDependent.html#M68K_002dDependent" rel="up" title="M68K-Dependent">
|
|
<link href="M68K_002dFloat.html#M68K_002dFloat" rel="next" title="M68K-Float">
|
|
<link href="M68K_002dSyntax.html#M68K_002dSyntax" rel="prev" title="M68K-Syntax">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
div.smalllisp {margin-left: 3.2em}
|
|
kbd {font-style: oblique}
|
|
pre.display {font-family: inherit}
|
|
pre.format {font-family: inherit}
|
|
pre.menu-comment {font-family: serif}
|
|
pre.menu-preformatted {font-family: serif}
|
|
pre.smalldisplay {font-family: inherit; font-size: smaller}
|
|
pre.smallexample {font-size: smaller}
|
|
pre.smallformat {font-family: inherit; font-size: smaller}
|
|
pre.smalllisp {font-size: smaller}
|
|
span.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="M68K_002dMoto_002dSyntax"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="M68K_002dFloat.html#M68K_002dFloat" accesskey="n" rel="next">M68K-Float</a>, Previous: <a href="M68K_002dSyntax.html#M68K_002dSyntax" accesskey="p" rel="prev">M68K-Syntax</a>, Up: <a href="M68K_002dDependent.html#M68K_002dDependent" accesskey="u" rel="up">M68K-Dependent</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<a name="Motorola-Syntax"></a>
|
|
<h4 class="subsection">9.21.3 Motorola Syntax</h4>
|
|
|
|
<a name="index-Motorola-syntax-for-the-680x0"></a>
|
|
<a name="index-alternate-syntax-for-the-680x0"></a>
|
|
|
|
<p>The standard Motorola syntax for this chip differs from the syntax
|
|
already discussed (see <a href="M68K_002dSyntax.html#M68K_002dSyntax">Syntax</a>). <code>as</code> can
|
|
accept Motorola syntax for operands, even if <small>MIT</small> syntax is used for
|
|
other operands in the same instruction. The two kinds of syntax are
|
|
fully compatible.
|
|
</p>
|
|
<p>In the following table <var>apc</var> stands for any of the address registers
|
|
(‘<samp>%a0</samp>’ through ‘<samp>%a7</samp>’), the program counter (‘<samp>%pc</samp>’), the
|
|
zero-address relative to the program counter (‘<samp>%zpc</samp>’), or a
|
|
suppressed address register (‘<samp>%za0</samp>’ through ‘<samp>%za7</samp>’). The use
|
|
of <var>size</var> means one of ‘<samp>w</samp>’ or ‘<samp>l</samp>’, and it may always be
|
|
omitted along with the leading dot. The use of <var>scale</var> means one of
|
|
‘<samp>1</samp>’, ‘<samp>2</samp>’, ‘<samp>4</samp>’, or ‘<samp>8</samp>’, and it may always be omitted
|
|
along with the leading asterisk.
|
|
</p>
|
|
<p>The following additional addressing modes are understood:
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt><em>Address Register Indirect</em></dt>
|
|
<dd><p>‘<samp>(%a0)</samp>’ through ‘<samp>(%a7)</samp>’<br>
|
|
‘<samp>%a7</samp>’ is also known as ‘<samp>%sp</samp>’, i.e., the Stack Pointer. <code>%a6</code>
|
|
is also known as ‘<samp>%fp</samp>’, the Frame Pointer.
|
|
</p>
|
|
</dd>
|
|
<dt><em>Address Register Postincrement</em></dt>
|
|
<dd><p>‘<samp>(%a0)+</samp>’ through ‘<samp>(%a7)+</samp>’
|
|
</p>
|
|
</dd>
|
|
<dt><em>Address Register Predecrement</em></dt>
|
|
<dd><p>‘<samp>-(%a0)</samp>’ through ‘<samp>-(%a7)</samp>’
|
|
</p>
|
|
</dd>
|
|
<dt><em>Indirect Plus Offset</em></dt>
|
|
<dd><p>‘<samp><var>number</var>(<var>%a0</var>)</samp>’ through ‘<samp><var>number</var>(<var>%a7</var>)</samp>’,
|
|
or ‘<samp><var>number</var>(<var>%pc</var>)</samp>’.
|
|
</p>
|
|
<p>The <var>number</var> may also appear within the parentheses, as in
|
|
‘<samp>(<var>number</var>,<var>%a0</var>)</samp>’. When used with the <var>pc</var>, the
|
|
<var>number</var> may be omitted (with an address register, omitting the
|
|
<var>number</var> produces Address Register Indirect mode).
|
|
</p>
|
|
</dd>
|
|
<dt><em>Index</em></dt>
|
|
<dd><p>‘<samp><var>number</var>(<var>apc</var>,<var>register</var>.<var>size</var>*<var>scale</var>)</samp>’
|
|
</p>
|
|
<p>The <var>number</var> may be omitted, or it may appear within the
|
|
parentheses. The <var>apc</var> may be omitted. The <var>register</var> and the
|
|
<var>apc</var> may appear in either order. If both <var>apc</var> and
|
|
<var>register</var> are address registers, and the <var>size</var> and <var>scale</var>
|
|
are omitted, then the first register is taken as the base register, and
|
|
the second as the index register.
|
|
</p>
|
|
</dd>
|
|
<dt><em>Postindex</em></dt>
|
|
<dd><p>‘<samp>([<var>number</var>,<var>apc</var>],<var>register</var>.<var>size</var>*<var>scale</var>,<var>onumber</var>)</samp>’
|
|
</p>
|
|
<p>The <var>onumber</var>, or the <var>register</var>, or both, may be omitted.
|
|
Either the <var>number</var> or the <var>apc</var> may be omitted, but not both.
|
|
</p>
|
|
</dd>
|
|
<dt><em>Preindex</em></dt>
|
|
<dd><p>‘<samp>([<var>number</var>,<var>apc</var>,<var>register</var>.<var>size</var>*<var>scale</var>],<var>onumber</var>)</samp>’
|
|
</p>
|
|
<p>The <var>number</var>, or the <var>apc</var>, or the <var>register</var>, or any two of
|
|
them, may be omitted. The <var>onumber</var> may be omitted. The
|
|
<var>register</var> and the <var>apc</var> may appear in either order. If both
|
|
<var>apc</var> and <var>register</var> are address registers, and the <var>size</var>
|
|
and <var>scale</var> are omitted, then the first register is taken as the
|
|
base register, and the second as the index register.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="M68K_002dFloat.html#M68K_002dFloat" accesskey="n" rel="next">M68K-Float</a>, Previous: <a href="M68K_002dSyntax.html#M68K_002dSyntax" accesskey="p" rel="prev">M68K-Syntax</a>, Up: <a href="M68K_002dDependent.html#M68K_002dDependent" accesskey="u" rel="up">M68K-Dependent</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|