I recently downloaded DJGPP. So far I've been able to access the LFB and double buffer in all modes (that support it). Very nice. But, my bilinear interpolation function really needs to be in assembly. I cannot write the thing in TASM or MASM because DJGPP does not read OBJs (very stupid).
This is not one of those - I've not read the FAQ and cannot get assembly to work in DJGPP questions. I have read the FAQ, and more FAQs, and the guide to GNU assembler.
The result: mass confusion, information overload, hate At&T syntax.
I'm wanting to access the FPU in DJGPP. It can be done, but the syntax is killing me. I also read Brennan's tutorial. Also, there was a blurb about GAS accepting the Intel syntax, but all links to it were broken or messed up. Is there a way to get the inline assembler to accept Intel syntax, or am I stuck with AT&T?
This is very annoying because I should not have to re-learn a syntax just to use assembly on an Intel/AMD platform. The problem is not related to my knowledge of assembler, it is related to syntax which, to me, is very annoying. And, if I do re-learn the syntax, when I go back to Intel syntax it will be a huge mess. There needs to be a standard of some type on cross-platform compilers. If AT&T is the standard and not Intel (probably the case), I'm in for some very long nights.
Here is my Intel inline asm: linear interpolation
Simple. I normally do not ask others to re-write my code or provide extensive snippets for me to copy. But, in this case, I need someone to write the code for me so I can cross-compare the two and perhaps really learn something.Code:unsigned int LI(unsigned int v1,unsigned int v2,double f1) { unsigned int rval=0; asm { INITFPU: finit INTERP: fild v2 fisub v1 fmul f1 fiadd v1 fistp rval } return rval; }
I know that it should be something like:
"fild %1":"<register>"(v1)
I don't know what <register> should be or maybe I'm way off.
Help. I'm going out of my mind.