Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. .align 32 #komentarz?
  2.  
  3. .text
  4.  
  5. msg_hello: .ascii "hello, world!\n"
  6. msg_hello_len = .-msg_hello
  7.  
  8. .global _start
  9.  
  10. _start:
  11. mov $0x400080,%edi #0x400080 adres pamieci gdzie w moim pc rozpoczynal sie ciag znakow
  12. do_it:
  13. mov $4, %eax
  14. mov $1, %ebx
  15. mov %edi, %ecx
  16.  
  17. mov $1,%edx
  18. int $0x80
  19. inc %edi
  20.  
  21. mov $0x400080,%eax #obsluga petli
  22. add $msg_hello_len,%eax
  23.  
  24. cmp %edi,%eax #cmp ustawia flage z = 1 jak porownywane wartosci sa takie same
  25. jne do_it #jezeli flaga z=0 to do_it
  26. end:
  27. mov $1, %eax
  28. mov $0, %ebx
  29.  
  30. int $0x80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement