added groups
[voodoo-lang.git] / test / libgroup.voo
blobb626780f51a8bd36366ec9fcb9e0042c9544e1a7
1 # Shared library for group test.
3 section data
4 export test_group
6 align
7 test_group:
8 group
9     word 42
10     string "test123\x00"
11     word -1
12 end group
15 section functions
16 export get_first get_second get_third
18 align
19 get_first:
20 function
21     return @test_group
22 end function
24 align
25 get_second:
26 function
27     return add test_group %bytes-per-word
28 end function
30 align
31 get_third:
32 function
33     let address add test_group %bytes-per-word
34     set address add address 8
35     return @address
36 end function