| <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.13"> | |
| <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, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | |
| 2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010, 2011 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''. | |
| --> | |
| <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; } | |
| span.sansserif { font-family:sans-serif; font-weight:normal; } | |
| --></style> | |
| </head> | |
| <body> | |
| <div class="node"> | |
| <a name="M68K-Syntax"></a> | |
| <a name="M68K_002dSyntax"></a> | |
| <p> | |
| Next: <a rel="next" accesskey="n" href="M68K_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax">M68K-Moto-Syntax</a>, | |
| Previous: <a rel="previous" accesskey="p" href="M68K_002dOpts.html#M68K_002dOpts">M68K-Opts</a>, | |
| Up: <a rel="up" accesskey="u" href="M68K_002dDependent.html#M68K_002dDependent">M68K-Dependent</a> | |
| <hr> | |
| </div> | |
| <h4 class="subsection">9.23.2 Syntax</h4> | |
| <p><a name="index-g_t_0040sc_007bmit_007d-1257"></a>This syntax for the Motorola 680x0 was developed at <span class="sc">mit</span>. | |
| <p><a name="index-M680x0-syntax-1258"></a><a name="index-syntax_002c-M680x0-1259"></a><a name="index-M680x0-size-modifiers-1260"></a><a name="index-size-modifiers_002c-M680x0-1261"></a>The 680x0 version of <code>as</code> uses instructions names and | |
| syntax compatible with the Sun assembler. Intervening periods are | |
| ignored; for example, ‘<samp><span class="samp">movl</span></samp>’ is equivalent to ‘<samp><span class="samp">mov.l</span></samp>’. | |
| <p>In the following table <var>apc</var> stands for any of the address registers | |
| (‘<samp><span class="samp">%a0</span></samp>’ through ‘<samp><span class="samp">%a7</span></samp>’), the program counter (‘<samp><span class="samp">%pc</span></samp>’), the | |
| zero-address relative to the program counter (‘<samp><span class="samp">%zpc</span></samp>’), a suppressed | |
| address register (‘<samp><span class="samp">%za0</span></samp>’ through ‘<samp><span class="samp">%za7</span></samp>’), or it may be omitted | |
| entirely. The use of <var>size</var> means one of ‘<samp><span class="samp">w</span></samp>’ or ‘<samp><span class="samp">l</span></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><span class="samp">1</span></samp>’, ‘<samp><span class="samp">2</span></samp>’, | |
| ‘<samp><span class="samp">4</span></samp>’, or ‘<samp><span class="samp">8</span></samp>’, and it may always be omitted along with the | |
| leading colon. | |
| <p><a name="index-M680x0-addressing-modes-1262"></a><a name="index-addressing-modes_002c-M680x0-1263"></a>The following addressing modes are understood: | |
| <dl> | |
| <dt><dfn>Immediate</dfn><dd>‘<samp><span class="samp">#</span><var>number</var></samp>’ | |
| <br><dt><dfn>Data Register</dfn><dd>‘<samp><span class="samp">%d0</span></samp>’ through ‘<samp><span class="samp">%d7</span></samp>’ | |
| <br><dt><dfn>Address Register</dfn><dd>‘<samp><span class="samp">%a0</span></samp>’ through ‘<samp><span class="samp">%a7</span></samp>’<br> | |
| ‘<samp><span class="samp">%a7</span></samp>’ is also known as ‘<samp><span class="samp">%sp</span></samp>’, i.e., the Stack Pointer. <code>%a6</code> | |
| is also known as ‘<samp><span class="samp">%fp</span></samp>’, the Frame Pointer. | |
| <br><dt><dfn>Address Register Indirect</dfn><dd>‘<samp><span class="samp">%a0@</span></samp>’ through ‘<samp><span class="samp">%a7@</span></samp>’ | |
| <br><dt><dfn>Address Register Postincrement</dfn><dd>‘<samp><span class="samp">%a0@+</span></samp>’ through ‘<samp><span class="samp">%a7@+</span></samp>’ | |
| <br><dt><dfn>Address Register Predecrement</dfn><dd>‘<samp><span class="samp">%a0@-</span></samp>’ through ‘<samp><span class="samp">%a7@-</span></samp>’ | |
| <br><dt><dfn>Indirect Plus Offset</dfn><dd>‘<samp><var>apc</var><span class="samp">@(</span><var>number</var><span class="samp">)</span></samp>’ | |
| <br><dt><dfn>Index</dfn><dd>‘<samp><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></samp>’ | |
| <p>The <var>number</var> may be omitted. | |
| <br><dt><dfn>Postindex</dfn><dd>‘<samp><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></samp>’ | |
| <p>The <var>onumber</var> or the <var>register</var>, but not both, may be omitted. | |
| <br><dt><dfn>Preindex</dfn><dd>‘<samp><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></samp>’ | |
| <p>The <var>number</var> may be omitted. Omitting the <var>register</var> produces | |
| the Postindex addressing mode. | |
| <br><dt><dfn>Absolute</dfn><dd>‘<samp><var>symbol</var></samp>’, or ‘<samp><var>digits</var></samp>’, optionally followed by | |
| ‘<samp><span class="samp">:b</span></samp>’, ‘<samp><span class="samp">:w</span></samp>’, or ‘<samp><span class="samp">:l</span></samp>’. | |
| </dl> | |
| </body></html> | |