You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
3.5 KiB
HTML

<html lang="en">
<head>
<title>XStormy16 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="XSTORMY16_002dDependent.html#XSTORMY16_002dDependent" title="XSTORMY16-Dependent">
<link rel="prev" href="XStormy16-Directives.html#XStormy16-Directives" title="XStormy16 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-2015 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="XStormy16-Opcodes"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="XStormy16-Directives.html#XStormy16-Directives">XStormy16 Directives</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="XSTORMY16_002dDependent.html#XSTORMY16_002dDependent">XSTORMY16-Dependent</a>
<hr>
</div>
<h4 class="subsection">9.51.3 XStormy16 Pseudo-Opcodes</h4>
<p><a name="index-XStormy16-pseudo_002dopcodes-2430"></a><a name="index-pseudo_002dopcodes-for-XStormy16-2431"></a><code>as</code> implements all the standard XStormy16 opcodes.
<p><code>as</code> also implements the following pseudo ops:
<a name="index-g_t_0040code_007b_0040_0040lo_007d-pseudo_002dop_002c-XStormy16-2432"></a>
<dl><dt><code>@lo()</code><dd>Computes the lower 16 bits of the given expression and stores it into
the immediate operand field of the given instruction. For example:
<p>&lsquo;<samp><span class="samp">add r6, @lo(here - there)</span></samp>&rsquo;
<p>computes the difference between the address of labels 'here' and
'there', takes the lower 16 bits of this difference and adds it to
register 6.
<p><a name="index-g_t_0040code_007b_0040_0040hi_007d-pseudo_002dop_002c-XStormy16-2433"></a><br><dt><code>@hi()</code><dd>Computes the higher 16 bits of the given expression and stores it into
the immediate operand field of the given instruction. For example:
<p>&lsquo;<samp><span class="samp">addc r7, @hi(here - there)</span></samp>&rsquo;
<p>computes the difference between the address of labels 'here' and
'there', takes the upper 16 bits of this difference, shifts it down 16
bits and then adds it, along with the carry bit, to the value in
register 7.
</dl>
<!-- Copyright (C) 2002-2015 Free Software Foundation, Inc. -->
<!-- This is part of the GAS manual. -->
<!-- For copying conditions, see the file as.texinfo. -->
<!-- man end -->
</body></html>