212 lines
4.4 KiB
HTML
212 lines
4.4 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<!-- This HTML file has been created by texi2html 1.52
|
|
from ../texi/as.texinfo on 24 April 1999 -->
|
|
|
|
<TITLE>Using as - H8/500 Dependent Features</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
Go to the <A HREF="as_1.html">first</A>, <A HREF="as_13.html">previous</A>, <A HREF="as_15.html">next</A>, <A HREF="as_27.html">last</A> section, <A HREF="as_toc.html">table of contents</A>.
|
|
<P><HR><P>
|
|
|
|
|
|
<H1><A NAME="SEC180" HREF="as_toc.html#TOC180">H8/500 Dependent Features</A></H1>
|
|
|
|
<P>
|
|
<A NAME="IDX545"></A>
|
|
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="SEC181" HREF="as_toc.html#TOC181">Options</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX546"></A>
|
|
<A NAME="IDX547"></A>
|
|
<CODE>as</CODE> has no additional command-line options for the Hitachi
|
|
H8/500 family.
|
|
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="SEC182" HREF="as_toc.html#TOC182">Syntax</A></H2>
|
|
|
|
|
|
|
|
<H3><A NAME="SEC183" HREF="as_toc.html#TOC183">Special Characters</A></H3>
|
|
|
|
<P>
|
|
<A NAME="IDX548"></A>
|
|
<A NAME="IDX549"></A>
|
|
<SAMP>`!'</SAMP> is the line comment character.
|
|
|
|
</P>
|
|
<P>
|
|
<A NAME="IDX550"></A>
|
|
<A NAME="IDX551"></A>
|
|
<A NAME="IDX552"></A>
|
|
<SAMP>`;'</SAMP> can be used instead of a newline to separate statements.
|
|
|
|
</P>
|
|
<P>
|
|
<A NAME="IDX553"></A>
|
|
<A NAME="IDX554"></A>
|
|
Since <SAMP>`$'</SAMP> has no special meaning, you may use it in symbol names.
|
|
|
|
</P>
|
|
|
|
|
|
<H3><A NAME="SEC184" HREF="as_toc.html#TOC184">Register Names</A></H3>
|
|
|
|
<P>
|
|
<A NAME="IDX555"></A>
|
|
<A NAME="IDX556"></A>
|
|
You can use the predefined symbols <SAMP>`r0'</SAMP>, <SAMP>`r1'</SAMP>, <SAMP>`r2'</SAMP>,
|
|
<SAMP>`r3'</SAMP>, <SAMP>`r4'</SAMP>, <SAMP>`r5'</SAMP>, <SAMP>`r6'</SAMP>, and <SAMP>`r7'</SAMP> to refer to
|
|
the H8/500 registers.
|
|
|
|
</P>
|
|
<P>
|
|
The H8/500 also has these control registers:
|
|
|
|
</P>
|
|
<DL COMPACT>
|
|
|
|
<DT><CODE>cp</CODE>
|
|
<DD>
|
|
code pointer
|
|
|
|
<DT><CODE>dp</CODE>
|
|
<DD>
|
|
data pointer
|
|
|
|
<DT><CODE>bp</CODE>
|
|
<DD>
|
|
base pointer
|
|
|
|
<DT><CODE>tp</CODE>
|
|
<DD>
|
|
stack top pointer
|
|
|
|
<DT><CODE>ep</CODE>
|
|
<DD>
|
|
extra pointer
|
|
|
|
<DT><CODE>sr</CODE>
|
|
<DD>
|
|
status register
|
|
|
|
<DT><CODE>ccr</CODE>
|
|
<DD>
|
|
condition code register
|
|
</DL>
|
|
|
|
<P>
|
|
All registers are 16 bits long. To represent 32 bit numbers, use two
|
|
adjacent registers; for distant memory addresses, use one of the segment
|
|
pointers (<CODE>cp</CODE> for the program counter; <CODE>dp</CODE> for
|
|
<CODE>r0</CODE>--<CODE>r3</CODE>; <CODE>ep</CODE> for <CODE>r4</CODE> and <CODE>r5</CODE>; and
|
|
<CODE>tp</CODE> for <CODE>r6</CODE> and <CODE>r7</CODE>.
|
|
|
|
</P>
|
|
|
|
|
|
<H3><A NAME="SEC185" HREF="as_toc.html#TOC185">Addressing Modes</A></H3>
|
|
|
|
<P>
|
|
<A NAME="IDX557"></A>
|
|
<A NAME="IDX558"></A>
|
|
as understands the following addressing modes for the H8/500:
|
|
<DL COMPACT>
|
|
|
|
<DT><CODE>R<VAR>n</VAR></CODE>
|
|
<DD>
|
|
Register direct
|
|
|
|
<DT><CODE>@R<VAR>n</VAR></CODE>
|
|
<DD>
|
|
Register indirect
|
|
|
|
<DT><CODE>@(d:8, R<VAR>n</VAR>)</CODE>
|
|
<DD>
|
|
Register indirect with 8 bit signed displacement
|
|
|
|
<DT><CODE>@(d:16, R<VAR>n</VAR>)</CODE>
|
|
<DD>
|
|
Register indirect with 16 bit signed displacement
|
|
|
|
<DT><CODE>@-R<VAR>n</VAR></CODE>
|
|
<DD>
|
|
Register indirect with pre-decrement
|
|
|
|
<DT><CODE>@R<VAR>n</VAR>+</CODE>
|
|
<DD>
|
|
Register indirect with post-increment
|
|
|
|
<DT><CODE>@<VAR>aa</VAR>:8</CODE>
|
|
<DD>
|
|
8 bit absolute address
|
|
|
|
<DT><CODE>@<VAR>aa</VAR>:16</CODE>
|
|
<DD>
|
|
16 bit absolute address
|
|
|
|
<DT><CODE>#<VAR>xx</VAR>:8</CODE>
|
|
<DD>
|
|
8 bit immediate
|
|
|
|
<DT><CODE>#<VAR>xx</VAR>:16</CODE>
|
|
<DD>
|
|
16 bit immediate
|
|
</DL>
|
|
|
|
|
|
|
|
<H2><A NAME="SEC186" HREF="as_toc.html#TOC186">Floating Point</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX559"></A>
|
|
<A NAME="IDX560"></A>
|
|
The H8/500 family has no hardware floating point, but the <CODE>.float</CODE>
|
|
directive generates IEEE floating-point numbers for compatibility
|
|
with other development tools.
|
|
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="SEC187" HREF="as_toc.html#TOC187">H8/500 Machine Directives</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX561"></A>
|
|
<A NAME="IDX562"></A>
|
|
<A NAME="IDX563"></A>
|
|
<A NAME="IDX564"></A>
|
|
<CODE>as</CODE> has no machine-dependent directives for the H8/500.
|
|
However, on this platform the <SAMP>`.int'</SAMP> and <SAMP>`.word'</SAMP> directives
|
|
generate 16-bit numbers.
|
|
|
|
</P>
|
|
|
|
|
|
<H2><A NAME="SEC188" HREF="as_toc.html#TOC188">Opcodes</A></H2>
|
|
|
|
<P>
|
|
<A NAME="IDX565"></A>
|
|
<A NAME="IDX566"></A>
|
|
<A NAME="IDX567"></A>
|
|
<A NAME="IDX568"></A>
|
|
For detailed information on the H8/500 machine instruction set, see
|
|
<CITE>H8/500 Series Programming Manual</CITE> (Hitachi M21T001).
|
|
|
|
</P>
|
|
<P>
|
|
<CODE>as</CODE> implements all the standard H8/500 opcodes. No additional
|
|
pseudo-instructions are needed on this family.
|
|
|
|
</P>
|
|
|
|
<P><HR><P>
|
|
Go to the <A HREF="as_1.html">first</A>, <A HREF="as_13.html">previous</A>, <A HREF="as_15.html">next</A>, <A HREF="as_27.html">last</A> section, <A HREF="as_toc.html">table of contents</A>.
|
|
</BODY>
|
|
</HTML>
|