📄 m68hc11-branch.html
字号:
<html lang="en">
<head>
<title>Using as</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using as">
<meta name="generator" content="makeinfo 4.3">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
</head>
<body>
<div class="node">
<p>
Node:<a name="M68HC11-Branch">M68HC11-Branch</a>,
Up:<a rel="up" accesskey="u" href="M68HC11-opcodes.html#M68HC11-opcodes">M68HC11-opcodes</a>
<hr><br>
</div>
<h5 class="subsection">Branch Improvement</h5>
<p>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 <code>j</code> to
the start of Motorola mnemonic. These pseudo opcodes are not affected
by the <code>--short-branchs</code> or <code>--force-long-branchs</code> options.
<p>The following table summarizes the pseudo-operations.
<pre class="smallexample"> Displacement Width
+-------------------------------------------------------------+
| Options |
| --short-branchs --force-long-branchs |
+--------------------------+----------------------------------+
Pseudo-Op |BYTE WORD | BYTE WORD |
+--------------------------+----------------------------------+
bsr | bsr <pc-rel> <error> | jsr <abs> |
bra | bra <pc-rel> <error> | jmp <abs> |
jbsr | bsr <pc-rel> jsr <abs> | bsr <pc-rel> jsr <abs> |
jbra | bra <pc-rel> jmp <abs> | bra <pc-rel> jmp <abs> |
bXX | bXX <pc-rel> <error> | bNX +3; jmp <abs> |
jbXX | bXX <pc-rel> bNX +3; | bXX <pc-rel> bNX +3; jmp <abs> |
| jmp <abs> | |
+--------------------------+----------------------------------+
XX: condition
NX: negative of condition XX
</pre>
<dl>
<dt><code>jbsr</code>
<dd><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><code></code>
<dd>Here, <code>jb</code><var>XX</var><code></code> 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>
gives
<pre class="smallexample"> b<var>NX</var>s oof
jmp foo
oof:
</pre>
</dl>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -