Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. .data
  2.  
  3. vet: .byte 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  4. msgout_mode: .string "Moda: %dn"
  5. .type mode, @function
  6.  
  7. .text
  8.  
  9. call mode
  10.  
  11.  
  12. mode:
  13.  
  14. movl $0, %ebx
  15.  
  16. loop_mode_1:
  17.  
  18. movl $-1, %esi
  19.  
  20. movl $0, %eax
  21.  
  22. loop_mode_2:
  23.  
  24. incl %esi
  25. leal vet(%esi), %ecx
  26.  
  27. cmpl vet(%edx), %ecx
  28. jne loop_mode_2
  29.  
  30. incl %eax
  31. cmpl $10, %esi
  32. jne loop_mode_2
  33.  
  34. cmpl %eax, %ebx
  35. jg loop_mode_1
  36.  
  37. movl %eax, %ebx
  38. incl %edx
  39. cmpl $10, %edx
  40. jne loop_mode_1
  41.  
  42. pushl %ebx
  43. pushl $msgout_mode
  44. call printf
  45. addl $8, %esp
  46.  
  47. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement