This commit is contained in:
Kartik Agaram 2020-02-10 01:01:43 -08:00
parent 1f029c3b57
commit 5946a64453
2 changed files with 4 additions and 4 deletions

View File

@ -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 {

View File

@ -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.