a.cpp:
#include
int main(int argc, char **argv) {
int b;
for (int a = 0; a < 5; a++) {
asm ( "mov %1, %%eax; " // a into eax
"cpuid;"
"mov %%eax, %0;" // eeax into b
:"=r"(b) /* output */
:"r"(a) /* input */
:"%eax" /* clobbered register */
);
std::cout << "The code " << a << " gives " << b << std::endl;
}
return 0;
}
# g++ a.cpp -o a
# exec ./a
The code 0 gives 5
The code 1 gives 3908
The code 2 gives 1616597249
# echo "obase=16; 3908" | bc
F44
http://processorfinder.intel.com
in search sSpec=0F44h
or
sudo dmidecode --type bios
sudo biosdecode
sudo hwinfo --bios | less
sudo lshw
gksudo lshw-gtk
Комментариев нет:
Отправить комментарий