repo.or.cz
/
voodoo-lang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
on i386 and AMD64, generate position-independent code even for labels in the same...
[voodoo-lang.git]
/
test
/
libvar.voo
blob
6d6921b91d234625418f69d603747e558950360b
1
# Shared library with variables and functions operating on those variables.
2
3
section data
4
export bar
5
6
align
7
bar: word 0
8
9
align
10
foo: word 0
11
12
13
section functions
14
export get_bar get_foo set_bar set_foo
15
16
align
17
get_bar:
18
function
19
let y bar
20
return @y
21
end function
22
23
align
24
get_foo:
25
function
26
return @foo
27
end function
28
29
align
30
set_bar:
31
function x
32
set @bar x
33
return x
34
end function
35
36
align
37
set_foo:
38
function x
39
let y foo
40
set @y x
41
return x
42
end function