Mail Archives: djgpp/2000/04/28/21:42:59
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 -