delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/27/13:30:16

X-Originating-Host: 63.25.175.1
Organization: http://www.remarq.com: The World's Usenet/Discussions Start Here
Subject: MASM coff images
Lines: 42
From: Dogansmoobs <dogansmoobsNOdoSPAM AT hotmail DOT com DOT invalid>
Newsgroups: comp.os.msdos.djgpp
Message-ID: <04039b30.28983095@usw-ex0101-008.remarq.com>
Bytes: 1378
X-Wren-Trace: eERhSUhRFlwXAF9LQApWQFlYVlJhSAtGTElCSwNTUgkLFFcLGFEfGx8QDhA=
Date: Sat, 27 May 2000 09:59:08 -0700
NNTP-Posting-Host: 10.0.2.8
X-Complaints-To: wrenabuse AT remarq DOT com
X-Trace: WReNphoon3 959447457 10.0.2.8 (Sat, 27 May 2000 10:10:57 PDT)
NNTP-Posting-Date: Sat, 27 May 2000 10:10:57 PDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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].

I am using MASM 6.11.
I am setting up my asm files like so (I'm doing this from
memory, so it could be wrong):

.486
.MODEL MEDIUM,C
.CODE

PUBLIC _function
_function PROC C
     stuff
     ret
_function ENDP

END

I am compiling with:
    ml /Zm /coff /c [file].asm
 - the /Zm switch is to allow MASM 5.x syntax
 - the /coff switch is to compile to coff, not microsoft obj
 - the /c is to compile and not link

I have tried making a prototype of the function and with and
without the underscore (in both the asm file and the c file).

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.

 - Dogansmoobs
A carrot is the closest a rabbit gets to a diamond.

* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019