XLAT changes the AL register from the table index to the table entry. AL should be the unsigned index into a table addressed by DS:BX (for an address-size attribute of 16 bits) or DS:EBX (for an address-size attribute of 32 bits).
The operand to XLAT, translate_table, allows for the possibility of a segment override. XLAT uses the contents of eBX even if they differ from the offset of the operand. The offset of the operand must be loaded into eBX before the instruction is executed.
The no-operand form, XLATB, can be used if translate_table resides in the DS segment.
Note AL, as a byte-sized index, can address up to 256 elements of translate_table.
Example: ; Translate decimal to hex digit dataseg hex_table db "0123456789ABCDEF" codeseg mov bx,offset hex_table ; Pointer to table into BX mov al,11 ; Value to be translated to AL xlat [hex_table] ; Translate the value in AL ; al = "B"