Replaces the byte in AL with byte from a user table addressed by BX. The original value of AL is the index into the translate table.
Locates a byte entry in a table in memory, using the contents of the AL register as a table index, then copies the contents of the table entry back into the AL register.
The index in the AL register is treated as an unsigned integer. The XLAT and XLATB instructions get the base address of the table in memory from either the DS:EBX or the DS:BX registers (depending on the address-size attribute of the instruction, 32 or 16, respectively).
Usage:
XLAT transition-table ; XLATB ; masm 5.x
Modifies flags:
none
Clocks | Size | |||||
---|---|---|---|---|---|---|
Operands | 808x | 286 | 386 | 486 | Bytes | |
table | 11 | 5 | 5 | 4 | 1 |
This instruction replace the following code:
XOR AH,AH ADD BX,AX MOV AL,BYTE PTR DS:[BX]