Last change
on this file since 30 was
1,
checked in by buchmann, 17 years ago
|
Initial import from CVS repository
|
File size:
1.1 KB
|
Line | |
---|
1 | .extern _stack |
---|
2 | .extern _gp |
---|
3 | |
---|
4 | .text |
---|
5 | .align 2 |
---|
6 | |
---|
7 | li $26,0x0000FF15 |
---|
8 | mtc0 $26,$12 |
---|
9 | |
---|
10 | la $2, _edata |
---|
11 | la $3, _end |
---|
12 | li $4, 0 |
---|
13 | |
---|
14 | /* set bss to zero */ |
---|
15 | loop: |
---|
16 | beq $2, $3, endloop |
---|
17 | sw $4, 0($2) |
---|
18 | addiu $2, $2, 4 |
---|
19 | j loop |
---|
20 | endloop: |
---|
21 | mfc0 $2,$0 |
---|
22 | nop /* 2 delayed after mfc0 */ |
---|
23 | nop |
---|
24 | beq $2,$0,toMain0 |
---|
25 | nop |
---|
26 | ori $3,$0,1 |
---|
27 | beq $2,$3,toMain1 |
---|
28 | nop |
---|
29 | ori $3,$0,2 |
---|
30 | beq $2,$3,toMain2 |
---|
31 | nop |
---|
32 | ori $3,$0,3 |
---|
33 | beq $2,$3,toMain3 |
---|
34 | nop |
---|
35 | j endloop |
---|
36 | |
---|
37 | toMain0: |
---|
38 | la $sp, _stack - 4 |
---|
39 | la $28, _gp |
---|
40 | la $27, main0 |
---|
41 | j $27 |
---|
42 | nop |
---|
43 | toMain1: |
---|
44 | la $sp, _stack - 256 - 4 |
---|
45 | la $28, _gp |
---|
46 | la $27, main1 |
---|
47 | j $27 |
---|
48 | nop |
---|
49 | toMain2: |
---|
50 | la $sp, _stack - 512 - 4 |
---|
51 | la $28, _gp |
---|
52 | la $27, main2 |
---|
53 | j $27 |
---|
54 | nop |
---|
55 | toMain3: |
---|
56 | la $sp, _stack - 768 - 4 |
---|
57 | la $28, _gp |
---|
58 | la $27, main3 |
---|
59 | j $27 |
---|
60 | nop |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | |
---|
Note: See
TracBrowser
for help on using the repository browser.