diff options
Diffstat (limited to 'tests/projects/asm/nasm/src/main.S')
| -rw-r--r-- | tests/projects/asm/nasm/src/main.S | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/projects/asm/nasm/src/main.S b/tests/projects/asm/nasm/src/main.S new file mode 100644 index 000000000..e96a8d2c9 --- /dev/null +++ b/tests/projects/asm/nasm/src/main.S @@ -0,0 +1,20 @@ +global _main + +section .text + +_main: + mov rax, 0x2000004 ; write + mov rdi, 1 ; stdout + mov rsi, msg + mov rdx, msg.len + syscall + + mov rax, 0x2000001 ; exit + mov rdi, 0 + syscall + + +section .data + +msg: db "hello xmake!", 10 +.len: equ $ - msg |
