SHARE
TWEET

Untitled

a guest Mar 26th, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .section .data
  2. a: .quad 10
  3. b: .quad 3
  4. r: .quad 0
  5. greska: .long 0
  6. .section .text
  7. .globl main
  8. main:
  9. movl a,%eax # a
  10. movl a+4,%ebx
  11.  
  12. movl b,%ecx # b
  13. movl b+4,%edx
  14. cmpl %ebx,%edx
  15. jb avece
  16. ja amanje
  17. cmpl %eax,%ecx
  18. jb avece
  19. ja amanje
  20. jmp kraj
  21.  
  22. avece:
  23.     addl %eax,%eax
  24.     adcl %ebx,%ebx
  25.     addl %ecx,%eax
  26.     adcl %edx,%ebx
  27.     adcl $0,greska
  28.     jmp provera
  29. amanje:
  30.     addl %eax,%eax
  31.     adcl %ebx,%ebx
  32.     subl %ecx,%eax
  33.     sbbl %edx,%ebx
  34.     adcl $0,greska
  35. provera:
  36. cmpl $0,greska
  37. jne kraj
  38. rezultat:
  39.     movl %eax,r
  40.     movl %ebx,r+4
  41. kraj:
  42. movl $1,%eax
  43. movl greska,%ebx
  44. int $0x80
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top