You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

215 lines
9.6KB

  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>M68HC11-Opts (Using as)</title>
  16. <meta name="description" content="M68HC11-Opts (Using as)">
  17. <meta name="keywords" content="M68HC11-Opts (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="M68HC11_002dDependent.html#M68HC11_002dDependent" rel="up" title="M68HC11-Dependent">
  25. <link href="M68HC11_002dSyntax.html#M68HC11_002dSyntax" rel="next" title="M68HC11-Syntax">
  26. <link href="M68HC11_002dDependent.html#M68HC11_002dDependent" rel="prev" title="M68HC11-Dependent">
  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="M68HC11_002dOpts"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="M68HC11_002dSyntax.html#M68HC11_002dSyntax" accesskey="n" rel="next">M68HC11-Syntax</a>, Up: <a href="M68HC11_002dDependent.html#M68HC11_002dDependent" accesskey="u" rel="up">M68HC11-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="M68HC11-and-M68HC12-Options"></a>
  63. <h4 class="subsection">9.23.1 M68HC11 and M68HC12 Options</h4>
  64. <a name="index-options_002c-M68HC11"></a>
  65. <a name="index-M68HC11-options"></a>
  66. <p>The Motorola 68HC11 and 68HC12 version of <code>as</code> have a few machine
  67. dependent options.
  68. </p>
  69. <dl compact="compact">
  70. <dd>
  71. <a name="index-_002dm68hc11"></a>
  72. </dd>
  73. <dt><code>-m68hc11</code></dt>
  74. <dd><p>This option switches the assembler into the M68HC11 mode. In this mode,
  75. the assembler only accepts 68HC11 operands and mnemonics. It produces
  76. code for the 68HC11.
  77. </p>
  78. <a name="index-_002dm68hc12"></a>
  79. </dd>
  80. <dt><code>-m68hc12</code></dt>
  81. <dd><p>This option switches the assembler into the M68HC12 mode. In this mode,
  82. the assembler also accepts 68HC12 operands and mnemonics. It produces
  83. code for the 68HC12. A few 68HC11 instructions are replaced by
  84. some 68HC12 instructions as recommended by Motorola specifications.
  85. </p>
  86. <a name="index-_002dm68hcs12"></a>
  87. </dd>
  88. <dt><code>-m68hcs12</code></dt>
  89. <dd><p>This option switches the assembler into the M68HCS12 mode. This mode is
  90. similar to &lsquo;<samp>-m68hc12</samp>&rsquo; but specifies to assemble for the 68HCS12
  91. series. The only difference is on the assembling of the &lsquo;<samp>movb</samp>&rsquo;
  92. and &lsquo;<samp>movw</samp>&rsquo; instruction when a PC-relative operand is used.
  93. </p>
  94. <a name="index-_002dmm9s12x"></a>
  95. </dd>
  96. <dt><code>-mm9s12x</code></dt>
  97. <dd><p>This option switches the assembler into the M9S12X mode. This mode is
  98. similar to &lsquo;<samp>-m68hc12</samp>&rsquo; but specifies to assemble for the S12X
  99. series which is a superset of the HCS12.
  100. </p>
  101. <a name="index-_002dmm9s12xg"></a>
  102. </dd>
  103. <dt><code>-mm9s12xg</code></dt>
  104. <dd><p>This option switches the assembler into the XGATE mode for the RISC
  105. co-processor featured on some S12X-family chips.
  106. </p>
  107. <a name="index-_002d_002dxgate_002dramoffset"></a>
  108. </dd>
  109. <dt><code>--xgate-ramoffset</code></dt>
  110. <dd><p>This option instructs the linker to offset RAM addresses from S12X address
  111. space into XGATE address space.
  112. </p>
  113. <a name="index-_002dmshort"></a>
  114. </dd>
  115. <dt><code>-mshort</code></dt>
  116. <dd><p>This option controls the ABI and indicates to use a 16-bit integer ABI.
  117. It has no effect on the assembled instructions.
  118. This is the default.
  119. </p>
  120. <a name="index-_002dmlong"></a>
  121. </dd>
  122. <dt><code>-mlong</code></dt>
  123. <dd><p>This option controls the ABI and indicates to use a 32-bit integer ABI.
  124. </p>
  125. <a name="index-_002dmshort_002ddouble"></a>
  126. </dd>
  127. <dt><code>-mshort-double</code></dt>
  128. <dd><p>This option controls the ABI and indicates to use a 32-bit float ABI.
  129. This is the default.
  130. </p>
  131. <a name="index-_002dmlong_002ddouble"></a>
  132. </dd>
  133. <dt><code>-mlong-double</code></dt>
  134. <dd><p>This option controls the ABI and indicates to use a 64-bit float ABI.
  135. </p>
  136. <a name="index-_002d_002dstrict_002ddirect_002dmode"></a>
  137. </dd>
  138. <dt><code>--strict-direct-mode</code></dt>
  139. <dd><p>You can use the &lsquo;<samp>--strict-direct-mode</samp>&rsquo; option to disable
  140. the automatic translation of direct page mode addressing into
  141. extended mode when the instruction does not support direct mode.
  142. For example, the &lsquo;<samp>clr</samp>&rsquo; instruction does not support direct page
  143. mode addressing. When it is used with the direct page mode,
  144. <code>as</code> will ignore it and generate an absolute addressing.
  145. This option prevents <code>as</code> from doing this, and the wrong
  146. usage of the direct page mode will raise an error.
  147. </p>
  148. <a name="index-_002d_002dshort_002dbranches"></a>
  149. </dd>
  150. <dt><code>--short-branches</code></dt>
  151. <dd><p>The &lsquo;<samp>--short-branches</samp>&rsquo; option turns off the translation of
  152. relative branches into absolute branches when the branch offset is
  153. out of range. By default <code>as</code> transforms the relative
  154. branch (&lsquo;<samp>bsr</samp>&rsquo;, &lsquo;<samp>bgt</samp>&rsquo;, &lsquo;<samp>bge</samp>&rsquo;, &lsquo;<samp>beq</samp>&rsquo;, &lsquo;<samp>bne</samp>&rsquo;,
  155. &lsquo;<samp>ble</samp>&rsquo;, &lsquo;<samp>blt</samp>&rsquo;, &lsquo;<samp>bhi</samp>&rsquo;, &lsquo;<samp>bcc</samp>&rsquo;, &lsquo;<samp>bls</samp>&rsquo;,
  156. &lsquo;<samp>bcs</samp>&rsquo;, &lsquo;<samp>bmi</samp>&rsquo;, &lsquo;<samp>bvs</samp>&rsquo;, &lsquo;<samp>bvs</samp>&rsquo;, &lsquo;<samp>bra</samp>&rsquo;) into
  157. an absolute branch when the offset is out of the -128 .. 127 range.
  158. In that case, the &lsquo;<samp>bsr</samp>&rsquo; instruction is translated into a
  159. &lsquo;<samp>jsr</samp>&rsquo;, the &lsquo;<samp>bra</samp>&rsquo; instruction is translated into a
  160. &lsquo;<samp>jmp</samp>&rsquo; and the conditional branches instructions are inverted and
  161. followed by a &lsquo;<samp>jmp</samp>&rsquo;. This option disables these translations
  162. and <code>as</code> will generate an error if a relative branch
  163. is out of range. This option does not affect the optimization
  164. associated to the &lsquo;<samp>jbra</samp>&rsquo;, &lsquo;<samp>jbsr</samp>&rsquo; and &lsquo;<samp>jbXX</samp>&rsquo; pseudo opcodes.
  165. </p>
  166. <a name="index-_002d_002dforce_002dlong_002dbranches"></a>
  167. </dd>
  168. <dt><code>--force-long-branches</code></dt>
  169. <dd><p>The &lsquo;<samp>--force-long-branches</samp>&rsquo; option forces the translation of
  170. relative branches into absolute branches. This option does not affect
  171. the optimization associated to the &lsquo;<samp>jbra</samp>&rsquo;, &lsquo;<samp>jbsr</samp>&rsquo; and
  172. &lsquo;<samp>jbXX</samp>&rsquo; pseudo opcodes.
  173. </p>
  174. <a name="index-_002d_002dprint_002dinsn_002dsyntax"></a>
  175. </dd>
  176. <dt><code>--print-insn-syntax</code></dt>
  177. <dd><p>You can use the &lsquo;<samp>--print-insn-syntax</samp>&rsquo; option to obtain the
  178. syntax description of the instruction when an error is detected.
  179. </p>
  180. <a name="index-_002d_002dprint_002dopcodes"></a>
  181. </dd>
  182. <dt><code>--print-opcodes</code></dt>
  183. <dd><p>The &lsquo;<samp>--print-opcodes</samp>&rsquo; option prints the list of all the
  184. instructions with their syntax. The first item of each line
  185. represents the instruction name and the rest of the line indicates
  186. the possible operands for that instruction. The list is printed
  187. in alphabetical order. Once the list is printed <code>as</code>
  188. exits.
  189. </p>
  190. <a name="index-_002d_002dgenerate_002dexample"></a>
  191. </dd>
  192. <dt><code>--generate-example</code></dt>
  193. <dd><p>The &lsquo;<samp>--generate-example</samp>&rsquo; option is similar to &lsquo;<samp>--print-opcodes</samp>&rsquo;
  194. but it generates an example for each instruction instead.
  195. </p></dd>
  196. </dl>
  197. <hr>
  198. <div class="header">
  199. <p>
  200. Next: <a href="M68HC11_002dSyntax.html#M68HC11_002dSyntax" accesskey="n" rel="next">M68HC11-Syntax</a>, Up: <a href="M68HC11_002dDependent.html#M68HC11_002dDependent" accesskey="u" rel="up">M68HC11-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>
  201. </div>
  202. </body>
  203. </html>