#include
static inline void cpuid(unsigned int op,
unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx)
{
*eax = op;
*ecx = 0;
asm("cpuid"
: "=a" (*eax),
"=b" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "0" (*eax), "2" (*ecx));
}
int main(void)
{
unsigned int v[4];
cpuid(0x80000001,&v[0],&v[1],&v[2],&v[3]);
if(v[3] & (1<<20))
printf("it has actived PAE!\n");
else
printf("not active PAE!\n");
printf("\n");
printf("EAX output:%#x\n",v[0]);
printf("EBX output:%#x\n",v[1]);
printf("ECX output:%#x\n",v[2]);
printf("EDX output:%#x\n",v[3]);
return 0;
}
阅读(909) | 评论(0) | 转发(0) |