| <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, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 2000, 2001, 2002, 2006, 2007, 2008, 2009, 2010 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> |
| <link rel="stylesheet" type="text/css" href="../cs.css"> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="H8%2f300-Opcodes"></a> |
| <a name="H8_002f300-Opcodes"></a> |
| <p> |
| Previous: <a rel="previous" accesskey="p" href="H8_002f300-Directives.html#H8_002f300-Directives">H8/300 Directives</a>, |
| Up: <a rel="up" accesskey="u" href="H8_002f300_002dDependent.html#H8_002f300_002dDependent">H8/300-Dependent</a> |
| <hr> |
| </div> |
| |
| <h4 class="subsection">9.10.5 Opcodes</h4> |
| |
| <p><a name="index-H8_002f300-opcode-summary-821"></a><a name="index-opcode-summary_002c-H8_002f300-822"></a><a name="index-mnemonics_002c-H8_002f300-823"></a><a name="index-instruction-summary_002c-H8_002f300-824"></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-825"></a><a name="index-H8_002f300-size-suffixes-826"></a>Four H8/300 instructions (<code>add</code>, <code>cmp</code>, <code>mov</code>, |
| <code>sub</code>) are defined with variants using the suffixes ‘<samp><span class="samp">.b</span></samp>’, |
| ‘<samp><span class="samp">.w</span></samp>’, and ‘<samp><span class="samp">.l</span></samp>’ 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 1991, 1992, 1993, 1994, 1995, 1998, 2004 --> |
| <!-- Free Software Foundation, Inc. --> |
| <!-- This is part of the GAS manual. --> |
| <!-- For copying conditions, see the file as.texinfo. --> |
| </body></html> |
| |