Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .section .data
  2. NELEM=6
  3. a: .quad 0xFFFFFFFFFFFFFFFF, 0x1234567891234567, 0x3456789012345678, 0x1243657890431256, 0x0192837465473829, 0x9876543211654321
  4. b: .quad 0
  5. c: .quad 0
  6. d: .long 0
  7. .section .text
  8. .globl main
  9. main:
  10.     movl $0, %ecx
  11.     leal a, %ebx
  12.     movl $NELEM, %edi
  13. deljenje:  
  14.     movl 4(%ebx,%ecx, 8), %eax
  15.     movl $0, %edx
  16.     divl %edi
  17.     movl %eax, b+4
  18.     movl (%ebx,%ecx,8), %eax
  19.     divl %edi
  20.     movl %eax,b
  21.     movl b, %esi
  22.     addl %esi, c
  23.     movl b+4, %esi
  24.     adcl %esi, c+4
  25.     incl %ecx
  26.     addl %edx, d
  27.     cmpl $NELEM, %ecx
  28.     jne deljenje
  29.     movl $0, %edx
  30.     movl d, %eax
  31.     divl %edi
  32.     addl %eax, c
  33. kraj:
  34.     movl $1, %eax
  35.     int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement