Mail Archives: djgpp/2000/05/27/15:45:20
Dogansmoobs wrote:
>I have a lot of code written a while ago when I used MASM that I
>would not like to lose. I read that you could compile a MASM
>source to a coff image, which I figured out how to do. I try to
>write a C program to call the asm functions, but no matter what
>I try, I still get undefined refrence to [function].
Unfortunately, Microsoft's COFF is not the same as DJGPP's COFF,
so there's no hope of this working. If you want to use assembly
language with DJGPP you really have to use either NASM or Gas.
>I am getting the impression from the FAQ that this is not done
>all that often, but I would hate to convert all my code int AT&T
>syntax. Any help at all would be appreciated, or any advice on
>where else to ask this question if no one here could help me
>would be good too.
Converting to NASM syntax would probably be easier than converting
to Gas (AT&T) syntax.
Alternatively, it should be possible to write an MS-COFF-to-DJGPP-COFF
converter, especially as the two formats are so similar. Obviously
this would not be a particularly trivial undertaking, but it might be
easier than converting all your asm source code (depending on how much
there is and how un-NASM-like your MASM coding style is). See the
comments in the file outcoff.c in the NASM sources for a list of the
differences between the two types of COFF.
S.
- Raw text -