Advertisement
Guest User

Untitled

a guest
Aug 29th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. ; cpuid_pae.s - Use CPUID instruction to determine if x86 CPU has PAE.
  2.  
  3. [SECTION .text]
  4. global _start
  5.  
  6. _start:
  7. xor eax,eax
  8. mov eax,1 ; 1=Get processor features
  9. cpuid
  10.  
  11. results:
  12. and edx,64 ; Mask the PAE bit.
  13. shr edx,6 ; Shift bit 6 into bit 0.
  14.  
  15. exit:
  16. mov eax,1
  17. xor ebx,ebx
  18. mov ebx,edx ; Return value. 1=yes, 0=no.
  19. int 0x80 ; Exit syscall.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement