What does xlat do in asm32?
Is it equivalent to mov al, ?
and what's the difference between xlat & xlatb?

What's the difference between
string db "string",0
lea ebx, string

string db "string",0
mov ebx, OFFSET string

What's with the movs instruction?
Can I use this:
source db ...
dest db ...
mov esi OFFSET source
mov edi OFFSET dest
mov ecx, count
rep movsb

to copy source to dest and is ecx or just cx used in this code?
Posted on 2002-06-03 15:49:53 by Vaxon
I got this from Hyde's tutorial that I'm reading

6.4.3 The XLAT Instruction
The xlat instruction translates the value in the al register based on a lookup table in
memory. It does the following:
temp := al+bx
al := ds:
that is, bx points at a table in the current data segment. Xlat replaces the value in al with the
byte at the offset originally in al. If al contains four, xlat replaces the value in al with the
fifth item (offset four) within the table pointed at by ds:bx. The xlat instruction takes the
Typically it has no operand. You can specify one but the assembler virtually ignores it.
The only purpose for specifying an operand is so you can provide a segment override pre-
xlat es:Table
This tells the assembler to emit an es: segment prefix byte before the instruction. You must
still load bx with the address of Table; the form above does not provide the address of
Table to the instruction. Only the segment override prefix in the operand is significant.
The xlat instruction does not affect the 80x86?s flags register.
Posted on 2002-06-03 15:52:23 by gorshing
lea calculates the address, so if
something is on the stack:
then lea will at runtime get the

No, db just reserves space

mov eax, offset x
moves the offset of x to the eax register

Posted on 2002-06-03 16:00:37 by bdjames

XLATB is used to swap a BYTE value to a know value in a 256 BYTE table.

You put the table address in EBX and then call XLATB to swap the byte value with the value in the table.

It is used for things like character set translations, ASCII to EBCDIC for example but you can often find other uses for it.

You can also use a table of different sizes and use the normal indexing in addressing to access items in a table.


Posted on 2002-06-03 23:02:51 by hutch--

4 cycles with no pairing.(XLAT/XLATB)
Posted on 2002-06-03 23:14:54 by bdjames
Got it.
Thank you:cool:
Posted on 2002-06-04 15:48:51 by Vaxon