toolchain/share/doc/as.html/H8_002f300_002dRegs.html

72 lines
3.7 KiB
HTML
Raw Permalink Normal View History

2024-01-10 05:24:32 +00:00
<html lang="en">
<head>
<title>H8/300-Regs - 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-Syntax.html#H8_002f300-Syntax" title="H8/300 Syntax">
<link rel="prev" href="H8_002f300_002dChars.html#H8_002f300_002dChars" title="H8/300-Chars">
<link rel="next" href="H8_002f300_002dAddressing.html#H8_002f300_002dAddressing" title="H8/300-Addressing">
<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-Regs"></a>
<a name="H8_002f300_002dRegs"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="H8_002f300_002dAddressing.html#H8_002f300_002dAddressing">H8/300-Addressing</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="H8_002f300_002dChars.html#H8_002f300_002dChars">H8/300-Chars</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="H8_002f300-Syntax.html#H8_002f300-Syntax">H8/300 Syntax</a>
<hr>
</div>
<h5 class="subsubsection">9.14.2.2 Register Names</h5>
<p><a name="index-H8_002f300-registers-1049"></a><a name="index-register-names_002c-H8_002f300-1050"></a>You can use predefined symbols of the form &lsquo;<samp><span class="samp">r</span><var>n</var><span class="samp">h</span></samp>&rsquo; and
&lsquo;<samp><span class="samp">r</span><var>n</var><span class="samp">l</span></samp>&rsquo; to refer to the H8/300 registers as sixteen 8-bit
general-purpose registers. <var>n</var> is a digit from &lsquo;<samp><span class="samp">0</span></samp>&rsquo; to
&lsquo;<samp><span class="samp">7</span></samp>&rsquo;); for instance, both &lsquo;<samp><span class="samp">r0h</span></samp>&rsquo; and &lsquo;<samp><span class="samp">r7l</span></samp>&rsquo; are valid
register names.
<p>You can also use the eight predefined symbols &lsquo;<samp><span class="samp">r</span><var>n</var></samp>&rsquo; to refer
to the H8/300 registers as 16-bit registers (you must use this form for
addressing).
<p>On the H8/300H, you can also use the eight predefined symbols
&lsquo;<samp><span class="samp">er</span><var>n</var></samp>&rsquo; (&lsquo;<samp><span class="samp">er0</span></samp>&rsquo; <small class="dots">...</small> &lsquo;<samp><span class="samp">er7</span></samp>&rsquo;) to refer to the 32-bit
general purpose registers.
<p>The two control registers are called <code>pc</code> (program counter; a
16-bit register, except on the H8/300H where it is 24 bits) and
<code>ccr</code> (condition code register; an 8-bit register). <code>r7</code> is
used as the stack pointer, and can also be called <code>sp</code>.
</body></html>