repo.or.cz
/
voodoo-lang.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Made parser able to report multiple errors per call, using new Voodoo::Parser::Multip...
[voodoo-lang.git]
/
test
/
bitwise.voo
blob
d476ae80445c9957b325fab548d37ae2f0f954a7
1
#### Test bitwise operators
2
3
section data
4
format:
5
string "%08x\n\x00"
6
7
section functions
8
import printf
9
export main
10
11
main:
12
function argc argv
13
let oddbits 1431655765
14
let evenbits 2863311530
15
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
22
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
32
33
return 0
34
end function