Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. .global checkSW
  3. .type checkSW, @function
  4. checkSW:
  5. pushl %ebp
  6. movl %esp, %ebp
  7. pushl %ebx
  8.  
  9. fnstsw %ax
  10. xor %ebx, %ebx
  11.  
  12. movl $17 , %ecx
  13. decl %ecx
  14. testBits:
  15. rol $1, %ax
  16. setc %bl
  17. cmp $1, %bl
  18. je storeResult
  19. loop testBits
  20. movl $-1, %eax
  21.  
  22. finish:
  23. popl %ebx
  24. leave
  25. ret
  26.  
  27. storeResult:
  28. movl %ecx, %eax
  29. decl %eax
  30. jmp finish
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement