...
This commit is contained in:
9
example/main.nub
Normal file
9
example/main.nub
Normal file
@@ -0,0 +1,9 @@
|
||||
module "main"
|
||||
|
||||
extern "puts" func puts(text: cstring)
|
||||
|
||||
extern "main" func main(args: []cstring): i64
|
||||
{
|
||||
puts("test")
|
||||
return 0
|
||||
}
|
||||
10
example/x86_64.s
Normal file
10
example/x86_64.s
Normal file
@@ -0,0 +1,10 @@
|
||||
.intel_syntax noprefix
|
||||
|
||||
.text
|
||||
.globl _start
|
||||
_start:
|
||||
mov rdi, rsp
|
||||
call main.main
|
||||
mov rdi, rax
|
||||
mov rax, 60
|
||||
syscall
|
||||
Reference in New Issue
Block a user