Hello. I have a simply programs that sums two numbers in assembler. I also have a c program with a .h file that must use that program.
But I always got as a result a 0.
This is my asm code
This is my .h code
MyProc proc var1:REAL4, var2:REAL4
fwait ;<- is this really needed?
mov eax, retval
extern "C" unsigned long __stdcall __MyProc(float, float);
float MyProc(float f1, float f2);
and this is my C code
printf("Enter first number\n\n");
printf("Enter second number\n\n");
total2 = MyProc(f1, f2);
printf("Total is: %d", total2);
while ( (ch = getchar()) != '\n' && ch != EOF) ;
printf("\n\nPress ENTER to continue.");
while ( (ch = getchar()) != '\n' && ch != EOF)
if(ch=='\n' || ch==EOF)