38 lines
3.3 KiB
HTML
38 lines
3.3 KiB
HTML
<html><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
|
|
<html>
|
|
|
|
<head>
|
|
<title>80386 Programmer's Reference Manual -- Section 3.11</title>
|
|
</head>
|
|
|
|
<body>
|
|
<b>up:</b> <a href="C03.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C03.HTM">Chapter 3 -- Applications Instruction Set</a><br>
|
|
<b>prev:</b> <a href="S03_10.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S03_10.HTM">3.10 Segment Register Instructions</a><br>
|
|
<b>next:</b> <a href="C04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C04.HTM">Chapter 4 -- Systems Architecture</a>
|
|
<p>
|
|
<hr>
|
|
<p>
|
|
<h1>3.11 Miscellaneous Instructions</h1>
|
|
The following instructions do not fit in any of the previous categories, but are nonetheless useful.
|
|
<h2>3.11.1 Address Calculation Instruction</h2>
|
|
<a href="LEA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LEA.HTM">LEA</a> (Load Effective Address) transfers the offset of the source operand (rather than its value) to the destination operand. The source operand must be a memory operand, and the destination operand must be a general register. This instruction is especially useful for initializing registers before the execution of the string primitives (ESI, EDI) or the <a href="XLAT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XLAT.HTM">XLAT</a> instruction (EBX). The <a href="LEA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LEA.HTM">LEA</a> can perform any indexing or scaling that may be needed. Example:
|
|
<pre>
|
|
|
|
|
|
|
|
<a href="LEA.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/LEA.HTM">LEA</a> EBX, EBCDIC_TABLE
|
|
</pre>
|
|
Causes the processor to place the address of the starting location of the table labeled EBCDIC_TABLE into EBX.
|
|
<h2>3.11.2 No-Operation Instruction</h2>
|
|
<a href="NOP.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/NOP.HTM">NOP</a> (No Operation) occupies a byte of storage but affects nothing but the instruction pointer, EIP.
|
|
<p>
|
|
<h2>3.11.3 Translate Instruction</h2>
|
|
<a href="XLAT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XLAT.HTM">XLAT</a> (Translate) i replaced a byte in the AL register with a byte from a user-coded translation table. When <a href="XLAT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XLAT.HTM">XLAT</a> is executed, AL should have the unsigned index to the table addressed by EBX. <a href="XLAT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XLAT.HTM">XLAT</a> changes the contents of AL from table index to table entry. EBX is unchanged. The <a href="XLAT.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/XLAT.HTM">XLAT</a> instruction is useful for translating from one coding system to another such as from ASCII to EBCDIC. The translate table may be up to 256 bytes long. The value placed in the AL register serves as an index to the location of the corresponding translation value.
|
|
<p>
|
|
<hr>
|
|
<p><b>up:</b> <a href="C03.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C03.HTM">Chapter 3 -- Applications Instruction Set</a><br>
|
|
<b>prev:</b> <a href="S03_10.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/S03_10.HTM">3.10 Segment Register Instructions</a><br>
|
|
<b>next:</b> <a href="C04.HTM" tppabs="http://webster.cs.ucr.edu/Page_TechDocs/Doc386/C04.HTM">Chapter 4 -- Systems Architecture</a>
|
|
</body>
|
|
|