on i386 and AMD64, generate position-independent code even for labels in the same...
[voodoo-lang.git] / test / libvar.voo
blob6d6921b91d234625418f69d603747e558950360b
1 # Shared library with variables and functions operating on those variables.
3 section data
4 export bar
6 align
7 bar: word 0
9 align
10 foo: word 0
13 section functions
14 export get_bar get_foo set_bar set_foo
16 align
17 get_bar:
18 function
19     let y bar
20     return @y
21 end function
23 align
24 get_foo:
25 function
26     return @foo
27 end function
29 align
30 set_bar:
31 function x
32     set @bar x
33     return x
34 end function
36 align
37 set_foo:
38 function x
39     let y foo
40     set @y x
41     return x
42 end function