diff options
author | Matt Turner <mattst88@gmail.com> | 2008-01-02 03:55:22 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2008-01-02 03:55:22 +0000 |
commit | afda6f12adf869ca9b35eae215b2aa83b87de39a (patch) | |
tree | 038c98253ec35dc56aed1d5ab7abde8deb99833e /cpuid.asm |
Initial import.
git-svn-id: svn://mattst88.com/svn/x86_64-assembly/trunk@1 a323887f-d61c-418c-83a5-2e06a2a01087
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 |