<html lang="en">
<head>
<title>M68HC11-Branch - Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="M68HC11_002dopcodes.html#M68HC11_002dopcodes" title="M68HC11-opcodes">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
@import url("../raisonance.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">
<p>
<a name="M68HC11-Branch"></a>
<a name="M68HC11_002dBranch"></a>
Up:&nbsp;<a rel="up" accesskey="u" href="M68HC11_002dopcodes.html#M68HC11_002dopcodes">M68HC11-opcodes</a>
<hr>
</div>

<h5 class="subsubsection">8.19.6.1 Branch Improvement</h5>

<p><a name="index-pseudo_002dopcodes_002c-M68HC11-1135"></a><a name="index-M68HC11-pseudo_002dopcodes-1136"></a><a name="index-branch-improvement_002c-M68HC11-1137"></a><a name="index-M68HC11-branch-improvement-1138"></a>
Certain pseudo opcodes are permitted for branch instructions. 
They expand to the shortest branch instruction that reach the
target. Generally these mnemonics are made by prepending `<samp><span class="samp">j</span></samp>' to
the start of Motorola mnemonic. These pseudo opcodes are not affected
by the `<samp><span class="samp">--short-branchs</span></samp>' or `<samp><span class="samp">--force-long-branchs</span></samp>' options.

   <p>The following table summarizes the pseudo-operations.

<pre class="smallexample">                             Displacement Width
          +-------------------------------------------------------------+
          |                     Options                                 |
          |    --short-branchs            --force-long-branchs          |
          +--------------------------+----------------------------------+
       Op |BYTE             WORD     | BYTE          WORD               |
          +--------------------------+----------------------------------+
      bsr | bsr &lt;pc-rel&gt;    &lt;error&gt;  |               jsr &lt;abs&gt;          |
      bra | bra &lt;pc-rel&gt;    &lt;error&gt;  |               jmp &lt;abs&gt;          |
     jbsr | bsr &lt;pc-rel&gt;   jsr &lt;abs&gt; | bsr &lt;pc-rel&gt;  jsr &lt;abs&gt;          |
     jbra | bra &lt;pc-rel&gt;   jmp &lt;abs&gt; | bra &lt;pc-rel&gt;  jmp &lt;abs&gt;          |
      bXX | bXX &lt;pc-rel&gt;    &lt;error&gt;  |               bNX +3; jmp &lt;abs&gt;  |
     jbXX | bXX &lt;pc-rel&gt;   bNX +3;   | bXX &lt;pc-rel&gt;  bNX +3; jmp &lt;abs&gt;  |
          |                jmp &lt;abs&gt; |                                  |
          +--------------------------+----------------------------------+
     XX: condition
     NX: negative of condition XX
     
</pre>
     <dl>
<dt><code>jbsr</code><dt><code>jbra</code><dd>These are the simplest jump pseudo-operations; they always map to one
particular machine instruction, depending on the displacement to the
branch target.

     <br><dt><code>jb</code><var>XX</var><dd>Here, `<samp><span class="samp">jb</span><var>XX</var></samp>' stands for an entire family of pseudo-operations,
where <var>XX</var> is a conditional branch or condition-code test.  The full
list of pseudo-ops in this family is:
     <pre class="smallexample">           jbcc   jbeq   jbge   jbgt   jbhi   jbvs   jbpl  jblo
           jbcs   jbne   jblt   jble   jbls   jbvc   jbmi
     </pre>
     <p>For the cases of non-PC relative displacements and long displacements,
<code>as</code> issues a longer code fragment in terms of
<var>NX</var>, the opposite condition to <var>XX</var>.  For example, for the
non-PC relative case:
     <pre class="smallexample">              jb<var>XX</var> foo
     </pre>
     <p>gives
     <pre class="smallexample">               b<var>NX</var>s oof
               jmp foo
           oof:
     </pre>
     </dl>

<!-- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, -->
<!-- 2002, 2003, 2004 -->
<!-- Free Software Foundation, Inc. -->
<!-- This is part of the GAS manual. -->
<!-- For copying conditions, see the file as.texinfo. -->
</body></html>

