* better
[mascara-docs.git] / hw / i386.reference / s03_11.htm
bloba044c73b1091814ae4ffe8c1d330370f2d5264ad
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
2 <HTML>
3 <HEAD>
4 <TITLE>80386 Programmer's Reference Manual -- Section 3.11</TITLE>
5 </HEAD>
6 <BODY>
7 <B>up:</B> <A HREF="c03.htm">
8 Chapter 3 -- Applications Instruction Set</A><BR>
9 <B>prev:</B> <A HREF="s03_10.htm">3.10 Segment Register Instructions</A><BR>
10 <B>next:</B> <A HREF="c04.htm">Chapter 4 -- Systems Architecture</A>
11 <P>
12 <HR>
13 <P>
14 <H1>3.11 Miscellaneous Instructions</H1>
15 The following instructions do not fit in any of the previous categories,
16 but are nonetheless useful.
18 <H2>3.11.1 Address Calculation Instruction</H2>
19 <A HREF="LEA.htm">LEA</A> (Load Effective Address)
20 transfers the offset of the source operand
21 (rather than its value) to the destination operand. The source operand must
22 be a memory operand, and the destination operand must be a general register.
23 This instruction is especially useful for initializing registers before the
24 execution of the string primitives (ESI, EDI) or the
25 <A HREF="XLAT.htm">XLAT</A> instruction (EBX).
26 The
27 <A HREF="LEA.htm">LEA</A>
28 can perform any indexing or scaling that may be needed.
29 Example:
30 <PRE>
31 <A HREF="LEA.htm">LEA</A> EBX, EBCDIC_TABLE
32 </PRE>
33 Causes the processor to place the address of the starting location of the
34 table labeled EBCDIC_TABLE into EBX.
36 <H2>3.11.2 No-Operation Instruction</H2>
37 <A HREF="NOP.htm">NOP</A> (No Operation)
38 occupies a byte of storage but affects nothing but the
39 instruction pointer, EIP.
40 <P>
41 <H2>3.11.3 Translate Instruction</H2>
42 <A HREF="XLAT.htm">XLAT</A> (Translate) i
43 replaced a byte in the AL register with a byte from a
44 user-coded translation table. When
45 <A HREF="XLAT.htm">XLAT</A> is executed, AL should have the
46 unsigned index to the table addressed by EBX.
47 <A HREF="XLAT.htm">XLAT</A> changes the contents of
48 AL from table index to table entry. EBX is unchanged. The
49 <A HREF="XLAT.htm">XLAT</A> instruction
50 is useful for translating from one coding system to another such as from
51 ASCII to EBCDIC. The translate table may be up to 256 bytes long. The
52 value placed in the AL register serves as an index to the location of the
53 corresponding translation value.
54 <P>
55 <HR>
56 <P>
57 <B>up:</B> <A HREF="c03.htm">
58 Chapter 3 -- Applications Instruction Set</A><BR>
59 <B>prev:</B> <A HREF="s03_10.htm">3.10 Segment Register Instructions</A><BR>
60 <B>next:</B> <A HREF="c04.htm">Chapter 4 -- Systems Architecture</A>
61 </BODY>