delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/28/21:42:59

From: Joseph Rose <jorose AT mail DOT gis DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 3rd Try: Maybe an asm problem? (Problems linking)
Date: Fri, 28 Apr 2000 22:22:47 -0400
Organization: Posted via Supernews, http://www.supernews.com
Lines: 37
Message-ID: <390A4777.AAB7D23D@pop.gis.net>
References: <200004281112 DOT NAA29833 AT acp3bf DOT physik DOT rwth-aachen DOT de> <3909D92B DOT CC80284C AT pop DOT gis DOT net> <3909DD56 DOT 7BD63105 AT mtu-net DOT ru> <390A01E6 DOT D8D52F3 AT pop DOT gis DOT net> <390a1086 DOT 51973341 AT news DOT freeserve DOT net>
X-Complaints-To: newsabuse AT supernews DOT com
X-Mailer: Mozilla 4.7 [en]C-NECCK (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I need to access in my asm code a variable defined by the C++ code.  I need to know
about this "name-mangling!"

Steamer wrote:

> Joseph Rose wrote:
>
> >"Alexei A. Frounze" wrote:
> >
> >> AFAIK you should add some characters to your external ASM subroutines... These
> >> characters must represent type of passed parameters. I don't remember how
> >> exactly, but that might help you. I don't add these chracters with plane C, but
> >> parhaps they are needed for C++.
> >>
> >
> >I don't know about these characters.  All I know is to add an underscore to the
> >beginning of function names.
>
> This is the name-mangling I mentioned.  C++ does it, but C doesn't.
> You could change your asm, but the simplest thing is to change your
> C++ header files:
>
> extern "C" {
>  extern void SetGrMode (void);
>  extern void Draw_Line_Horiz (int X, int Y, int Len, char Col);
>  extern void Draw_Line_Vert (long X, long Y, short Len, char Col);
>  extern void Draw_Tri (long X1, long Y1, long X2, long Y2, long X3, long Y3,
> char Col);
> }
>
> >BTW: I'm new to the internet.  What are "AFAIK," "IMHO," etc.?
>
> AFAIK = as far as I know
> IMHO = in my humble opinion
>
> S.

- Raw text -


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