Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

M68K_002dMoto_002dSyntax.html 7.6KB

vor 3 Jahren
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>M68K-Moto-Syntax (Using as)</title>
  16. <meta name="description" content="M68K-Moto-Syntax (Using as)">
  17. <meta name="keywords" content="M68K-Moto-Syntax (Using as)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="M68K_002dDependent.html#M68K_002dDependent" rel="up" title="M68K-Dependent">
  25. <link href="M68K_002dFloat.html#M68K_002dFloat" rel="next" title="M68K-Float">
  26. <link href="M68K_002dSyntax.html#M68K_002dSyntax" rel="prev" title="M68K-Syntax">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="M68K_002dMoto_002dSyntax"></a>
  57. <div class="header">
  58. <p>
  59. 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> &nbsp; [<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>
  60. </div>
  61. <hr>
  62. <a name="Motorola-Syntax"></a>
  63. <h4 class="subsection">9.22.3 Motorola Syntax</h4>
  64. <a name="index-Motorola-syntax-for-the-680x0"></a>
  65. <a name="index-alternate-syntax-for-the-680x0"></a>
  66. <p>The standard Motorola syntax for this chip differs from the syntax
  67. already discussed (see <a href="M68K_002dSyntax.html#M68K_002dSyntax">Syntax</a>). <code>as</code> can
  68. accept Motorola syntax for operands, even if <small>MIT</small> syntax is used for
  69. other operands in the same instruction. The two kinds of syntax are
  70. fully compatible.
  71. </p>
  72. <p>In the following table <var>apc</var> stands for any of the address registers
  73. (&lsquo;<samp>%a0</samp>&rsquo; through &lsquo;<samp>%a7</samp>&rsquo;), the program counter (&lsquo;<samp>%pc</samp>&rsquo;), the
  74. zero-address relative to the program counter (&lsquo;<samp>%zpc</samp>&rsquo;), or a
  75. suppressed address register (&lsquo;<samp>%za0</samp>&rsquo; through &lsquo;<samp>%za7</samp>&rsquo;). The use
  76. of <var>size</var> means one of &lsquo;<samp>w</samp>&rsquo; or &lsquo;<samp>l</samp>&rsquo;, and it may always be
  77. omitted along with the leading dot. The use of <var>scale</var> means one of
  78. &lsquo;<samp>1</samp>&rsquo;, &lsquo;<samp>2</samp>&rsquo;, &lsquo;<samp>4</samp>&rsquo;, or &lsquo;<samp>8</samp>&rsquo;, and it may always be omitted
  79. along with the leading asterisk.
  80. </p>
  81. <p>The following additional addressing modes are understood:
  82. </p>
  83. <dl compact="compact">
  84. <dt><em>Address Register Indirect</em></dt>
  85. <dd><p>&lsquo;<samp>(%a0)</samp>&rsquo; through &lsquo;<samp>(%a7)</samp>&rsquo;<br>
  86. &lsquo;<samp>%a7</samp>&rsquo; is also known as &lsquo;<samp>%sp</samp>&rsquo;, i.e., the Stack Pointer. <code>%a6</code>
  87. is also known as &lsquo;<samp>%fp</samp>&rsquo;, the Frame Pointer.
  88. </p>
  89. </dd>
  90. <dt><em>Address Register Postincrement</em></dt>
  91. <dd><p>&lsquo;<samp>(%a0)+</samp>&rsquo; through &lsquo;<samp>(%a7)+</samp>&rsquo;
  92. </p>
  93. </dd>
  94. <dt><em>Address Register Predecrement</em></dt>
  95. <dd><p>&lsquo;<samp>-(%a0)</samp>&rsquo; through &lsquo;<samp>-(%a7)</samp>&rsquo;
  96. </p>
  97. </dd>
  98. <dt><em>Indirect Plus Offset</em></dt>
  99. <dd><p>&lsquo;<samp><var>number</var>(<var>%a0</var>)</samp>&rsquo; through &lsquo;<samp><var>number</var>(<var>%a7</var>)</samp>&rsquo;,
  100. or &lsquo;<samp><var>number</var>(<var>%pc</var>)</samp>&rsquo;.
  101. </p>
  102. <p>The <var>number</var> may also appear within the parentheses, as in
  103. &lsquo;<samp>(<var>number</var>,<var>%a0</var>)</samp>&rsquo;. When used with the <var>pc</var>, the
  104. <var>number</var> may be omitted (with an address register, omitting the
  105. <var>number</var> produces Address Register Indirect mode).
  106. </p>
  107. </dd>
  108. <dt><em>Index</em></dt>
  109. <dd><p>&lsquo;<samp><var>number</var>(<var>apc</var>,<var>register</var>.<var>size</var>*<var>scale</var>)</samp>&rsquo;
  110. </p>
  111. <p>The <var>number</var> may be omitted, or it may appear within the
  112. parentheses. The <var>apc</var> may be omitted. The <var>register</var> and the
  113. <var>apc</var> may appear in either order. If both <var>apc</var> and
  114. <var>register</var> are address registers, and the <var>size</var> and <var>scale</var>
  115. are omitted, then the first register is taken as the base register, and
  116. the second as the index register.
  117. </p>
  118. </dd>
  119. <dt><em>Postindex</em></dt>
  120. <dd><p>&lsquo;<samp>([<var>number</var>,<var>apc</var>],<var>register</var>.<var>size</var>*<var>scale</var>,<var>onumber</var>)</samp>&rsquo;
  121. </p>
  122. <p>The <var>onumber</var>, or the <var>register</var>, or both, may be omitted.
  123. Either the <var>number</var> or the <var>apc</var> may be omitted, but not both.
  124. </p>
  125. </dd>
  126. <dt><em>Preindex</em></dt>
  127. <dd><p>&lsquo;<samp>([<var>number</var>,<var>apc</var>,<var>register</var>.<var>size</var>*<var>scale</var>],<var>onumber</var>)</samp>&rsquo;
  128. </p>
  129. <p>The <var>number</var>, or the <var>apc</var>, or the <var>register</var>, or any two of
  130. them, may be omitted. The <var>onumber</var> may be omitted. The
  131. <var>register</var> and the <var>apc</var> may appear in either order. If both
  132. <var>apc</var> and <var>register</var> are address registers, and the <var>size</var>
  133. and <var>scale</var> are omitted, then the first register is taken as the
  134. base register, and the second as the index register.
  135. </p></dd>
  136. </dl>
  137. <hr>
  138. <div class="header">
  139. <p>
  140. 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> &nbsp; [<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>
  141. </div>
  142. </body>
  143. </html>