Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

M68K_002dSyntax.html 7.2KB

3 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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-Syntax (Using as)</title>
  16. <meta name="description" content="M68K-Syntax (Using as)">
  17. <meta name="keywords" content="M68K-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_002dMoto_002dSyntax.html#M68K_002dMoto_002dSyntax" rel="next" title="M68K-Moto-Syntax">
  26. <link href="M68K_002dOpts.html#M68K_002dOpts" rel="prev" title="M68K-Opts">
  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_002dSyntax"></a>
  57. <div class="header">
  58. <p>
  59. 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> &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="Syntax-17"></a>
  63. <h4 class="subsection">9.22.2 Syntax</h4>
  64. <a name="index-MIT"></a>
  65. <p>This syntax for the Motorola 680x0 was developed at <small>MIT</small>.
  66. </p>
  67. <a name="index-M680x0-syntax"></a>
  68. <a name="index-syntax_002c-M680x0"></a>
  69. <a name="index-M680x0-size-modifiers"></a>
  70. <a name="index-size-modifiers_002c-M680x0"></a>
  71. <p>The 680x0 version of <code>as</code> uses instructions names and
  72. syntax compatible with the Sun assembler. Intervening periods are
  73. ignored; for example, &lsquo;<samp>movl</samp>&rsquo; is equivalent to &lsquo;<samp>mov.l</samp>&rsquo;.
  74. </p>
  75. <p>In the following table <var>apc</var> stands for any of the address registers
  76. (&lsquo;<samp>%a0</samp>&rsquo; through &lsquo;<samp>%a7</samp>&rsquo;), the program counter (&lsquo;<samp>%pc</samp>&rsquo;), the
  77. zero-address relative to the program counter (&lsquo;<samp>%zpc</samp>&rsquo;), a suppressed
  78. address register (&lsquo;<samp>%za0</samp>&rsquo; through &lsquo;<samp>%za7</samp>&rsquo;), or it may be omitted
  79. entirely. The use of <var>size</var> means one of &lsquo;<samp>w</samp>&rsquo; or &lsquo;<samp>l</samp>&rsquo;, and
  80. it may be omitted, along with the leading colon, unless a scale is also
  81. specified. The use of <var>scale</var> means one of &lsquo;<samp>1</samp>&rsquo;, &lsquo;<samp>2</samp>&rsquo;,
  82. &lsquo;<samp>4</samp>&rsquo;, or &lsquo;<samp>8</samp>&rsquo;, and it may always be omitted along with the
  83. leading colon.
  84. </p>
  85. <a name="index-M680x0-addressing-modes"></a>
  86. <a name="index-addressing-modes_002c-M680x0"></a>
  87. <p>The following addressing modes are understood:
  88. </p><dl compact="compact">
  89. <dt><em>Immediate</em></dt>
  90. <dd><p>&lsquo;<samp>#<var>number</var></samp>&rsquo;
  91. </p>
  92. </dd>
  93. <dt><em>Data Register</em></dt>
  94. <dd><p>&lsquo;<samp>%d0</samp>&rsquo; through &lsquo;<samp>%d7</samp>&rsquo;
  95. </p>
  96. </dd>
  97. <dt><em>Address Register</em></dt>
  98. <dd><p>&lsquo;<samp>%a0</samp>&rsquo; through &lsquo;<samp>%a7</samp>&rsquo;<br>
  99. &lsquo;<samp>%a7</samp>&rsquo; is also known as &lsquo;<samp>%sp</samp>&rsquo;, i.e., the Stack Pointer. <code>%a6</code>
  100. is also known as &lsquo;<samp>%fp</samp>&rsquo;, the Frame Pointer.
  101. </p>
  102. </dd>
  103. <dt><em>Address Register Indirect</em></dt>
  104. <dd><p>&lsquo;<samp>%a0@</samp>&rsquo; through &lsquo;<samp>%a7@</samp>&rsquo;
  105. </p>
  106. </dd>
  107. <dt><em>Address Register Postincrement</em></dt>
  108. <dd><p>&lsquo;<samp>%a0@+</samp>&rsquo; through &lsquo;<samp>%a7@+</samp>&rsquo;
  109. </p>
  110. </dd>
  111. <dt><em>Address Register Predecrement</em></dt>
  112. <dd><p>&lsquo;<samp>%a0@-</samp>&rsquo; through &lsquo;<samp>%a7@-</samp>&rsquo;
  113. </p>
  114. </dd>
  115. <dt><em>Indirect Plus Offset</em></dt>
  116. <dd><p>&lsquo;<samp><var>apc</var>@(<var>number</var>)</samp>&rsquo;
  117. </p>
  118. </dd>
  119. <dt><em>Index</em></dt>
  120. <dd><p>&lsquo;<samp><var>apc</var>@(<var>number</var>,<var>register</var>:<var>size</var>:<var>scale</var>)</samp>&rsquo;
  121. </p>
  122. <p>The <var>number</var> may be omitted.
  123. </p>
  124. </dd>
  125. <dt><em>Postindex</em></dt>
  126. <dd><p>&lsquo;<samp><var>apc</var>@(<var>number</var>)@(<var>onumber</var>,<var>register</var>:<var>size</var>:<var>scale</var>)</samp>&rsquo;
  127. </p>
  128. <p>The <var>onumber</var> or the <var>register</var>, but not both, may be omitted.
  129. </p>
  130. </dd>
  131. <dt><em>Preindex</em></dt>
  132. <dd><p>&lsquo;<samp><var>apc</var>@(<var>number</var>,<var>register</var>:<var>size</var>:<var>scale</var>)@(<var>onumber</var>)</samp>&rsquo;
  133. </p>
  134. <p>The <var>number</var> may be omitted. Omitting the <var>register</var> produces
  135. the Postindex addressing mode.
  136. </p>
  137. </dd>
  138. <dt><em>Absolute</em></dt>
  139. <dd><p>&lsquo;<samp><var>symbol</var></samp>&rsquo;, or &lsquo;<samp><var>digits</var></samp>&rsquo;, optionally followed by
  140. &lsquo;<samp>:b</samp>&rsquo;, &lsquo;<samp>:w</samp>&rsquo;, or &lsquo;<samp>:l</samp>&rsquo;.
  141. </p></dd>
  142. </dl>
  143. <hr>
  144. <div class="header">
  145. <p>
  146. 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> &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>
  147. </div>
  148. </body>
  149. </html>