mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-19 13:23:27 +03:00
3256dedea8
git-svn-id: svn://kolibrios.org@1665 a494cfbc-eb01-0410-851d-a64ba20cac60
34 lines
632 B
C
34 lines
632 B
C
|
|
int cmd_ccpuid(char param[])
|
|
{
|
|
unsigned a, b, c, d;
|
|
char str[13];
|
|
|
|
str[12] = '\0';
|
|
|
|
asm ("cpuid" :
|
|
"=a" (a),
|
|
"=b" (b),
|
|
"=c" (c),
|
|
"=d" (d):
|
|
"a"(0));
|
|
|
|
str[0] = (b&0x000000ff) >> 0;
|
|
str[1] = (b&0x0000ff00) >> 8;
|
|
str[2] = (b&0x00ff0000) >> 16;
|
|
str[3] = (b&0xff000000) >> 24;
|
|
|
|
str[4] = (d&0x000000ff) >> 0;
|
|
str[5] = (d&0x0000ff00) >> 8;
|
|
str[6] = (d&0x00ff0000) >> 16;
|
|
str[7] = (d&0xff000000) >> 24;
|
|
|
|
str[8] = (c&0x000000ff) >> 0;
|
|
str[9] = (c&0x0000ff00) >> 8;
|
|
str[10] = (c&0x00ff0000) >> 16;
|
|
str[11] = (c&0xff000000) >> 24;
|
|
|
|
printf("%s\n\r", str);
|
|
return TRUE;
|
|
}
|