repo.or.cz
/
mu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix other mandelbrot variants
[mu.git]
/
tutorial
/
task9-solution.mu
blob
9ecf0ee805650b92697d667bd16a36c5eb2df643
1
fn f -> _/eax: int {
2
return 2
3
}
4
5
fn g -> _/eax: int {
6
return 3
7
}
8
9
fn add-f-and-g -> _/eax: int {
10
var _x/eax: int <- f
11
var x/ecx: int <- copy _x
12
var y/eax: int <- g
13
x <- add y
14
return x
15
}
16
17
fn test-add-f-and-g {
18
var result/eax: int <- add-f-and-g
19
check-ints-equal result, 5, "F - test-add-f-and-g\n"
20
}
21
22
fn main {
23
}