Re: Bizarre String-Printing Behavior
Posted: Thu Jul 24, 2008 3:11 am
I want to kiss you all over, that worked.
Here's the working function:
Here's the working function:
Code: Select all
void getCPUVendor(char *rtn)
{
asm volatile(
".intel_syntax noprefix;"
"mov eax,0;"
"cpuid;"
"mov [%0],ebx;"
"mov [%0+4],edx;"
"mov [%0+8],ecx;"
"movb [%0+12],0;"
".att_syntax;" : : "r" (rtn) : "eax", "ebx", "ecx", "edx"
);
}