aboutsummaryrefslogtreecommitdiff
path: root/examples/hello_world.hdass
blob: da6b2b56235cf4fed5646d877e4df6aba1bf1493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[entry: main]

const SYS_WRITE = 1
const SYS_EXIT = 60

const STDOUT = 1

data message = "Hello, World!\n"

proc main
{
    rax = SYS_WRITE
    rdi = STDOUT
    rsi = message
    rdx = message.len
    syscall
    
    rax = SYS_EXIT
    rdi = 0
    syscall
}