Guest User

Untitled

a guest
Mar 19th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #cpuid.s Sample program to extract the processor Vendor ID
  2. .section .data
  3. output:
  4.    .ascii "The processor Vendor ID is 'xxxxxxxxxxxx'\n"
  5. .section .text
  6. .globl _start
  7. _start:
  8.    movl $0, %eax
  9.    cpuid
  10.    movl $output, %edi
  11.    movl %ebx, 28(%edi)
  12.    movl %edx, 32(%edi)
  13.    movl %ecx, 36(%edi)
  14.    movl $4, %eax
  15.    movl $1, %ebx
  16.    movl $output, %ecx
  17.    movl $42, %edx
  18.    int $0x80
  19.    movl $1, %eax
  20.    movl $0, %ebx
  21.    int $0x80
Add Comment
Please, Sign In to add comment