summaryrefslogtreecommitdiff
path: root/tests/projects/asm/nasm/src/main.S
blob: e96a8d2c9561e54768ae08bf85bdc32f071b0429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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