aboutsummaryrefslogtreecommitdiff
path: root/examples/constants.hdass
blob: 1bb85eb7ea223de974f308761d07b8d2a4306595 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[entry: main]

// The exit status is folded from constant arithmetic, and SYS_EXIT is a hex
// literal. STATUS = 6 * 7 = 42.
const A = 6
const B = 7
const STATUS = A * B
const SYS_EXIT = 0x3C

proc main
{
    rdi = STATUS
    rax = SYS_EXIT
    syscall
}