...
This commit is contained in:
20
src/runtime/targets/x64.s
Normal file
20
src/runtime/targets/x64.s
Normal file
@@ -0,0 +1,20 @@
|
||||
.intel_syntax noprefix
|
||||
|
||||
.text
|
||||
.globl nub_write_string
|
||||
# void nub_write_string(const char* str)
|
||||
nub_write_string:
|
||||
push rdi
|
||||
call nub_cstring_length
|
||||
mov rdx, rax
|
||||
pop rsi
|
||||
mov rax, 1
|
||||
mov rdi, 1
|
||||
syscall
|
||||
|
||||
.text
|
||||
.globl nub_exit
|
||||
# void nub_exit(int code)
|
||||
nub_exit:
|
||||
mov rax, 60
|
||||
syscall
|
||||
Reference in New Issue
Block a user