M68HC11_002dOpts.html 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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-2017 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 5.2, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <title>Using as: M68HC11-Opts</title>
  15. <meta name="description" content="Using as: M68HC11-Opts">
  16. <meta name="keywords" content="Using as: M68HC11-Opts">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  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.smallquotation {font-size: smaller}
  31. div.display {margin-left: 3.2em}
  32. div.example {margin-left: 3.2em}
  33. div.indentedblock {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  37. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  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.nocodebreak {white-space:nowrap}
  49. span.nolinebreak {white-space:nowrap}
  50. span.roman {font-family:serif; font-weight:normal}
  51. span.sansserif {font-family:sans-serif; font-weight:normal}
  52. ul.no-bullet {list-style: none}
  53. -->
  54. </style>
  55. </head>
  56. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  57. <a name="M68HC11_002dOpts"></a>
  58. <div class="header">
  59. <p>
  60. 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>
  61. </div>
  62. <hr>
  63. <a name="M68HC11-and-M68HC12-Options"></a>
  64. <h4 class="subsection">9.24.1 M68HC11 and M68HC12 Options</h4>
  65. <a name="index-options_002c-M68HC11"></a>
  66. <a name="index-M68HC11-options"></a>
  67. <p>The Motorola 68HC11 and 68HC12 version of <code>as</code> have a few machine
  68. dependent options.
  69. </p>
  70. <dl compact="compact">
  71. <dd>
  72. <a name="index-_002dm68hc11"></a>
  73. </dd>
  74. <dt><code>-m68hc11</code></dt>
  75. <dd><p>This option switches the assembler into the M68HC11 mode. In this mode,
  76. the assembler only accepts 68HC11 operands and mnemonics. It produces
  77. code for the 68HC11.
  78. </p>
  79. <a name="index-_002dm68hc12"></a>
  80. </dd>
  81. <dt><code>-m68hc12</code></dt>
  82. <dd><p>This option switches the assembler into the M68HC12 mode. In this mode,
  83. the assembler also accepts 68HC12 operands and mnemonics. It produces
  84. code for the 68HC12. A few 68HC11 instructions are replaced by
  85. some 68HC12 instructions as recommended by Motorola specifications.
  86. </p>
  87. <a name="index-_002dm68hcs12"></a>
  88. </dd>
  89. <dt><code>-m68hcs12</code></dt>
  90. <dd><p>This option switches the assembler into the M68HCS12 mode. This mode is
  91. similar to &lsquo;<samp>-m68hc12</samp>&rsquo; but specifies to assemble for the 68HCS12
  92. series. The only difference is on the assembling of the &lsquo;<samp>movb</samp>&rsquo;
  93. and &lsquo;<samp>movw</samp>&rsquo; instruction when a PC-relative operand is used.
  94. </p>
  95. <a name="index-_002dmm9s12x"></a>
  96. </dd>
  97. <dt><code>-mm9s12x</code></dt>
  98. <dd><p>This option switches the assembler into the M9S12X mode. This mode is
  99. similar to &lsquo;<samp>-m68hc12</samp>&rsquo; but specifies to assemble for the S12X
  100. series which is a superset of the HCS12.
  101. </p>
  102. <a name="index-_002dmm9s12xg"></a>
  103. </dd>
  104. <dt><code>-mm9s12xg</code></dt>
  105. <dd><p>This option switches the assembler into the XGATE mode for the RISC
  106. co-processor featured on some S12X-family chips.
  107. </p>
  108. <a name="index-_002d_002dxgate_002dramoffset"></a>
  109. </dd>
  110. <dt><code>--xgate-ramoffset</code></dt>
  111. <dd><p>This option instructs the linker to offset RAM addresses from S12X address
  112. space into XGATE address space.
  113. </p>
  114. <a name="index-_002dmshort"></a>
  115. </dd>
  116. <dt><code>-mshort</code></dt>
  117. <dd><p>This option controls the ABI and indicates to use a 16-bit integer ABI.
  118. It has no effect on the assembled instructions.
  119. This is the default.
  120. </p>
  121. <a name="index-_002dmlong"></a>
  122. </dd>
  123. <dt><code>-mlong</code></dt>
  124. <dd><p>This option controls the ABI and indicates to use a 32-bit integer ABI.
  125. </p>
  126. <a name="index-_002dmshort_002ddouble"></a>
  127. </dd>
  128. <dt><code>-mshort-double</code></dt>
  129. <dd><p>This option controls the ABI and indicates to use a 32-bit float ABI.
  130. This is the default.
  131. </p>
  132. <a name="index-_002dmlong_002ddouble"></a>
  133. </dd>
  134. <dt><code>-mlong-double</code></dt>
  135. <dd><p>This option controls the ABI and indicates to use a 64-bit float ABI.
  136. </p>
  137. <a name="index-_002d_002dstrict_002ddirect_002dmode"></a>
  138. </dd>
  139. <dt><code>--strict-direct-mode</code></dt>
  140. <dd><p>You can use the &lsquo;<samp>--strict-direct-mode</samp>&rsquo; option to disable
  141. the automatic translation of direct page mode addressing into
  142. extended mode when the instruction does not support direct mode.
  143. For example, the &lsquo;<samp>clr</samp>&rsquo; instruction does not support direct page
  144. mode addressing. When it is used with the direct page mode,
  145. <code>as</code> will ignore it and generate an absolute addressing.
  146. This option prevents <code>as</code> from doing this, and the wrong
  147. usage of the direct page mode will raise an error.
  148. </p>
  149. <a name="index-_002d_002dshort_002dbranches"></a>
  150. </dd>
  151. <dt><code>--short-branches</code></dt>
  152. <dd><p>The &lsquo;<samp>--short-branches</samp>&rsquo; option turns off the translation of
  153. relative branches into absolute branches when the branch offset is
  154. out of range. By default <code>as</code> transforms the relative
  155. 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;,
  156. &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;,
  157. &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
  158. an absolute branch when the offset is out of the -128 .. 127 range.
  159. In that case, the &lsquo;<samp>bsr</samp>&rsquo; instruction is translated into a
  160. &lsquo;<samp>jsr</samp>&rsquo;, the &lsquo;<samp>bra</samp>&rsquo; instruction is translated into a
  161. &lsquo;<samp>jmp</samp>&rsquo; and the conditional branches instructions are inverted and
  162. followed by a &lsquo;<samp>jmp</samp>&rsquo;. This option disables these translations
  163. and <code>as</code> will generate an error if a relative branch
  164. is out of range. This option does not affect the optimization
  165. associated to the &lsquo;<samp>jbra</samp>&rsquo;, &lsquo;<samp>jbsr</samp>&rsquo; and &lsquo;<samp>jbXX</samp>&rsquo; pseudo opcodes.
  166. </p>
  167. <a name="index-_002d_002dforce_002dlong_002dbranches"></a>
  168. </dd>
  169. <dt><code>--force-long-branches</code></dt>
  170. <dd><p>The &lsquo;<samp>--force-long-branches</samp>&rsquo; option forces the translation of
  171. relative branches into absolute branches. This option does not affect
  172. the optimization associated to the &lsquo;<samp>jbra</samp>&rsquo;, &lsquo;<samp>jbsr</samp>&rsquo; and
  173. &lsquo;<samp>jbXX</samp>&rsquo; pseudo opcodes.
  174. </p>
  175. <a name="index-_002d_002dprint_002dinsn_002dsyntax"></a>
  176. </dd>
  177. <dt><code>--print-insn-syntax</code></dt>
  178. <dd><p>You can use the &lsquo;<samp>--print-insn-syntax</samp>&rsquo; option to obtain the
  179. syntax description of the instruction when an error is detected.
  180. </p>
  181. <a name="index-_002d_002dprint_002dopcodes"></a>
  182. </dd>
  183. <dt><code>--print-opcodes</code></dt>
  184. <dd><p>The &lsquo;<samp>--print-opcodes</samp>&rsquo; option prints the list of all the
  185. instructions with their syntax. The first item of each line
  186. represents the instruction name and the rest of the line indicates
  187. the possible operands for that instruction. The list is printed
  188. in alphabetical order. Once the list is printed <code>as</code>
  189. exits.
  190. </p>
  191. <a name="index-_002d_002dgenerate_002dexample"></a>
  192. </dd>
  193. <dt><code>--generate-example</code></dt>
  194. <dd><p>The &lsquo;<samp>--generate-example</samp>&rsquo; option is similar to &lsquo;<samp>--print-opcodes</samp>&rsquo;
  195. but it generates an example for each instruction instead.
  196. </p></dd>
  197. </dl>
  198. <hr>
  199. <div class="header">
  200. <p>
  201. 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>
  202. </div>
  203. </body>
  204. </html>