Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdint.h>
- int main()
- {
- uint32_t edx;
- uint32_t ecx;
- int i;
- asm ("movl $1, %%eax\n"
- "cpuid\n"
- "movl %%edx, %0\n"
- "movl %%ecx, %1\n"
- : "=r"(edx), "=r"(ecx));
- printf ("EDX ");
- for (i=0; i<32; i++)
- {
- if (!(edx & (1<<i))) printf ("%i ", i);
- }
- printf ("\nECX ");
- for (i=0; i<32; i++)
- {
- if (!(ecx & (1<<i))) printf ("%i ", i);
- }
- printf ("\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement