lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


hello, Joe Wilson <developir@yahoo.com>.

On Wed, 24 Oct 2007 10:51:28 -0700 (PDT)
Joe Wilson <developir@yahoo.com> wrote:

> DynASM appears to take x86 opcodes as input, generates some sort 
> of intermediate non-CPU-specific representation, and then creates 
> machine code for x86.
> 
> Even if DynASM *could* target other CPU architectures (which I don't 
> think it does yet), such as ARM or MIPS, would the DynASM input still 
> remain this x86-like opcode syntax?
Mike describes everything. %-) DynASM is a "low-level assembler" +
"middle-level semiinterpreter". DynASM translates asm instructions into
machine code (with some fields left undefined -- we can call 'em
'relocs' -- althru it is not quite right) and then a little
'interpreter' generates the actual code.

to make a long story short -- it's very x86 specific in current form,
but as far as i can understand -- it's easily adaptable for another
arch.

i just want say it again: LuaJIT is an amazing piece of code! %-)

btw: you'd better not use LuaJIT disasm for 16-bit disassembly -- there
are weird bugs with 16-bit mode. especially with MOD/RM decrypting. and
it falls with operand sizes too. nevertheless, the code is brilliant. i
loose my early fixes and now i can't use simple 'diff' to send fixes
back to Mike, but i'll try to send some fixed code for disasm later.

no fatal bugs in asm found so far (i'm not using asm for 16 bit %-).

just in case: i'm using this code only for my own, so no license
violations. %-) and i promise to rip off the fixes as soon as it will
be possible. i'm writing yet another x86 debuger right now (die, GDB!)
if i'll ever finish it, it will be on LuaForge as public domain
(except for LuaJIT parts, of course). %-)

p.s.: sorry for my English...