1 | // |
2 | // Authors: Wolfgang Spraul <wolfgang@sharism.cc> |
3 | // |
4 | // This program is free software; you can redistribute it and/or |
5 | // modify it under the terms of the GNU General Public License |
6 | // as published by the Free Software Foundation; either version |
7 | // 3 of the License, or (at your option) any later version. |
8 | // |
9 | |
10 | .text |
11 | .extern pre_main |
12 | |
13 | .globl _start |
14 | .set noreorder |
15 | _start: |
16 | b real_start |
17 | nop |
18 | .word 0x0 // its address == start address + 8 |
19 | .word 0x0 |
20 | .word 0x0 |
21 | .word 0x0 |
22 | .word 0x0 |
23 | .word 0x0 |
24 | .word 0x0 |
25 | .word 0x0 |
26 | |
27 | real_start: |
28 | /* setup stack, jump to C code */ |
29 | add $29, $20, 0x3ffff0 // sp locate at start address offset 0x2ffff0 |
30 | add $25, $20, 0x40 // t9 = pre_main() |
31 | j $25 |
32 | nop |
33 | |
34 | .set reorder |
35 | |