Skip to content

Instantly share code, notes, and snippets.

@danzimm
Created June 3, 2012 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danzimm/2860907 to your computer and use it in GitHub Desktop.
Save danzimm/2860907 to your computer and use it in GitHub Desktop.
get your intel processor branding string whoop whoop
.globl start
.cstring
l:
.ascii "%s\n\0"
.text
start:
push %rbp
mov %rsp, %rbp
sub $0x30, %rsp
mov $0x80000002,%eax
cpuid
mov %eax, 0x0(%rsp)
mov %ebx, 0x4(%rsp)
mov %ecx, 0x8(%rsp)
mov %edx, 0xc(%rsp)
mov $0x80000003, %eax
cpuid
mov %eax, 0x10(%rsp)
mov %ebx, 0x14(%rsp)
mov %ecx, 0x18(%rsp)
mov %edx, 0x1c(%rsp)
mov $0x80000004, %eax
cpuid
mov %eax, 0x20(%rsp)
mov %ebx, 0x24(%rsp)
mov %ecx, 0x28(%rsp)
mov %edx, 0x2c(%rsp)
mov %rsp, %rdi
call _puts
add $0x30, %rsp
mov $0x0,%al
call _exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment