{"id":291,"date":"2020-04-19T21:53:06","date_gmt":"2020-04-19T19:53:06","guid":{"rendered":"https:\/\/3dnikita.com\/blog\/?p=291"},"modified":"2020-04-20T00:03:15","modified_gmt":"2020-04-19T22:03:15","slug":"cpuinfo","status":"publish","type":"post","link":"https:\/\/3dnikita.com\/blog\/2020\/04\/19\/cpuinfo\/","title":{"rendered":"cpuinfo"},"content":{"rendered":"\n<p> I have a whole load of unfinished hobby projects. Many times I was taken by some idea, implemented the most challenging part and lost my interest.<br>But some of the projects have been actually finished and may be interesting to someone.<br><\/p>\n\n\n\n<p>It&#8217;s time to let the world see my creations \ud83d\ude42<\/p>\n\n\n\n<p>The hero of the day is the small cross-platform utility that measures the clock speed of the CPU and shows it alongside its summary information, such as brand name, family, stepping, etc.<\/p>\n\n\n\n<p>It started as a command-line application made in Borland C++ Builder. This IDE provides a straightforward and convenient syntax for embedding the x86 Assembler instructions into your regular C++ code. Which is great, when your application built around one of them: <a href=\"https:\/\/c9x.me\/x86\/html\/file_module_x86_id_278.html\"><em>rdtsc<\/em><\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/0_freq.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/0_freq.png\" alt=\"\" class=\"wp-image-292\" width=\"668\" height=\"331\" srcset=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/0_freq.png 668w, https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/0_freq-350x173.png 350w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><figcaption>freq.exe (<a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/freq.zip\">download archive<\/a>)<\/figcaption><\/figure><\/div>\n\n\n\n<p>Here&#8217;s the code (please take into account, that I was not professional or even amateur programmer back then, so give me some slack): <br><\/p>\n\n\n\n<!--more-->\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><div style=\"position:absolute;top:-24px;right:0px;cursor:pointer\" class=\"copy-simple-code-block\"><svg aria-hidden=\"true\" role=\"img\" focusable=\"false\" class=\"dashicon dashicons-admin-page\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewbox=\"0 0 20 20\"><path d=\"M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z\"><\/path><\/svg><\/div><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"c_cpp\" data-theme=\"textmate\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"true\">#include &lt;stdio.h>\n#include &lt;conio.h>\n#include &lt;windows.h>\n\n__int64 Get_freq() {\n\n\tDWORD ts_hi, ts_lo;\n\tLARGE_INTEGER qpf, count_1, count_2;\n\tULARGE_INTEGER ts_before, ts_after;\n\n\tQueryPerformanceFrequency(&amp;qpf);\n\n\t__int64 count_persec = qpf.QuadPart;\n\n\n\tasm {\n        rdtsc\n        push eax\n        push edx\n\t}\n\n\tQueryPerformanceCounter(&amp;count_1);\n\n\twhile (count_2.QuadPart - count_1.QuadPart &lt; count_persec) {\n\n\t\tQueryPerformanceCounter(&amp;count_2);\n\n\t}\n\n\tasm {\n        rdtsc\n        push eax\n        push edx\n\t}\n\n\tasm {\n        pop ts_hi\n        pop ts_lo\n\t}\n\n\tts_after.HighPart = ts_hi;\n\tts_after.LowPart = ts_lo;\n\n\tasm {\n        pop ts_hi\n        pop ts_lo\n\t}\n\n\tts_before.HighPart = ts_hi;\n\tts_before.LowPart = ts_lo;\n\n\treturn ts_after.QuadPart - ts_before.QuadPart;\n\n};\n\nvoid  main()\n{\n    char ch;\n\n    printf(\"Press \\\"q\\\" for exit or any other for detecting CPU clock frequency again\\n\\n\" );\n\n    ch = getch();\n\n    while (ch != 'q'){\n\n        printf(\"Frequency = %u Hz\\n\", Get_freq());\n        ch = getch();\n\n    }\n}<\/pre><\/div>\n\n\n\n<p>There was not so much information on this topic available except the MSDN library and Intel&#8217;s Instruction Set Reference. But Borland&#8217;s documentation was good enough too, as far as I remember.<\/p>\n\n\n\n<p> In a few months, I ported this to the MS Visual C++. As you can see, the ASM instructions were replaced with the MSVC&#8217;s intrinsic functions.  The clock frequency alone is not so exciting, so I added some basic processor information, that is returned by the<a href=\"https:\/\/c9x.me\/x86\/html\/file_module_x86_id_45.html\"> <em>cpuid <\/em>instruction<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/1_cpuid.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/1_cpuid.png\" alt=\"\" class=\"wp-image-293\" width=\"668\" height=\"331\" srcset=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/1_cpuid.png 668w, https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/1_cpuid-350x173.png 350w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><figcaption> cpuid.exe (<a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/cpuid.zip\">download archive<\/a>) <\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><div style=\"position:absolute;top:-24px;right:0px;cursor:pointer\" class=\"copy-simple-code-block\"><svg aria-hidden=\"true\" role=\"img\" focusable=\"false\" class=\"dashicon dashicons-admin-page\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewbox=\"0 0 20 20\"><path d=\"M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z\"><\/path><\/svg><\/div><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"c_cpp\" data-theme=\"textmate\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"true\">#include &lt;windows.h>\n#include &lt;intrin.h>\n#include &lt;stdio.h>\n\nint i;\nint table[4];\n\nunsigned __int64 nFreq;\n\nvoid GetFreq() {\n\n\tunsigned __int64 ts_before, ts_after;\n\tLARGE_INTEGER count_persec, count_1, count_2;\n\n\tQueryPerformanceFrequency(&amp;count_persec);\n\n    ts_before = __rdtsc();\n\n\tQueryPerformanceCounter(&amp;count_1);\n\n\twhile (count_2.QuadPart - count_1.QuadPart &lt; count_persec.QuadPart)\n        QueryPerformanceCounter(&amp;count_2);\n\t\n    ts_after = __rdtsc();\n\n\tnFreq = ts_after - ts_before;\n\n};\n\n\nint main() {\n\n    char c[3][16] = {0};\n\n    for (i = 2; i &lt;= 4; i++) {\n        __cpuid(table, 0x80000000 | i);\n        memcpy(&amp;c[i - 2], &amp;table, 16);\n    }\n\n    __cpuid(table, 1);\n    int nStepping = table[0] &amp; 0xF;\n    int nModel = (table[0] &amp; 0xF0) >> 4;\n    int nFamily = (table[0] &amp; 0xF00) >> 8;\n\n    GetFreq();\n\n    printf(\"Frequency: %u\\n\", nFreq);\n    printf(\"Brand: %s\\n\", c);\n    printf(\"Family: %x\\t\", nFamily);\n    printf(\"Model: %x\\t\", nModel);\n    printf(\"Stepping: %x\\t\", nStepping);\n    getchar();\n\n}<\/pre><\/div>\n\n\n\n<p> But this was just a preparation for the next step.<\/p>\n\n\n\n<p>The final version of 2006 &#8211; GUI application made using the Windows 32 API aka WinApi:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/2_oxp_001.png\"><img decoding=\"async\" loading=\"lazy\" width=\"430\" height=\"150\" src=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/2_oxp_001.png\" alt=\"\" class=\"wp-image-296\" srcset=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/2_oxp_001.png 430w, https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/2_oxp_001-350x122.png 350w\" sizes=\"(max-width: 430px) 85vw, 430px\" \/><\/a><figcaption>oxp_001.exe (<a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/oxp_001.zip\">download archive<\/a>)<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><div style=\"position:absolute;top:-24px;right:0px;cursor:pointer\" class=\"copy-simple-code-block\"><svg aria-hidden=\"true\" role=\"img\" focusable=\"false\" class=\"dashicon dashicons-admin-page\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewbox=\"0 0 20 20\"><path d=\"M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z\"><\/path><\/svg><\/div><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"c_cpp\" data-theme=\"textmate\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"true\">\/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0434\u043b\u044f Windows-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\n#include &lt;windows.h>\n#include &lt;intrin.h>\n#include &lt;string>\n#include &lt;stdlib.h>\n\nint i;\nint table[4];\nchar buff[16];\n\n\/\/ CPU Information\nstd::string sBrand;\nint nFamily;\nint nModel;\nint nStepping;\n\nunsigned __int64 nFreq;\nvoid GetFreq();\n\/\/----------------\n\nvoid OnCreate(HWND, HINSTANCE);\n\nWNDCLASS CreateClass(WNDPROC pfWProc, HINSTANCE hInst, LPCSTR sIcon, LPCSTR sCursor, LPCSTR sName, HBRUSH hbColor = (HBRUSH)12) {\n    WNDCLASS wc = {CS_HREDRAW | CS_VREDRAW, pfWProc, NULL, NULL, hInst, LoadIcon(hInst, sIcon), LoadCursor(NULL, sCursor), hbColor, NULL, sName};\n    return wc;\n}\n\n\/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u043a\u043d\u0430 (\u043e\u043a\u043e\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b)\nLRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);\n\nHINSTANCE hInst; \/\/ \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\nHWND Tab;\n\n\/\/ \u0422\u043e\u0447\u043a\u0430 \u0432\u0445\u043e\u0434\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 - \u0444\u0443\u043d\u043a\u0446\u0438\u044f WinMain\nint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)\n{\n    HWND hWnd; \/\/ \u0423\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u043a\u043d\u0430 (handle)\n\tMSG msg; \/\/ \u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0442\u0438\u043f\u0430 MSG, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c\u0438\n\n\thInst = hInstance; \/\/ \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\n\n\tRegisterClass(&amp;CreateClass(WndProc, hInst, MAKEINTRESOURCE(102), IDC_ARROW, \"Form\")); \/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043e\u043a\u043e\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441\n    \n    RECT WorkArea;\n    SystemParametersInfo(SPI_GETWORKAREA, 0, &amp;WorkArea, 0);\n\n    GetFreq();\n    \n\t\/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u043a\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b\n\thWnd = CreateWindow(\n\t\t\"Form\", \/\/ \u0418\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u043e\u043a\u043d\u0430\n\t\t\"OverSoft CPU Informer XP 0.001\", \/\/ \u0417\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u043e\u043a\u043d\u0430\n\t\tWS_OVERLAPPED | WS_SYSMENU | WS_MINIMIZEBOX | WS_VISIBLE, \/\/ \u0421\u0442\u0438\u043b\u044c \u043e\u043a\u043d\u0430\n\t\tWorkArea.right\/2 - 215, WorkArea.bottom\/2 - 75, \/\/ \u0413\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043e\u043a\u043d\u0430\n\t\t430, 150, \/\/ \u0428\u0438\u0440\u0438\u043d\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u043e\u043a\u043d\u0430\n\t\tNULL, \/\/ \u0425\u0435\u043d\u0434\u043b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043e\u043a\u043d\u0430\n\t\tNULL, \/\/ \u0425\u0435\u043d\u0434\u043b \u043c\u0435\u043d\u044e\n\t\thInst, \/\/ \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\n\t\tNULL); \/\/ \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u043a\u043d\u0430\n    \n\tUpdateWindow(hWnd); \/\/ \u041f\u0435\u0440\u0435\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u043e\u043a\u043d\u043e\n\n\t\/\/ \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439\n\twhile(GetMessage(&amp;msg, NULL, 0, 0))\n\t{\n\t\tTranslateMessage(&amp;msg);\n\t\tDispatchMessage(&amp;msg);\n\t}\n\n\treturn (int)msg.wParam;\n}\n\n\n\/\/ \u041e\u043a\u043e\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\nLRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)\n{\n\tswitch(msg)\n\t{\n    case WM_CREATE:\n        OnCreate(hWnd, hInst);\n        break;\n\n\tcase WM_DESTROY:\n\t\tPostQuitMessage(0);\n\t\tbreak;\n\n\tdefault:\n\t\treturn DefWindowProc(hWnd, msg, wParam, lParam);\n\t}\n\n}\n\nvoid GetBrandStr();\nvoid GetId1();\n\n\nvoid OnCreate(HWND hWnd, HINSTANCE hInst) {\n\n    GetBrandStr();\n    GetId1();\n    \/\/GetFreq();\n    \n    CreateWindow(\"static\", \"Brand:\", WS_CHILD | SS_RIGHT | WS_VISIBLE, 20, 20, 80, 20, hWnd, NULL, hInst, NULL);\n    CreateWindow(\"static\", sBrand.c_str(), WS_CHILD | SS_LEFT | WS_VISIBLE, 110, 20, 300, 20, hWnd, NULL, hInst, NULL);\n\n    CreateWindow(\"static\", \"Family:\", WS_CHILD | SS_RIGHT | WS_VISIBLE, 20, 40, 80, 20, hWnd, NULL, hInst, NULL);\n    CreateWindow(\"static\", CharUpper(_itoa(nFamily, buff, 16)), WS_CHILD | SS_LEFT | WS_VISIBLE, 110, 40, 350, 20, hWnd, NULL, hInst, NULL);\n    \n    CreateWindow(\"static\", \"Model:\", WS_CHILD | SS_RIGHT | WS_VISIBLE, 20, 60, 80, 20, hWnd, NULL, hInst, NULL);\n    CreateWindow(\"static\", CharUpper(_itoa(nModel, buff, 16)), WS_CHILD | SS_LEFT | WS_VISIBLE, 110, 60, 350, 20, hWnd, NULL, hInst, NULL);\n    \n    CreateWindow(\"static\", \"Stepping:\", WS_CHILD | SS_RIGHT | WS_VISIBLE, 20, 80, 80, 20, hWnd, NULL, hInst, NULL);\n    CreateWindow(\"static\", CharUpper(_itoa(nStepping, buff, 16)), WS_CHILD | SS_LEFT | WS_VISIBLE, 110, 80, 350, 20, hWnd, NULL, hInst, NULL);\n\n    CreateWindow(\"static\", \"Frequency:\", WS_CHILD | SS_RIGHT | WS_VISIBLE, 20, 100, 80, 20, hWnd, NULL, hInst, NULL);\n    CreateWindow(\"static\", _ui64toa(nFreq, buff, 10), WS_CHILD | SS_LEFT | WS_VISIBLE, 110, 100, 350, 20, hWnd, NULL, hInst, NULL);\n}\n\nvoid GetBrandStr() {\n    char buff[48];\n\n    for (i = 2; i &lt;= 4; i++) {\n        __cpuid(table, 0x80000000 | i);\n        memcpy(&amp;buff[16*(i - 2)], &amp;table, 16);\n    }\n    i = 0;\n    while (buff[i]==' ') ++i;\n    while (buff[i]!=0) {\n        sBrand+= buff[i];\n        ++i;  \n    }\n}\n\nvoid GetId1() {\n    __cpuid(table, 1);\n    nStepping = table[0] &amp; 0xF;\n    nModel = (table[0] &amp; 0xF0) >> 4;\n    nFamily = (table[0] &amp; 0xF00) >> 8;\n}\n\nvoid GetFreq() {\n\n\tunsigned __int64 ts_before, ts_after;\n\tLARGE_INTEGER count_persec, count_1, count_2;\n\n\tQueryPerformanceFrequency(&amp;count_persec);\n\n    ts_before = __rdtsc();\n\n\tQueryPerformanceCounter(&amp;count_1);\n\n\twhile (count_2.QuadPart - count_1.QuadPart &lt; count_persec.QuadPart)\n        QueryPerformanceCounter(&amp;count_2);\n\t\n    ts_after = __rdtsc();\n\n\tnFreq = ts_after - ts_before;\n\n};\n<\/pre><\/div>\n\n\n\n<p>Why is it called &#8220;OverSoft CPU Informer XP&#8221;? Well, that&#8217;s a story for another day \ud83d\ude42<\/p>\n\n\n\n<p>A few years later, in 2011, when I was a full-time web developer already and used FreeBSD as a desktop system at work, I ported the CLI version to the GCC just for fun. My colleague, who&#8217;s an actual C++ developer helped me with that. Thanks to a MinGW project, the utility may run on Windows (as well as on macOS) too:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><a href=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/3_cpuinfo64.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/3_cpuinfo64.png\" alt=\"\" class=\"wp-image-295\" width=\"677\" height=\"342\" srcset=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/3_cpuinfo64.png 677w, https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/3_cpuinfo64-350x177.png 350w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>And now, <a href=\"https:\/\/github.com\/3dnikita\/cpuinfo\">I&#8217;m sharing the cross-platform code on GitHub<\/a> under a permissive license. To make it somewhat usable, I added the Makefile and README files. The rest is a genuine 9-years-old cpp code, which is still compilable by some miracle. The binary executable files for 32 and 64 bit Windows and 64 bit Linux are also available there.<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a whole load of unfinished hobby projects. Many times I was taken by some idea, implemented the most challenging part and lost my interest.But some of the projects have been actually finished and may be interesting to someone. It&#8217;s time to let the world see my creations \ud83d\ude42 The hero of the day &hellip; <a href=\"https:\/\/3dnikita.com\/blog\/2020\/04\/19\/cpuinfo\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;cpuinfo&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[55],"tags":[60,57,58,61,59,62],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>cpuinfo - 3D Nikita<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"cpuinfo\" \/>\n<meta property=\"og:description\" content=\"I have a whole load of unfinished hobby projects. Many times I was taken by some idea, implemented the most challenging part and lost my interest.But some of the projects have been actually finished and may be interesting to someone. It&#8217;s time to let the world see my creations \ud83d\ude42 The hero of the day &hellip; Continue reading &quot;cpuinfo&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\" \/>\n<meta property=\"og:site_name\" content=\"3D Nikita\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-19T19:53:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-19T22:03:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/oxp_001_social_preview.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1354\" \/>\n\t<meta property=\"og:image:height\" content=\"711\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"nikita\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"nikita\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\"},\"author\":{\"name\":\"nikita\",\"@id\":\"https:\/\/3dnikita.com\/blog\/#\/schema\/person\/f0d363eb0dbe2d99faf403152bdeda80\"},\"headline\":\"cpuinfo\",\"datePublished\":\"2020-04-19T19:53:06+00:00\",\"dateModified\":\"2020-04-19T22:03:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\"},\"wordCount\":395,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/#organization\"},\"keywords\":[\"asm\",\"code\",\"cpu\",\"history\",\"overclocking\",\"\u0441++\"],\"articleSection\":[\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\",\"url\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\",\"name\":\"[:en]cpuinfo[:] - 3D Nikita\",\"isPartOf\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/#website\"},\"datePublished\":\"2020-04-19T19:53:06+00:00\",\"dateModified\":\"2020-04-19T22:03:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/3dnikita.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"cpuinfo\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/3dnikita.com\/blog\/#website\",\"url\":\"https:\/\/3dnikita.com\/blog\/\",\"name\":\"3D Nikita\",\"description\":\"IT, Gadgets, Video Games, Technology\",\"publisher\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/3dnikita.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/3dnikita.com\/blog\/#organization\",\"name\":\"3D Nikita\",\"url\":\"https:\/\/3dnikita.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/3dnikita.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2019\/03\/logo.svg\",\"contentUrl\":\"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2019\/03\/logo.svg\",\"caption\":\"3D Nikita\"},\"image\":{\"@id\":\"https:\/\/3dnikita.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/3dnikita.com\/blog\/#\/schema\/person\/f0d363eb0dbe2d99faf403152bdeda80\",\"name\":\"nikita\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/3dnikita.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/46a16e1a3b1f9d20abbd2f4b7789d39b?s=96&d=retro&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/46a16e1a3b1f9d20abbd2f4b7789d39b?s=96&d=retro&r=g\",\"caption\":\"nikita\"},\"url\":\"https:\/\/3dnikita.com\/blog\/author\/nikita\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"cpuinfo - 3D Nikita","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/","og_locale":"en_US","og_type":"article","og_title":"[:en]cpuinfo[:] - 3D Nikita","og_description":"I have a whole load of unfinished hobby projects. Many times I was taken by some idea, implemented the most challenging part and lost my interest.But some of the projects have been actually finished and may be interesting to someone. It&#8217;s time to let the world see my creations \ud83d\ude42 The hero of the day &hellip; Continue reading \"cpuinfo\"","og_url":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/","og_site_name":"3D Nikita","article_published_time":"2020-04-19T19:53:06+00:00","article_modified_time":"2020-04-19T22:03:15+00:00","og_image":[{"width":1354,"height":711,"url":"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2020\/04\/oxp_001_social_preview.png","type":"image\/png"}],"author":"nikita","twitter_card":"summary_large_image","twitter_misc":{"Written by":"nikita","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#article","isPartOf":{"@id":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/"},"author":{"name":"nikita","@id":"https:\/\/3dnikita.com\/blog\/#\/schema\/person\/f0d363eb0dbe2d99faf403152bdeda80"},"headline":"cpuinfo","datePublished":"2020-04-19T19:53:06+00:00","dateModified":"2020-04-19T22:03:15+00:00","mainEntityOfPage":{"@id":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/"},"wordCount":395,"commentCount":0,"publisher":{"@id":"https:\/\/3dnikita.com\/blog\/#organization"},"keywords":["asm","code","cpu","history","overclocking","\u0441++"],"articleSection":["Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/","url":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/","name":"[:en]cpuinfo[:] - 3D Nikita","isPartOf":{"@id":"https:\/\/3dnikita.com\/blog\/#website"},"datePublished":"2020-04-19T19:53:06+00:00","dateModified":"2020-04-19T22:03:15+00:00","breadcrumb":{"@id":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/3dnikita.com\/blog\/ru\/2020\/04\/19\/cpuinfo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/3dnikita.com\/blog\/"},{"@type":"ListItem","position":2,"name":"cpuinfo"}]},{"@type":"WebSite","@id":"https:\/\/3dnikita.com\/blog\/#website","url":"https:\/\/3dnikita.com\/blog\/","name":"3D Nikita","description":"IT, Gadgets, Video Games, Technology","publisher":{"@id":"https:\/\/3dnikita.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/3dnikita.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/3dnikita.com\/blog\/#organization","name":"3D Nikita","url":"https:\/\/3dnikita.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/3dnikita.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2019\/03\/logo.svg","contentUrl":"https:\/\/3dnikita.com\/blog\/wp-content\/uploads\/2019\/03\/logo.svg","caption":"3D Nikita"},"image":{"@id":"https:\/\/3dnikita.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/3dnikita.com\/blog\/#\/schema\/person\/f0d363eb0dbe2d99faf403152bdeda80","name":"nikita","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/3dnikita.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/46a16e1a3b1f9d20abbd2f4b7789d39b?s=96&d=retro&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/46a16e1a3b1f9d20abbd2f4b7789d39b?s=96&d=retro&r=g","caption":"nikita"},"url":"https:\/\/3dnikita.com\/blog\/author\/nikita\/"}]}},"_links":{"self":[{"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/posts\/291"}],"collection":[{"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":11,"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/posts\/291\/revisions\/318"}],"wp:attachment":[{"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3dnikita.com\/blog\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}