toolchain/share/doc/as.html/H8_002f300-Opcodes.html

76 lines
3.6 KiB
HTML

<html lang="en">
<head>
<title>H8/300 Opcodes - 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="H8_002f300_002dDependent.html#H8_002f300_002dDependent" title="H8/300-Dependent">
<link rel="prev" href="H8_002f300-Directives.html#H8_002f300-Directives" title="H8/300 Directives">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This file documents the GNU Assembler "as".
Copyright (C) 1991-2019 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="H8%2f300-Opcodes"></a>
<a name="H8_002f300-Opcodes"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="H8_002f300-Directives.html#H8_002f300-Directives">H8/300 Directives</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="H8_002f300_002dDependent.html#H8_002f300_002dDependent">H8/300-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.14.5 Opcodes</h4>
<p><a name="index-H8_002f300-opcode-summary-1060"></a><a name="index-opcode-summary_002c-H8_002f300-1061"></a><a name="index-mnemonics_002c-H8_002f300-1062"></a><a name="index-instruction-summary_002c-H8_002f300-1063"></a>For detailed information on the H8/300 machine instruction set, see
<cite>H8/300 Series Programming Manual</cite>. For information specific to
the H8/300H, see <cite>H8/300H Series Programming Manual</cite> (Renesas).
<p><code>as</code> implements all the standard H8/300 opcodes. No additional
pseudo-instructions are needed on this family.
<p><a name="index-size-suffixes_002c-H8_002f300-1064"></a><a name="index-H8_002f300-size-suffixes-1065"></a>Four H8/300 instructions (<code>add</code>, <code>cmp</code>, <code>mov</code>,
<code>sub</code>) are defined with variants using the suffixes &lsquo;<samp><span class="samp">.b</span></samp>&rsquo;,
&lsquo;<samp><span class="samp">.w</span></samp>&rsquo;, and &lsquo;<samp><span class="samp">.l</span></samp>&rsquo; to specify the size of a memory operand.
<code>as</code> supports these suffixes, but does not require them;
since one of the operands is always a register, <code>as</code> can
deduce the correct size.
<p>For example, since <code>r0</code> refers to a 16-bit register,
<pre class="example"> mov r0,@foo
<br>is equivalent to<br>
mov.w r0,@foo
</pre>
<p>If you use the size suffixes, <code>as</code> issues a warning when
the suffix and the register size do not match.
<!-- Copyright (C) 1991-2019 Free Software Foundation, Inc. -->
<!-- This is part of the GAS manual. -->
<!-- For copying conditions, see the file as.texinfo. -->
</body></html>