Make substitute-number work on AMD64 and i386
[voodoo-lang.git] / test / set-at.voo
blob153866b512e70b72d3d7109d36c77712cc18c1a2
1 #### Test program for set with at-expressions
3 section data
5 foo:
6 word 0
8 bar:
9 word 42
11 fmt:
12 string "%d\n\x00"
15 section functions
16 import printf
17 export main
19 main:
20 function argc argv
21     call printf fmt @foo
22     set @foo 1
23     call printf fmt @foo
24     set @foo add 2 3
25     call printf fmt @foo
26     set @foo @bar
27     call printf fmt @foo
28     let x 9
29     set @foo x
30     call printf fmt @foo
31     set @foo add x @bar    
32     call printf fmt @foo
33     set x bar
34     set @foo @x
35     call printf fmt @foo
36     set @foo add @x @bar
37     call printf fmt @foo
38     return 0
39 end function