MASM/TASM to NASM Converter? 
Author Message
 MASM/TASM to NASM Converter?

BUMBLEBEE BUZZ:

  Curious whether there's a reliable converter for MASM/TASM to NASM
snippets or even whole programs, or whether such a beast is just too
annoying or difficult to write. Would such a tool as ANTLR be useful
for such a task (or PCCTS)? It's been difficult to find the good and
useful information, in a huge mountain of information from Googling.

  [ http://www.*-*-*.com/ ]
  [ http://www.*-*-*.com/ ]

  How difficult is it to become accustomed to translating from other
to NASM (or HLA), if it's indeed best to just get used to manual and
time-consuming translation? Are there especial gotchas?

  Another buzzy question which one may hope makes sense is how might
one best load up a huge database (sparse matrix of relationships) in
C/C++ then feed it to a complex assembler routine for a CPU-melting,
light-flashing analysis (thinking of using either [PostgreSQL] or an
allegedly excellent [Firebird (InterBase) DBMS])? If it did not make
sense, then never mind. I'm tired too much of the time and questions
may not be up to par.

  [ http://www.*-*-*.com/ ]
  [ http://www.*-*-*.com/ ]

  "Mumbling & Bumbling Engineer"



Sat, 30 Oct 2004 05:02:40 GMT  
 MASM/TASM to NASM Converter?


Quote:
> BUMBLEBEE BUZZ:

>   Curious whether there's a reliable converter for MASM/TASM to NASM
> snippets or even whole programs, or whether such a beast is just too
> annoying or difficult to write.

None that I'm aware of.
Definitely the beast is a bit difficult to write.

Quote:
>Would such a tool as ANTLR be useful
> for such a task (or PCCTS)? It's been difficult to find the good and
> useful information, in a huge mountain of information from Googling.

Note that the HLA compiler (written in Flex/Bison/C) is similar in
principle to what you're asking for (though it translates HLA to MASM
which is a bit more complex than MASM to NASM; but not by a
tremendous amount).  The HLA compiler is well over 100,000 lines
of code.  Now a MASM to NASM translator might be only about
half the work of the HLA to MASM translator (i.e., the HLA compiler),
but we're still talking about a lot of work here.

I looked at ANTLR/PCCTS a couple of years ago as an alternative
to Flex/Bison (because Flex &  Bison are not appropriate tools for
writing assemblers [or even compilers IMHO]).  While better than
Flex/Bison, ANTLR didn't jump out and say "I'm so much better
that you won't have the problems you're having with Flex & Bison."

Quote:
>   How difficult is it to become accustomed to translating from other
> to NASM (or HLA), if it's indeed best to just get used to manual and
> time-consuming translation? Are there especial gotchas?

It's really not all that hard.  You do have to get comfortable with
both the target and destination languages, however.
It may seem like a paradox, but MASM->HLA is probably easier to
do (correctly) than MASM->NASM.  The reason is due to the fact
that HLA's syntax is much more different from MASM's than is NASM's
from MASM.  As a result, little MASMism probably won't creep in
as often.

Quote:

>   Another buzzy question which one may hope makes sense is how might
> one best load up a huge database (sparse matrix of relationships) in
> C/C++ then feed it to a complex assembler routine for a CPU-melting,
> light-flashing analysis (thinking of using either [PostgreSQL] or an
> allegedly excellent [Firebird (InterBase) DBMS])? If it did not make
> sense, then never mind. I'm tired too much of the time and questions
> may not be up to par.

Would have to know more about the table structure...
Randy Hyde


Mon, 15 Nov 2004 05:28:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. TASM to NASM and/or NASM to TASM

2. nasm, tasm, masm, hla

3. tasm masm nasm dazm ...

4. +/- of TASM, MASM, NASM

5. MASM/TASM/NASM Testing :

6. MASM/TASM/NASM Testing 2 (1 are errors)

7. NASM - working alternative to TASM and MASM?

8. Can anyone tell me how much space I have left MASM/TASM/NASM

9. MASM v TASM v NASM v etc

10. MASM/TASM/WASM/NASM

11. a question about TASM/MASM and NASM

12. +/- of TASM, MASM, NASM

 

 
Powered by phpBB® Forum Software