Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. .section .data
  2.  
  3. str_max = 40
  4. string1: .ascii "UNESITE IME I PREZIME:\0"
  5. str_len1 = . - string1
  6. string2: .fill str_max, 1,0
  7. string3: .ascii "VI STE:\0"
  8. str_len3 = . - string3
  9.  
  10. .section .text
  11. .globl main
  12.  
  13. main:
  14. movl $4, %eax
  15. movl $1, %ebx
  16. leal string1, %ecx
  17. movl $str_len1, %edx
  18. int $0x80
  19.  
  20. movl $3, %eax
  21. movl $0, %ebx
  22. leal string2, %ecx
  23. movl $str_max, %edx
  24. int $0x80
  25.  
  26. movl $string2,%eax
  27.  
  28. petlja:
  29. cmpb $10,(%eax)
  30. je ispis
  31. cmpb $90,(%eax)
  32. jg zameni
  33. incl %eax
  34. jmp petlja
  35.  
  36. zameni:
  37. subb $32, (%eax)
  38. jmp petlja
  39. ispis:
  40. movl $4, %eax
  41. movl $1, %ebx
  42. leal string3, %ecx
  43. movl $str_len3, %edx
  44. int $0x80
  45.  
  46. movl $4, %eax
  47. movl $1, %ebx
  48. leal string2, %ecx
  49. movl $str_max, %edx
  50. int $0x80
  51. kraj:
  52. movl $1,%eax
  53. movl $0,%ebx
  54. int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement