Bizarre String-Printing Behavior

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Puffy
Member
Member
Posts: 26
Joined: Mon May 26, 2008 7:00 am

Re: Bizarre String-Printing Behavior

Post by Puffy »

I want to kiss you all over, that worked.

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"
      );
}

Post Reply