From: dontmailme AT iname DOT com (Steamer) Newsgroups: comp.os.msdos.djgpp Subject: Re: MASM coff images Date: Sat, 27 May 2000 19:15:49 GMT Organization: always disorganized Lines: 30 Message-ID: <39301ea2.9896444@news.freeserve.net> References: <04039b30 DOT 28983095 AT usw-ex0101-008 DOT remarq DOT com> NNTP-Posting-Host: modem-13.wisconsin.dialup.pol.co.uk X-Trace: news7.svr.pol.co.uk 959454950 11024 62.137.99.13 (27 May 2000 19:15:50 GMT) NNTP-Posting-Date: 27 May 2000 19:15:50 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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.