Put validation in the parser
[voodoo-lang.git] / test / bitwise.voo
blobd9e55578f37706cd214200bb6e55cbd88809025d
1 #### Test bitwise operators
3 section data
4 format:
5 string "%08x\n\x00"
7 section functions
8 import printf
9 export main
11 main:
12 function argc argv
13   let oddbits 1431655765
14   let evenbits 2863311530
16   let x not 0
17   call printf format x
18   set x xor x 1431655765
19   call printf format x
20   set x xor x evenbits
21   call printf format x
23   let y or x oddbits
24   call printf format y
25   set y or y 2863311530
26   call printf format y
27   
28   set x and y 2863311530
29   call printf format x
30   set x and -1 1431655765
31   call printf format x
33   return 0
34 end function