1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode XLAT
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"XCHG.htm"> XCHG Exchange Register/Memory with Register
</A><BR>
10 <B>next:
</B><A HREF=
"XOR.htm"> XOR Logical Exclusive OR
</A>
14 <H1>XLAT/XLATB -- Table Look-up Translation
</H1>
17 D7 XLAT m8
5 Set AL to memory byte DS:[(E)BX + unsigned AL]
18 D7 XLATB
5 Set AL to memory byte DS:[(E)BX + unsigned AL]
26 AL := (BX + ZeroExtend(AL))
27 ELSE (* AddressSize =
32 *)
28 AL := (EBX + ZeroExtend(AL));
34 XLAT changes the AL register from the table index to the table entry. AL
35 should be the unsigned index into a table addressed by DS:BX (for an
36 address-size attribute of
16 bits) or DS:EBX (for an address-size attribute
39 The operand to XLAT allows for the possibility of a segment override. XLAT
40 uses the contents of BX even if they differ from the offset of the operand.
41 The offset of the operand should have been moved intoBX/EBX with a previous
44 The no-operand form, XLATB, can be used if the BX/EBX table will always
45 reside in the DS segment.
47 <H2>Flags Affected
</H2>
51 <H2>Protected Mode Exceptions
</H2>
53 #GP(
0) for an illegal memory operand effective address in the CS, DS, ES,
54 FS, or GS segments; #SS(
0) for an illegal address in the SS segment;
55 #PF(fault-code) for a page fault
57 <H2>Real Address Mode Exceptions
</H2>
59 Interrupt
13 if any part of the operand would lie outside of the effective
60 address space from
0 to
0FFFFH
62 <H2>Virtual
8086 Mode Exceptions
</H2>
64 Same exceptions as in Real Address Mode; #PF(fault-code) for a page fault
70 <B>up:
</B> <A HREF=
"c17.htm">
71 Chapter
17 --
80386 Instruction Set
</A><BR>
72 <B>prev:
</B><A HREF=
"XCHG.htm"> XCHG Exchange Register/Memory with Register
</A><BR>
73 <B>next:
</B><A HREF=
"XOR.htm"> XOR Logical Exclusive OR
</A>