build test/libgroup.so instead of test/libgroup.s
[voodoo-lang.git] / test / rotate.voo
blobcbc5a817d577ae04484871fe776bb0d68b5af9c8
1 #### Test rotate actions
3 section data
5 align
6 format_rol_14_3:
7 string "rol 14 3: %d\n\x00"
9 align
10 format_ror_x_4:
11 string "ror x 4: %d\n\x00"
13 align
14 format_rol_x_y:
15 string "rol x y: %d\n\x00"
17 align
18 format_ror_x_y:
19 string "ror x y: %d\n\x00"
21 align
22 format_rol_m11_4:
23 string "rol -11 4: %d\n\x00"
28 section functions
29 import printf
30 export main
32 align
33 main:
34 function argc argv
35     let x rol 14 3
36     call printf format_rol_14_3 x
38     set x ror x 4
39     call printf format_ror_x_4 x
41     let y 4
42     set x rol x y
43     call printf format_rol_x_y x
45     set y 3
46     set x ror x y
47     call printf format_ror_x_y x
49     set x rol -11 4
50     call printf format_rol_m11_4 x
52     set x ror x 4
53     call printf format_ror_x_4 x
55     return 0
56 end function