Advertisement
Guest User

Untitled

a guest
May 30th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. .section .data
  2. hexconv: .ascii "0123456789ABCDEF"
  3. rez_max = 17
  4. rez: .fill rez_max,1,0
  5. ........................................
  6. movl $0, %ecx #najlevija cifra
  7. movl $0, %esi #brojac
  8. movl $0, %edi #index niza rezultata
  9. siftD:
  10. testl %edx, %edx
  11. jz siftA
  12. shll %edx
  13. jc pamtiD
  14. incl %esi
  15. shll %ecx
  16. cmpl $4, %esi
  17. je upisiD
  18. jmp siftD
  19. pamtiD:
  20. shll %ecx
  21. addl $1, %ecx
  22. cmpl $4, %esi
  23. je upisiD
  24. jmp siftD
  25. upisiD:
  26. #leal hexconv, %esi
  27. #movl (%esi,%ecx,1), %ecx - ovo ako ne radi red ispod ovog
  28. movl hexconv(,%ecx,1), %ecx
  29. movl %ecx, rez(,%edi,1) #isto leal rez u esi ako ovo neradi
  30. incl %edi
  31. movl $0, %esi
  32. movl $0, %ecx
  33. jmp siftD
  34. siftA:
  35. testl %eax, %eax
  36. jz ispisi #ovo preimenuj u funkciju za ispis yeah kontaš
  37. shll %eax
  38. jc pamtiA
  39. incl %esi
  40. shll %ecx
  41. cmpl $4, %esi
  42. je upisiA
  43. jmp siftA
  44. pamtiA:
  45. shll %ecx
  46. addl $1, %ecx
  47. cmpl $4, %esi
  48. je upisiA
  49. jmp siftA
  50. upisiA:
  51. #leal hexconv, %esi
  52. #movl (%esi,%ecx,1), %ecx - ovo ako ne radi red ispod ovog
  53. movl hexconv(,%ecx,1), %ecx
  54. movl %ecx, rez(,%edi,1) #isto leal rez u esi ako ovo neradi
  55. incl %edi
  56. movl $0, %esi
  57. movl $0, %ecx
  58. jmp siftA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement