Advertisement
LauriFriberg

Programming practice, ohjelmointiharjoitus 2018 L.K.F.

Jun 20th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # $ cat hello-lkf-programming-practice.s
  2. # This is a programming practice. Tämä on ohjelmointiharjoitus.
  3. # Muokkasin tämän yhdestä ohjeesta WWW:stä.
  4. # Compile and run with (käännä ja aja komennoilla):
  5. # gcc -s hello-lkf-programming-practice.s && ld hello-lkf-programming-practice.o && ./a.out
  6.     .global _start
  7.  
  8.     .text
  9.  
  10. _start:
  11.     mov $1, %rax
  12.     mov $1, %rdi
  13.     mov $viesti, %rsi
  14.     mov $16, %rdx
  15.     syscall
  16.  
  17.     mov $60, %rax
  18.     xor %rdi, %rdi
  19.     syscall
  20.  
  21. viesti:
  22.     .ascii "Terve Laurilta!\n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement