
Instruction Set
4-248
XLAT
Translate Table Index to Component
XLAT
XLATB Translate Table Index to Byte
What It Does
XLAT translates the offset index of a byte stored in memory to the value of that byte.
Syntax
Description
XLAT changes the AL register from the table index to the table entry. The AL register should
be an unsigned index into a table addressed by the DS:BX register pair.
The operand allows for the possibility of a segment override, but the instruction uses the
contents of the BX register even if it differs from the offset of the operand. Load the operand
offset into the BX register—and the table index into AL—before executing XLAT.
Use the no-operand form, XLATB, if the table referenced by BX resides in the DS segment.
Operation It Performs
Flag Settings After Instruction
Form
Opcode
Description
Clocks
Am186 Am188
XLAT
m8
D7
Set AL to memory byte segment:[BX+unsigned AL]
11
15
XLATB
D7
Set AL to memory byte DS:[BX +unsigned AL]
11
15
Use this form to override the default source segment
(DS), and to have the assembler type-check your
operand. In this form, base is segment:[BX].
XLAT
base
XLATB
To translate AL to the value of the byte
located at offset [BX][AL] in the segment
specified in DS, use this form.
/* extend index */
temp = 0x00FF & AL;
/* store indexed component in AL */
AL = DS:[BX + temp];
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
–
–
–
– res – res – res –
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...