Created
January 8, 2019 09:56
-
-
Save rdeioris/48f8c72fcb2cc499c05a38eb6a5d9245 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main(int argc, char **argv) | |
| { | |
| int part0 = 0; | |
| int part1 = 0; | |
| int part2 = 0; | |
| int part3 = 0; | |
| asm( | |
| "CPUID\r\n" | |
| : "=a"(part0), "=b"(part1), "=c"(part2), "=d"(part3) | |
| : "a"(0) | |
| ); | |
| printf("%04X-%04X-%04X-%04X\n", part0, part1, part2, part3); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment