ASM floating point problem
This is my code and problems:
Code:
#include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <conio.h>
using namespace std;
float angle=45, result, output;
int main()
{
__asm("fsinx %1,%0" : "=f" (angle) : "f" (result));
printf("Eventually I'll insert the output here");
getch();
}
and these are my compiling errors:
In function `int main()':
output constraint 0 must specify a single register
output operand 0 must use `&' constraint
[Build Error] [main.o] Error 1
I really need to use floating point math with ASM for my Mandelbrot generator, but I cant even get this simple code working. Does anyone know how to properly compile this code with DevCpp? And if so can you please explain how to properly do floating point mathematics with ASM in DevCpp
Gratsi