6006
This commit is contained in:
parent
1f029c3b57
commit
5946a64453
|
@ -1,8 +1,8 @@
|
|||
fn main -> result/ebx: int {
|
||||
fn main -> exit-status/ebx: int {
|
||||
#? run-tests
|
||||
#? result <- copy 0
|
||||
var tmp/eax: int <- factorial 5
|
||||
result <- copy tmp
|
||||
exit-status <- copy tmp
|
||||
}
|
||||
|
||||
fn factorial n: int -> result/eax: int {
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
# See translate_mu for how this file is used.
|
||||
#
|
||||
# Mu programs start at a function called 'main' with this signature:
|
||||
# fn main args: (address array kernel-string) -> exit_status/ebx: int
|
||||
# fn main args: (address array kernel-string) -> exit-status/ebx: int
|
||||
# If your program doesn't need commandline arguments you can drop it:
|
||||
# fn main -> exit_status/ebx: int
|
||||
# fn main -> exit-status/ebx: int
|
||||
#
|
||||
# Notice that the output must be in ebx, so that the exit() syscall can pick
|
||||
# it up.
|
||||
|
|
Loading…
Reference in New Issue