flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 13 Mar 2010, 14:16
Code: xlat byte[ebx] xlat replaces a byte in the AL register with a byte indexed by its value in a translation table addressed by BX or EBX. The operand should be a byte memory addressed by BX or EBX with any segment prefix. This instruction has also a short form xlatb which has no operands and uses the BX or EBX address in the segment selected by DS depending on the current code setting. |
|||
![]() |
|
a115433 13 Mar 2010, 14:38
chapter 4.1, xlat.
its only 1 instruction, with no operands. |
|||
![]() |
|
revolution 13 Mar 2010, 14:47
Are you talking about the Intel manual?
Quote: D7 XLAT m8 Set AL to memory byte DS:[(E)BX + unsigned AL]. |
|||
![]() |
|
a115433 13 Mar 2010, 15:06
did you see the D7 instruction?
how it can take and not take arguments at once? |
|||
![]() |
|
revolution 13 Mar 2010, 15:21
a115433: What are you arguing? fasm is following the Intel manual. What would you have it do otherwise?
|
|||
![]() |
|
a115433 13 Mar 2010, 15:31
i just dont understand it.
0xD7 i xlat and xlatb. why fasm disallow 1 name? maybe it has something to do with adding 0x67 prefix, i dont know. what about rex.w prefix? it can take it in long mode. what will it do? rex.w = operand size override. there is no operand, always only 1 byte is transfered! |
|||
![]() |
|
revolution 13 Mar 2010, 15:33
What happens here?
Code: xlat byte[bx] xlat byte[ebx] xlat byte[rbx] |
|||
![]() |
|
a115433 13 Mar 2010, 15:48
real mode:
d7 67 d7 error protected mode: 67 d7 d7 error long mode: error 67 d7 d7 |
|||
![]() |
|
revolution 13 Mar 2010, 16:16
So the parameter is necessary.
|
|||
![]() |
|
baldr 13 Mar 2010, 19:59
a115433,
Difference between xlat m8 and xlatb is quite obvious. |
|||
![]() |
|
a115433 13 Mar 2010, 22:06
its the same instruction, i still dont get any diffrence.
|
|||
![]() |
|
baldr 14 Mar 2010, 00:45
a115433,
One instruction (xlat mnemonic) requires m8 operand, other is operand-less. They can have the same opcode, though. |
|||
![]() |
|
a115433 14 Mar 2010, 12:51
ok, so how does this assembler work?
is it opcode based, or mnemonic based? whats more important? i mean if they translate mnemonics to instructions, or just give names to certain opcodes to make them easier to use. i guess its mnemonic base, because 2 names = 1 opcode. anyway i thinbk xlat suck. no pipeline, 4 clocks, and waste of *bx. mov is better, you can add displacement to it and sib if you want to. and you can access byte/wrd/dword/qword, as you want. |
|||
![]() |
|
revolution 14 Mar 2010, 12:55
Well xlatb is a shortcut for when you don't need a different segment register or a different address size. The real instruction is actually xlat m8 which gives the most flexibility.
Anyhow, you are not forced to use it if you don't like it. Each to their own I guess. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.