void get_cpu_id() { char szBuf[256] = {0}; unsigned int s1 = 0U; unsigned int s2 = 0U; _asm{ MOV EAX,01H XOR EDX,EDX CPUID MOV DWORD PTR[s1],EDX MOV DWORD PTR[s2],EAX } printf(szBuf, "%08X%08X", s1, s2); }
获取CPU编号
时间: 2024-10-15 10:58:01
void get_cpu_id() { char szBuf[256] = {0}; unsigned int s1 = 0U; unsigned int s2 = 0U; _asm{ MOV EAX,01H XOR EDX,EDX CPUID MOV DWORD PTR[s1],EDX MOV DWORD PTR[s2],EAX } printf(szBuf, "%08X%08X", s1, s2); }
获取CPU编号