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

// Returns the larger of two values (max(3, 8) = 8) as the exit status.
const SYS_EXIT = 60

proc main
{
    rbx = 3
    rcx = 8

    rdi = rbx
    if rcx <= rbx
        goto done
    rdi = rcx

done:
    rax = SYS_EXIT
    syscall
}