home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.msdos.programmer
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!usc!cs.utexas.edu!tamsun.tamu.edu!zeus.tamu.edu!ski8032
- From: ski8032@zeus.tamu.edu (THE MAN BEHIND THE CURTAIN)
- Subject: Re: Calling ASM from BC++
- Message-ID: <3SEP199208574974@zeus.tamu.edu>
- News-Software: VAX/VMS VNEWS 1.41
- Keywords: c++ asm
- Sender: news@tamsun.tamu.edu (Read News)
- Organization: Texas A&M University, Academic Computing Services
- References: <1992Aug24.204813.16175@schunix.uucp>
- Date: Thu, 3 Sep 1992 13:57:00 GMT
- Lines: 33
-
- In article <1992Aug24.204813.16175@schunix.uucp>, sonix@schunix.uucp (Duane Morin) writes...
- >I'm trying to call an assembly routine from some standard Borland C++ (2.0)
- >code. Here's what I've got (in the C++):
- >..
- >..
- >..
- >But C++ fails to recognize the foo_bar3 function. Keeps telling me
- >unrecognized symbol. As if it doesn't get the connection, because I'm not
- >declaring the two int parameters in the actual definition in the ASM file.
- >I got the syntax for doing this out of an "Interfacing C and ASM" book, so
- >I assume that maybe I need to do somethng else to make this work in C++.
-
- The problem here, as was mentioned by someone else, is the name mangling
- that C++ performs. If you don't wish to have to declare it as a C function,
- or even worse, have to painfully trudge through some compiler's rules for
- name mangling, then you could do the following:
- Tell the compiler to generate ASM output. Take a look at it, and see
- what name is generated for the function. Then just use this name in
- your asm file.
-
- >Thank you,
- > Duane Morin
- > Walker Sonix, Inc.
- > sonix@schunix.uucp
-
- Incidentally, I tried to reply earlier, but your account bounced. So I'm
- following up, hoping that you will see this.
-
- Till next time,
-
- <> Sam Inala <>
- ski8032@zeus.tamu.edu
-
-