Strange, becouse "__asm" works for me (I also use MS VC Toolkit 2k3 + Platform SDK). This code was compiled without errors:
//glFrustum(-0.104f,0.104f,-0.058f,0.058f,0.1f,100.0f);
__asm
{
push 0x40590000; ///
push 0; // 100.0
push 0x3FB99999; ///
push 0x9999999A; // 0.1
mov eax,0x0E560419
push 0x3FADB22D; ///
push eax; // 0.058
push 0xBFADB22D; ///
push eax; // -0.058
mov eax,0x76C8B439
push 0x3FBA9FBE; ///
push eax; // 0.104
push 0xBFBA9FBE; ///
push eax; // -0.104
call dword ptr glFrustum
}
Working binary: http://www.icpnet.pl/~groman/Release.rar - it's my lame demo in C++ with lot of asm, it uses OpenGL.
I use Code::Blocks with the "Microsoft Visual C++ Toolkit 2003" compiler and I've imported a project made in VC++.
There is some code in assembler and it doesn't compile.
...
The compiler doesn't know what _asm is.
you must have some other syntax error in your program, i just checked, and the following sample with your asm code compiles and runs quite fine using VCTK2003
#include <stdio.h>
#include <stdlib.h>
typedef struct tagHS {
__int32* mSrcP;
__int16* mDstP;
int mRunLength;
} HS ;
void cpInt2Short(HS h) {
_asm {
mov edi,h.mDstP
mov esi,h.mSrcP
mov ecx,h.mRunLength
copyloop:
movzx eax,WORD PTR [esi]
add esi,4
mov [edi],ax
add edi,2
dec ecx
jnz copyloop
mov h.mDstP,edi
mov h.mSrcP,esi
}
}
void someasmfoo( void)
{
#define LENGTH 10
__int32 ia1[LENGTH];
__int16 ia2[LENGTH];
HS h;
for(int i=0; i<LENGTH; i++){
ia1[i] = i+100;
}
h.mRunLength = LENGTH;
h.mSrcP = ia1;
h.mDstP = ia2;
cpInt2Short(h);
for(int i=0; i<LENGTH; i++){
printf("i: %i , ia1: %i , ia2: %i\n",i,ia1[i],ia2[i]);
}
}
int main()
{
someasmfoo();
printf("done.\n");
return 0;
}