1234567891011121314151617181920212223242526272829 |
- .file "test_8.asm"
- .data
- str:
- .ascii "test\n"
- .text
- .global _start
- _start:
- movq %rsp, %rbp
- call print
- movq %rbp, %rsp
- // exit
- movq $60, %rax
- movq $0, %rdi
- syscall
- print:
- movq $1, %rax
- movq $1, %rdi
- leaq str(%rip), %rsi
- movq $5, %rdx
- syscall
- ret
- // exit
- movq $60, %rax
- movq $0, %rdi
- syscall
|