Why won't it compile?

I have the following code:

// ASSEMBLY LANGUAGE RANDOM NUMBER GENERATOR FOR GNU COMPILER
long int randnum( long int old_seed ) {
// old_seed passed into function in eax register
register long int new_seed asm( "edx" );
asm( "mov $950706376,%%ecx \n\t"
"mul %%ecx \n\t"
"mov $2147483647,%%ecx \n\t"
"div %%ecx "
: : "g" (old_seed) : "%eax", "%ecx", "%edx" );
return new_seed;
}



It compiles when using a GNU compiler. But it won't compile on Visual Studio 2010. Does anyone know why? Can the code be changed in such a way so that it'll compile on VS?

Thanks.
Topic archived. No new replies allowed.