Mail Archives: djgpp/2000/05/01/17:16:42
Simply like this
ASM source
proc _SETpix__Fssc
code
code
endproc
where the 's' is standing for short int and the ''c'' is standing for
char. (byte)
I also had the same problem in the beginning.
The declaration in the .h file wasnt right. together with the asm parameters
extern void SETpix (short x, short y, char col);
Now my code works fine with NASM and DJGGP.
Riox / Desire.
thiebosch AT hetnet DOT nl
Alexei A. Frounze <alex DOT fru AT mtu-net DOT ru> schreef in berichtnieuws
3909DD56 DOT 7BD63105 AT mtu-net DOT ru...
> 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++.
>
> --
> Alexei A. Frounze
> -----------------------------------------
> Homepage: http://alexfru.chat.ru
> Mirror: http://members.xoom.com/alexfru
>
>
> Joseph Rose wrote:
> >
> > Just before my last message, I put 'extern' before the prototypes of the
asm
> > functions in my header. I forgot to post the header. It follows.
> >
> > -----------------------
> > /*
> > file://Header for VGADr386 library.
> > file://Requires dpmi.h.
> > */
> > #ifndef _VGADraw_internal
> > extern short VidSel;
> > extern __dpmi_paddr VidBuffer;
> > extern char TmpVidBuffer [63999];
> > #endif
> > 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);
> >
> > --------------------------------
> >
> > Hans-Bernhard Broeker wrote:
> >
> > > In article <39096460 DOT 1D069B39 AT pop DOT gis DOT net> you wrote:
> > > > When I link the test code for my graphics library, I get no error
> > > > message on references to C++ functions, but I get 'undefined
reference'
> > > > error messages at every line of C++ code containing a function call
to
> > > > an assembler routine. I'm using nasm; GLOBAL statements appear at
the
> > > > beginning of the source for about every function in the source
without
> > > > any extra specifiers, and my functions start with just a label
followed
> > > > by a colon. Every other technique I've tried didn't assemble at
all.
> > >
> > > Unless my memory fails me even more badly than usually, I've already
> > > answered that question, answering an earlier posting of yours:
> > >
> > > You need 'extern "C"' qualifiers in the prototypes for those
> > > assembly functions.
> > >
> > > --
> > > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
> > > Even if all the snow were burnt, ashes would remain.
>
>
- Raw text -