FUnneR

Zadatak 1 - V2

Mar 8th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NZD koristeci 2 promenljive 32 bita
  2. #Nemanja Komadina PR140/2015
  3. .section .data
  4. a: .long 8
  5. b: .long 12
  6. r: .long 0
  7. .section .text
  8. .globl main
  9. main:
  10.    
  11.     movl a, %eax
  12.     movl b, %ebx
  13. uporedi:
  14.     cmpl %ebx, %eax
  15.     je kraj
  16.     cmpl %ebx, %eax
  17.     ja vece
  18.     subl %eax, %ebx
  19.     jmp uporedi
  20.    
  21. vece:
  22.     subl %ebx, %eax
  23.     jmp uporedi
  24.    
  25. kraj:
  26.     movl %eax, r
  27.     movl $1, %eax
  28.     int $0x80
Add Comment
Please, Sign In to add comment