blob: 01cbb5722b8b91052bfe4eade376a0f38fc488a8 [file] [log] [blame]
<html lang="en">
<head>
<title>MSP430-Ext - 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="MSP430-Syntax.html#MSP430-Syntax" title="MSP430 Syntax">
<link rel="prev" href="MSP430_002dRegs.html#MSP430_002dRegs" title="MSP430-Regs">
<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="MSP430-Ext"></a>
<a name="MSP430_002dExt"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="MSP430_002dRegs.html#MSP430_002dRegs">MSP430-Regs</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="MSP430-Syntax.html#MSP430-Syntax">MSP430 Syntax</a>
<hr>
</div>
<h5 class="subsubsection">9.29.2.4 Assembler Extensions</h5>
<p><a name="index-MSP430-Assembler-Extensions-1751"></a>
<dl>
<dt><code>@rN</code><dd>As destination operand being treated as &lsquo;<samp><span class="samp">0(rn)</span></samp>&rsquo;
<br><dt><code>0(rN)</code><dd>As source operand being treated as &lsquo;<samp><span class="samp">@rn</span></samp>&rsquo;
<br><dt><code>jCOND +N</code><dd>Skips next N bytes followed by jump instruction and equivalent to
&lsquo;<samp><span class="samp">jCOND $+N+2</span></samp>&rsquo;
</dl>
<p>Also, there are some instructions, which cannot be found in other assemblers.
These are branch instructions, which has different opcodes upon jump distance.
They all got PC relative addressing mode.
<dl>
<dt><code>beq label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jeq label</span></samp>&rsquo; in case if jump distance
within allowed range for cpu's jump instruction. If not, this unrolls into
a sequence of
<pre class="smallexample"> jne $+6
br label
</pre>
<br><dt><code>bne label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jne label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jeq +4; br label</span></samp>&rsquo;
<br><dt><code>blt label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jl label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jge +4; br label</span></samp>&rsquo;
<br><dt><code>bltn label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jn label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jn +2; jmp +4; br label</span></samp>&rsquo;
<br><dt><code>bltu label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jlo label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jhs +2; br label</span></samp>&rsquo;
<br><dt><code>bge label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jge label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jl +4; br label</span></samp>&rsquo;
<br><dt><code>bgeu label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jhs label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jlo +4; br label</span></samp>&rsquo;
<br><dt><code>bgt label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jeq +2; jge label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jeq +6; jl +4; br label</span></samp>&rsquo;
<br><dt><code>bgtu label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jeq +2; jhs label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jeq +6; jlo +4; br label</span></samp>&rsquo;
<br><dt><code>bleu label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jeq label; jlo label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jeq +2; jhs +4; br label</span></samp>&rsquo;
<br><dt><code>ble label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jeq label; jl label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">jeq +2; jge +4; br label</span></samp>&rsquo;
<br><dt><code>jump label</code><dd>A polymorph instruction which is &lsquo;<samp><span class="samp">jmp label</span></samp>&rsquo; or &lsquo;<samp><span class="samp">br label</span></samp>&rsquo;
</dl>
</body></html>