Here is the code in C++:
#include <iostream>
using namespace std;
double CombineC(int a, int b, int c, int d, int e, double f)
{
return (a+b+c+d+e)/(f+1.5);
}
// NOTE: extern "C" needed to prevent C++ name mangling
extern "C" double CombineA(int a, int b, int c, int d, int e, double f);
int main(void)
{
cout << "CombineC: " << CombineC(1,2,3,4, 5, 6.1) << endl;
cout << "CombineA: " << CombineA(1,2,3,4, 5, 6.1) << endl;
return 0;
}
I want the CombineA function to do the same thing as CombineC does and to be written in .asm. The program is in 32-bit.
We are using MASM32 ver11 and Visual Studio 2010. Could anyone simply write the assembly part for this and tell me what I should do to link them?
Sorry I don't have any experience about either assembly or C but have to do this... Any help will be appreciated!
Why make you not a Static Libaray
> Sorry I don't have any experience about either assembly or C but have to do this... Any help will be appreciated!
If you neither write C or assembler, the solution is "Rent A Coder". This forum is not a grovelware emporium.