diff options
Diffstat (limited to 'cpuid.asm')
-rw-r--r-- | cpuid.asm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cpuid.asm b/cpuid.asm new file mode 100644 index 0000000..4e573ae --- /dev/null +++ b/cpuid.asm @@ -0,0 +1,26 @@ +format ELF64 + +extrn printf +public main + +section '.text' executable + +main: + push rbp + mov rbp,rsp + + mov eax,1 + cpuid + shl rdx,32 + or rax,rdx + mov rsi,rax + mov edi,msg + xor eax,eax + call printf + + leave + ret + +section '.data' writable align 16 + +msg db "CPUID string is %lX",0xA,0 |