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
Removed superfluous debug comments from ARM generator
[voodoo-lang.git]
/
test
/
mul.voo
blob
22b84d2d915edb559407419412211f973ef7c9bc
1
#### Test multiplication
2
3
section data
4
format:
5
string "%d\n\x00"
6
7
section functions
8
import printf
9
export main
10
11
main:
12
function argc argv
13
let x 0
14
let y mul x 1
15
call printf format y
16
set y mul x 0
17
call printf format y
18
set y mul x -1
19
call printf format y
20
set y mul x 3
21
call printf format y
22
set y mul x -3
23
call printf format y
24
25
set x 42
26
set y mul x 1
27
call printf format y
28
set y mul x 0
29
call printf format y
30
set y mul x -1
31
call printf format y
32
set y mul x 3
33
call printf format y
34
set y mul x -3
35
call printf format y
36
37
set y mul x 8
38
call printf format y
39
40
set x 42
41
set y 8
42
set y mul x y
43
call printf format y
44
45
return 0
46
end function