Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédente | |||
back2root:ibm-pc-ms-dos:instr:xlat-xlatb [2023/03/04 13:25] – [Tableau] 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 22: | Ligne 24: | ||
^ Operands | ^ Operands | ||
| table | 11 | 5 | 5 | 4 | 1 | | | | table | 11 | 5 | 5 | 4 | 1 | | | ||
+ | |||
+ | This instruction replace the following code: | ||
+ | |||
+ | <code asm> | ||
+ | XOR AH,AH | ||
+ | ADD BX,AX | ||
+ | MOV AL, | ||
+ | </ | ||
+ | |||
{{page>: | {{page>: | ||