test_2.asm 260 B

123456789101112131415161718192021
  1. .file "test_2.asm"
  2. .data
  3. str: .ascii "hello world\n"
  4. .text
  5. .global _start
  6. _start:
  7. // sys_write
  8. movq $1, %rax
  9. movq $1, %rdi
  10. movq $str, %rsi
  11. movq $12, %rdx
  12. M1:
  13. syscall
  14. M2:
  15. // exit
  16. movq $60, %rax
  17. movq $0, %rdi
  18. syscall