main.s 246 B

12345678910111213141516171819
  1. .file "main.s"
  2. .data
  3. str:
  4. .ascii "test\n"
  5. .text
  6. .globl main
  7. main:
  8. movq %rsp, %rbp
  9. movq $1, %rax
  10. movq $1, %rdi
  11. leaq str(%rip), %rsi
  12. movq $5, %rdx
  13. syscall
  14. movq %rbp, %rsp
  15. movq $0, %rax
  16. ret