FUnneR

Zadatak 3 - V3

Mar 22nd, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #aritmeticka vr niza
  2. #Nemanja Komadina PR140/2015
  3. .section .data
  4. niz: .long 1,2,3,4,5,6,7,8,9,10
  5. ar: .long 0
  6. end: .long 10
  7. ostatak: .long
  8. .section .text
  9. .globl main
  10. main:
  11.     movl $0, %esi
  12.     movl $0, %eax
  13. petlja:
  14.     addl niz(,%esi,4), %eax
  15.     incl %esi
  16.     cmpl end, %esi
  17.     jle petlja
  18.     jmp ari
  19. ari:
  20.     movl $0, %edx
  21.     divl end
  22.     movl %eax,ar
  23.     movl %edx,ostatak
  24. kraj:
  25.     movl $1, %eax
  26.     int $0x80
Add Comment
Please, Sign In to add comment