Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cpuid.s:
- .global cpuid_vendor
- cpuid_vendor:
- pushal
- mov $0x0, %eax
- cpuid
- movl %ebx, (%edi)
- movl %edx, 4(%edi)
- movl %ecx, 8(%edi)
- popal
- ret
- source/cpuid.h:
- extern void cpuid_vendor(uint8_t cpuid_vendor_string[12]);
- kernel.c:
- uint8_t cpuid_vendor_string[12];
- cpuid_vendor(cpuid_vendor_string);
- for (int i = 0; i < 12; i++)
- {
- printf("%c", cpuid_vendor_string[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment