View Single Post
Old 24th June 2002, 15:38   #6  |  Link
drstock
Registered User
 
Join Date: Mar 2002
Posts: 5
From the top of my head:

Code:
void main() {
  char vendor[13];
  _asm {
    xor eax,eax
    db 0fh,0a2h // CPUID
    mov vendor,ebx
    mov [vendor+4],edx
    mov [vendor+8],ecx
  }
  vendor[12] = '\0';
  printf("%s\n",vendor);
}
This is far from the best way to do it but you can do a lot more magic with the CPUID instruction.

Btw, it's been a while since i coded assembler, but you should get the picture. =)
drstock is offline   Reply With Quote