Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
back2root:ibm-pc-ms-dos:instr:xlat-xlatb [2023/03/04 13:24] – créée frater | back2root:ibm-pc-ms-dos:instr:xlat-xlatb [2023/03/04 13:26] (Version actuelle) – frater | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
===== XLAT/XLATB - Translate ===== | ===== XLAT/XLATB - Translate ===== | ||
- | Replaces the byte in AL with byte from a user table addressed by BX. | + | 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. |
- | The original value of AL is the index into the translate | + | Locates a byte entry in a table in memory, using the contents |
+ | |||
+ | 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, | ||
**Usage:** | **Usage:** | ||
Ligne 19: | Ligne 21: | ||
</ | </ | ||
{{tablelayout? | {{tablelayout? | ||
- | ^ ^ Clocks | + | ^ ^ Clocks |
- | ^ Operands | + | ^ Operands |
- | | table | | + | | table | |
+ | |||
+ | This instruction replace the following code: | ||
+ | |||
+ | <code asm> | ||
+ | XOR AH, | ||
+ | ADD BX, | ||
+ | MOV AL, | ||
+ | </ | ||
{{page>: | {{page>: | ||