1
2 .global __main
3 .global __rom_start
4
5 .global _rambase
6 .global _ramstart
7
8 .global splash_bits
9 .global _start
10 .global _stext
11 .global _edata
12
13#define DEBUG
14#define ROM_OFFSET 0x10C00000
15#define STACK_GAURD 0x10
16
17 .text
18
19_start:
20_stext:
21 movew
22
23
24
25 moveb
26 moveb
27
28 movew
29 movew
30
31 moveb
32 moveb
33 moveb
34 moveb
35
36 movew
37 movew
38
39 movew
40 movew
41 movew
42 movew
43
44 moveb
45 movel
46 movel %d0, 0xfffff304
47
48 moveb 0xfffff42b, %d0
49 andb
50 moveb %d0, 0xfffff42b
51
52 moveb
53 movew
54 movew
55#endif
56
57 movew
58L0:
59 subw
60 bne L0
61#ifdef DEBUG
62 moveq
63 moveb %d7,0xfffff907
64pclp1:
65 movew 0xfffff906, %d7
66 andw
67 beq pclp1
68#endif
69
70#ifdef DEBUG
71 moveq
72 moveb %d7,0xfffff907
73pclp3:
74 movew 0xfffff906, %d7
75 andw
76 beq pclp3
77#endif
78 moveal
79 moveal
80 moveal
81
82
83L1:
84 movel
85 cmpal %a0, %a1
86 bhi L1
87
88#ifdef DEBUG
89 moveq
90 jsr putc
91#endif
92
93 pea 0
94 pea env
95 pea %sp@(4)
96 pea 0
97
98#ifdef DEBUG
99 moveq
100 jsr putc
101#endif
102
103lp:
104 jsr start_kernel
105 jmp lp
106_exit:
107
108 jmp _exit
109
110__main:
111
112 rts
113
114#ifdef DEBUG
115putc:
116 moveb %d7,0xfffff907
117pclp:
118 movew 0xfffff906, %d7
119 andw
120 beq pclp
121 rts
122#endif
123
124 .data
125
126
127
128
129
130.align 4
131_ramvec:
132.long 0
133_rambase:
134.long 0
135_ramstart:
136.long 0
137_ramend:
138.long 0
139
140env:
141 .long 0
142