about summary refs log tree commit diff stats
path: root/core/conf/prt-get.conf
blob: 8e8833330fdafd0a0fa0508e8ae46ccfe8f7806e (plain) (blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
1
2
3
4
5
6
7
8




                                                                    
                                                                    
                                                                     
                                   








                                                                            
                                              






                                 
# 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)