Advertisement
Guest User

Untitled

a guest
Dec 12th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. section .data
  2.  zahl1 dd 0
  3.  zahl2 dd 0
  4.  format1 db "%d", 0x0
  5.  format db "%d", 0xa, 0x0
  6.  
  7. section .text
  8. global main
  9. extern scanf
  10. extern printf
  11.  
  12. main:
  13. push zahl1
  14. push format1
  15. call scanf
  16. push zahl2
  17. push format1
  18. call scanf
  19.  
  20. mov ebx, [zahl1]
  21. mov ecx, [zahl2]
  22.  
  23. ggt:
  24. mov edx, 0
  25. mov eax, ebx
  26. div ecx
  27. mov ebx, ecx
  28. mov ecx, edx
  29. cmp ecx, 0
  30. jnz ggt
  31.  
  32.  
  33. push ebx
  34. push format
  35. call printf
  36.  
  37. mov eax, 1
  38. mov ebx, 0
  39. int 80h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement