about summary refs log tree commit diff stats
path: root/test/tc_ext.py
Commit message (Expand)AuthorAgeFilesLines
* added copyright info to config files and test caseshut2010-03-081-0/+15
* shell_escape: added testcasehut2010-02-241-0/+7
* tc_ext: small updatehut2010-01-261-7/+10
* added testcase for openstructhut2010-01-261-0/+26
* added testcase for mount_pathhut2010-01-261-0/+25
* added unittest for flatten and uniquehut2010-01-261-0/+69
r script for translating Mu programs' href='/akkartik/mu/commit/mu-init.subx?h=main&id=7ca19e4e1d3acb2c770c180156b813fb536a673e'>7ca19e4e ^
65eb2a57 ^
7ca19e4e ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25




                                                                    
                                                                    
                                                                     
                                   








                                                                            
                                              






                                 
# Initialize the minimal runtime for Mu programs.
#
# See translate_mu for how this file is used.
#
# Mu programs start at a function called 'main' with this signature:
#   fn main args: (addr 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
#
# Notice that the output must be in ebx, so that the exit() syscall can pick
# it up.

== code

Entry:
    # we don't use ebp in Entry; just initialize it
    bd/copy-to-ebp 0/imm32
    # var args/eax: (addr array kernel-string)
    89/<- %eax 4/r32/esp
    # initialize the heap
    (new-segment *Heap-size Heap)
    # run Mu program
    (main %eax)
    # exit
    (syscall_exit)