5860
This commit is contained in:
parent
f4bef91bd9
commit
7936ad5ca2
|
@ -0,0 +1,17 @@
|
|||
# Add two numbers, and return the result in the exit code.
|
||||
#
|
||||
# To run:
|
||||
# $ ./translate_mu apps/ex2.mu
|
||||
# $ ./a.elf
|
||||
# Expected result:
|
||||
# $ echo $?
|
||||
# 7
|
||||
|
||||
fn main -> result/ebx: int {
|
||||
result <- do-add 3 4
|
||||
}
|
||||
|
||||
fn do-add a: int, b: int -> result/ebx: int {
|
||||
result <- copy a
|
||||
result <- add b
|
||||
}
|
Loading…
Reference in New Issue