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.
161 lines
7.2 KiB
HTML
161 lines
7.2 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-Syntax (Using as)</title>
|
|
|
|
<meta name="description" content="M68K-Syntax (Using as)">
|
|
<meta name="keywords" content="M68K-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_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax" rel="next" title="M68K-Moto-Syntax">
|
|
<link href="M68K_002dOpts.html#M68K_002dOpts" rel="prev" title="M68K-Opts">
|
|
<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_002dSyntax"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="M68K_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax" accesskey="n" rel="next">M68K-Moto-Syntax</a>, Previous: <a href="M68K_002dOpts.html#M68K_002dOpts" accesskey="p" rel="prev">M68K-Opts</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="Syntax-16"></a>
|
|
<h4 class="subsection">9.21.2 Syntax</h4>
|
|
|
|
<a name="index-MIT"></a>
|
|
<p>This syntax for the Motorola 680x0 was developed at <small>MIT</small>.
|
|
</p>
|
|
<a name="index-M680x0-syntax"></a>
|
|
<a name="index-syntax_002c-M680x0"></a>
|
|
<a name="index-M680x0-size-modifiers"></a>
|
|
<a name="index-size-modifiers_002c-M680x0"></a>
|
|
<p>The 680x0 version of <code>as</code> uses instructions names and
|
|
syntax compatible with the Sun assembler. Intervening periods are
|
|
ignored; for example, ‘<samp>movl</samp>’ is equivalent to ‘<samp>mov.l</samp>’.
|
|
</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>’), a suppressed
|
|
address register (‘<samp>%za0</samp>’ through ‘<samp>%za7</samp>’), or it may be omitted
|
|
entirely. The use of <var>size</var> means one of ‘<samp>w</samp>’ or ‘<samp>l</samp>’, 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 ‘<samp>1</samp>’, ‘<samp>2</samp>’,
|
|
‘<samp>4</samp>’, or ‘<samp>8</samp>’, and it may always be omitted along with the
|
|
leading colon.
|
|
</p>
|
|
<a name="index-M680x0-addressing-modes"></a>
|
|
<a name="index-addressing-modes_002c-M680x0"></a>
|
|
<p>The following addressing modes are understood:
|
|
</p><dl compact="compact">
|
|
<dt><em>Immediate</em></dt>
|
|
<dd><p>‘<samp>#<var>number</var></samp>’
|
|
</p>
|
|
</dd>
|
|
<dt><em>Data Register</em></dt>
|
|
<dd><p>‘<samp>%d0</samp>’ through ‘<samp>%d7</samp>’
|
|
</p>
|
|
</dd>
|
|
<dt><em>Address Register</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 Indirect</em></dt>
|
|
<dd><p>‘<samp>%a0@</samp>’ through ‘<samp>%a7@</samp>’
|
|
</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>apc</var>@(<var>number</var>)</samp>’
|
|
</p>
|
|
</dd>
|
|
<dt><em>Index</em></dt>
|
|
<dd><p>‘<samp><var>apc</var>@(<var>number</var>,<var>register</var>:<var>size</var>:<var>scale</var>)</samp>’
|
|
</p>
|
|
<p>The <var>number</var> may be omitted.
|
|
</p>
|
|
</dd>
|
|
<dt><em>Postindex</em></dt>
|
|
<dd><p>‘<samp><var>apc</var>@(<var>number</var>)@(<var>onumber</var>,<var>register</var>:<var>size</var>:<var>scale</var>)</samp>’
|
|
</p>
|
|
<p>The <var>onumber</var> or the <var>register</var>, but not both, may be omitted.
|
|
</p>
|
|
</dd>
|
|
<dt><em>Preindex</em></dt>
|
|
<dd><p>‘<samp><var>apc</var>@(<var>number</var>,<var>register</var>:<var>size</var>:<var>scale</var>)@(<var>onumber</var>)</samp>’
|
|
</p>
|
|
<p>The <var>number</var> may be omitted. Omitting the <var>register</var> produces
|
|
the Postindex addressing mode.
|
|
</p>
|
|
</dd>
|
|
<dt><em>Absolute</em></dt>
|
|
<dd><p>‘<samp><var>symbol</var></samp>’, or ‘<samp><var>digits</var></samp>’, optionally followed by
|
|
‘<samp>:b</samp>’, ‘<samp>:w</samp>’, or ‘<samp>:l</samp>’.
|
|
</p></dd>
|
|
</dl>
|
|
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="M68K_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax" accesskey="n" rel="next">M68K-Moto-Syntax</a>, Previous: <a href="M68K_002dOpts.html#M68K_002dOpts" accesskey="p" rel="prev">M68K-Opts</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>
|