Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. global main
  2. extern scanf
  3. extern printf
  4.  
  5. section .data
  6. gwiazdeczka: db '* ',0
  7. enter: db ' ',10,0
  8. x: equ 5
  9. y: equ 8
  10.  
  11. section .bss
  12. i: resb 1
  13. i2: resb 1
  14. section .text
  15.  
  16. main:
  17.  
  18.  
  19. mov byte[i2],0
  20.  
  21. petla2:
  22.  
  23. mov byte[i],0
  24.  
  25. petla:
  26.  
  27. inc byte[i]
  28. mov rax,0
  29. mov rdi, qword gwiazdeczka
  30. call printf
  31.  
  32. cmp byte[i], x
  33. jne petla
  34.  
  35.  
  36. inc byte[i2]
  37. mov rax,0
  38. mov rdi, qword enter
  39. call printf
  40.  
  41.  
  42. cmp byte[i2], y
  43. jne petla2
  44.  
  45. koniec:
  46. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement