22 lines
371 B
ArmAsm
22 lines
371 B
ArmAsm
.intel_syntax noprefix
|
|
|
|
.macro syscall_define name no
|
|
.global \name
|
|
\name:
|
|
mov rax, \no
|
|
mov r10, rcx
|
|
call syscall
|
|
ret
|
|
.endm
|
|
|
|
.global syscall
|
|
syscall:
|
|
mov r10, rcx
|
|
syscall
|
|
ret
|
|
|
|
syscall_define read 0
|
|
syscall_define write 1
|
|
syscall_define open 2
|
|
syscall_define close 3
|
|
|