test2.s 287 B

12345678910111213141516171819202122
  1. .file "test2.s"
  2. .data
  3. str:
  4. .ascii "test2\n"
  5. .text
  6. .global test2
  7. test2:
  8. movq %rsp, %rbp
  9. movq $1, %rax
  10. movq $1, %rdi
  11. leaq str(%rip), %rsi
  12. movq $6, %rdx
  13. syscall
  14. movq %rbp, %rsp
  15. // exit
  16. movq $60, %rax
  17. movq $0, %rdi
  18. syscall