Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!nysernic!itsgw!batcomputer!pyramid!voder!kontron!cramer
From: cramer@kontron.UUCP (Clayton Cramer)
Newsgroups: comp.lang.c
Subject: Re: Assembly langauge subroutines for use with C
Message-ID: <1731@kontron.UUCP>
Date: Tue, 21-Jul-87 13:33:31 EDT
Article-I.D.: kontron.1731
Posted: Tue Jul 21 13:33:31 1987
Date-Received: Thu, 23-Jul-87 04:43:20 EDT
References: <3647@watdcsu.waterloo.edu>
Distribution: na
Organization: Kontron Electronics, Mt. View, CA
Lines: 16

> How does one go about writing an assembly function that can be linked
> and used by a C program? I have tried several times to get my modules
> to link properly but with the end result of "Unresolved external".
> I have prefaced the function name with an underscore and I still can't
> manage to get my C code to realize that yes, there is an assembly function
> by that name in one of the linked modules. HELP!
> I'm using MSC 4.0 on an IBM-PC AT.
> 
> Steve Ryder, Independent Studies, University of Waterloo

The underscore on the function name is necessary, but consider the
case.  MASM folds all names to uppercase in the symbol table unless
you use the /MX option.  If your assembler subroutine is named
"_foo", and you call it as "FOO" from C, it will work.

Clayton E>+ >+ >/B