When I try to compile this code:
#include
main(int argc, char *argv[]) {
double y = 0;
__asm__ (\"fldl $150;\"
\"fsqrt;\"
I do not know of an assembly language which supports literal floating point constants for immediate use. The usual means is to declare initialized storage containing the floating point constant and referencing it:
const1: dq 1.2345
...
fldl const1
For the example you give, it is possible to do this more directly:
printf ("%f\n", sqrt (150));
Otherwise, this must be an artificially complicated project, perhaps homework.