XLAT
TRANSLATE
XLAT
Operation:
AL
+-
((BX) + (AL))
Description:
XLAT translate-table
XLAT (translate) replac;es a byte in the AL
register with a byte from a 256-byte, user-
coded translation table. Register
BX
is
assumed to point to the beginning
of
the table.
The byte in AL
is
used as an index into the
table and
is
replaced by the byte
at
the offset in
the table corresponding to
AL's
binary value.
Encoding:
11010111
Flags
Affected:
None
The first byte in the table has an offset
of
O.
For example, if AL contains 5H, and the sixth
element
of
the translation table contains 33H,
then AL will contain 33H following the
instruction.
XLA
T
is
useful for translating
characters from one code to another, the
classic example being ASCII to EBCDIC or
the reverse.
XLAT Operands Clocks Transfers
Bytes
XLAT Coding Example
source-table
11
-1
1
XLA T
ASCII_TAB
2-163