summaryrefslogtreecommitdiff
path: root/tnslc/dummy.tnsl
blob: 60fe913eb65160fb0607551688af3cd306c078f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/; _alloc (uint bytes) [~void]
    ;asm "mov %rax, %rdi"
    ;asm "mov $0, %r10"
    ;asm "call malloc"
;/

/; _delete (~void ptr)
    ;asm "mov %rax, %rdi"
    ;asm "mov $0, %r10"
    ;asm "call free"
;/

/; main [int]
    ;~void ptr = _alloc(10)
    ;_delete(ptr)
    ;return 0
;/