summaryrefslogtreecommitdiff
path: root/cpuid.asm
blob: 4e573aef4aacc7b4392a2ae72345c7e41ab85e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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