Write functions in assembly ?
Hello all,
Is there some way to write just a function (or
method - c++) in assembly that will be called from a main program ? (Receiving the parameters passed to it)
Example :
file main.c:
--------
#include <stdio.h>
#include "myfunction.h"
int main( void )
{
int a = 10 , b = 20 , c = 0;
c = myfunction( &a, &b );
return c;
}file myfunction.h
------
extern int myfunction( int *, int * );
file myfunction.c <<-- this file in assembly !
-------
int myfunction( int *var1 , int *var2 )
{
*var1 = *var2 + *var1;
return *var2 * var1;
} Thanks
Rodrigo F Baroni
_______________________________________________________________________
Busca Yahoo!
O serviço de busca mais completo da Internet. O que você pensar o Yahoo! encontra.
http://br.busca.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html