source: buchla-68k/alcyon/booter.s@ ca867c1

Last change on this file since ca867c1 was 7bf3856, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 6.2 KB
Line 
1.globl _Cbuffs
2.globl _Stdbufs
3.globl _Stdbuf
4.globl _chantab
5.globl _Wrkbuf
6.bss
7L1:.ds.b 4
8.text
9.globl _B_fhdr
10.comm _B_fhdr,28
11.globl _B_txt_o
12.comm _B_txt_o,4
13.globl _B_dat_o
14.comm _B_dat_o,4
15.globl _B_bss_o
16.comm _B_bss_o,4
17.globl _B_txt_l
18.comm _B_txt_l,4
19.globl _B_dat_l
20.comm _B_dat_l,4
21.globl _B_bss_l
22.comm _B_bss_l,4
23.globl _B_lod_l
24.comm _B_lod_l,4
25.globl _B_end
26.comm _B_end,4
27.globl _B_chk
28.comm _B_chk,4
29.globl _B_buf_a
30.comm _B_buf_a,4
31.globl _B_log_s
32.comm _B_log_s,2
33.globl _B_dbg_s
34.comm _B_dbg_s,2
35.globl _booter
36.text
37_booter:
38~~booter:
39~fn=8
40~textadr=12
41link R14,#0
42movem.l R4-R7/R12-R13,-(sp)
43~i=R7
44~bgnbss=R6
45~endbss=R5
46~cp=R13
47~fcp=R12
48*line 68
49clr.l _B_txt_o
50*line 69
51clr.l _B_dat_o
52*line 70
53clr.l _B_bss_o
54*line 71
55clr.l _B_txt_l
56*line 72
57clr.l _B_dat_l
58*line 73
59clr.l _B_bss_l
60*line 74
61clr.l _B_lod_l
62*line 78
63*line 78
64move.l #L3,(sp)
65move.l 8(R14),-(sp)
66jsr _fopenb
67addq.l #4,sp
68move.l R0,L1
69bne L4
70*line 79
71*line 80
72*line 81
73*line 82
74tst _B_log_s
75beq L5
76*line 82
77move.l 8(R14),(sp)
78move.l #L6,-(sp)
79jsr _printf
80addq.l #4,sp
81*line 83
82L5:
83*line 84
84move #1,R0
85bra L2
86*line 85
87*line 86
88*line 87
89L4:
90*line 88
91*line 88
92tst _B_dbg_s
93beq L7
94*line 89
95*line 90
96move.l L1,R8
97move.b 13(R8),R0
98ext.w R0
99muls #12,R0
100add.l #_chantab,R0
101move.l R0,R8
102move.l 8(R8),R12
103*line 91
104*line 92
105move.l R12,(sp)
106jsr _SnapFCB
107*line 93
108move.l R12,(sp)
109jsr _ClusMap
110*line 94
111jsr _waitcr
112*line 95
113*line 96
114*line 97
115*line 98
116*line 99
117L7:
118*line 100
119*line 100
120move.l L1,(sp)
121move #1,-(sp)
122move #28,-(sp)
123move.l #_B_fhdr,-(sp)
124jsr _fread
125addq.l #8,sp
126cmp #1,R0
127beq L8
128*line 101
129*line 102
130*line 103
131*line 104
132tst _B_log_s
133beq L9
134*line 104
135move.l 8(R14),(sp)
136move.l #L10,-(sp)
137jsr _printf
138addq.l #4,sp
139*line 105
140L9:
141*line 106
142move.l L1,(sp)
143jsr _fclose
144*line 107
145move #2,R0
146bra L2
147*line 108
148*line 109
149*line 110
150*line 111
151L8:
152*line 112
153*line 112
154cmp #24602,_B_fhdr
155beq L11
156cmp #24603,_B_fhdr
157beq L11
158*line 113
159*line 114
160*line 115
161*line 116
162tst _B_log_s
163beq L12
164*line 117
165move.l 8(R14),(sp)
166move _B_fhdr,-(sp)
167move.l #L13,-(sp)
168jsr _printf
169addq.l #6,sp
170*line 118
171L12:
172*line 119
173move.l L1,(sp)
174jsr _fclose
175*line 120
176move #3,R0
177bra L2
178*line 121
179*line 122
180*line 123
181*line 124
182*line 125
183*line 126
184*line 127
185L11:
186*line 128
187*line 128
188cmp #24603,_B_fhdr
189bne L14
190*line 129
191*line 130
192move.l L1,(sp)
193jsr _getl
194move.l R0,_B_dat_o
195*line 131
196move.l L1,(sp)
197jsr _getl
198move.l R0,_B_bss_o
199*line 132
200*line 133
201L14:
202*line 134
203move.l 22+_B_fhdr,_B_txt_o
204*line 136
205tst.l 12(R14)
206beq L10000
207move.l 12(R14),R0
208bra L10002
209L10000:move.l _B_txt_o,R0
210L10002:move.l R0,_B_buf_a
211*line 137
212move.l 2+_B_fhdr,R0
213add.l 6+_B_fhdr,R0
214move.l R0,_B_lod_l
215*line 139
216*line 139
217move.l L1,(sp)
218move.l _B_lod_l,-(sp)
219move.l _B_buf_a,-(sp)
220jsr _flread
221addq.l #8,sp
222tst R0
223beq L15
224*line 140
225*line 141
226*line 142
227*line 143
228tst _B_log_s
229beq L16
230*line 143
231move.l 8(R14),(sp)
232move.l #L17,-(sp)
233jsr _printf
234addq.l #4,sp
235*line 144
236L16:
237*line 145
238move.l L1,(sp)
239jsr _fclose
240*line 146
241move #4,R0
242bra L2
243*line 147
244*line 148
245L15:
246*line 149
247move.l _B_buf_a,R0
248add.l _B_lod_l,R0
249sub.l #$1,R0
250move.l R0,_B_end
251*line 151
252move.l 2+_B_fhdr,_B_txt_l
253*line 152
254move.l 6+_B_fhdr,_B_dat_l
255*line 153
256move.l 10+_B_fhdr,_B_bss_l
257*line 155
258move.l _B_buf_a,R13
259*line 156
260clr.l _B_chk
261*line 158
262clr.l R7
263bra L20
264L21:
265*line 159
266move.b (R13)+,R0
267ext.w R0
268ext.l R0
269and.l #$ff,R0
270add.l R0,_B_chk
271L19:
272*line 158
273add.l #$1,R7
274L20:
275*line 158
276cmp.l _B_lod_l,R7
277blt L21
278L18:
279*line 161
280*line 162
281tst.l _B_bss_o
282beq L22
283*line 162
284move.l _B_bss_o,R6
285*line 163
286bra L23
287L22:
288*line 164
289move.l _B_end,R6
290add.l #$1,R6
291L23:
292*line 166
293move.l R6,R5
294add.l _B_bss_l,R5
295sub.l #$1,R5
296*line 169
297*line 169
298tst _B_log_s
299beq L24
300*line 170
301*line 171
302*line 172
303move.l _B_end,(sp)
304move.l _B_buf_a,-(sp)
305move.l 8(R14),-(sp)
306move.l #L25,-(sp)
307jsr _printf
308adda.l #12,sp
309*line 173
310move.l R5,(sp)
311move.l R6,-(sp)
312move.l #L26,-(sp)
313jsr _printf
314addq.l #8,sp
315*line 174
316*line 175
317move.l _B_lod_l,(sp)
318move.l _B_lod_l,-(sp)
319move.l _B_chk,-(sp)
320move.l #L27,-(sp)
321jsr _printf
322adda.l #12,sp
323*line 176
324*line 177
325move.l _B_bss_o,(sp)
326move.l _B_dat_o,-(sp)
327move.l _B_txt_o,-(sp)
328move.l #L28,-(sp)
329jsr _printf
330adda.l #12,sp
331*line 178
332*line 179
333move.l _B_bss_l,(sp)
334move.l _B_dat_l,-(sp)
335move.l _B_txt_l,-(sp)
336move.l #L29,-(sp)
337jsr _printf
338adda.l #12,sp
339*line 180
340*line 181
341*line 182
342L24:
343*line 183
344move.l L1,(sp)
345jsr _fclose
346*line 184
347clr R0
348bra L2
349L2:tst.l (sp)+
350movem.l (sp)+,R5-R7/R12-R13
351unlk R14
352rts
353.data
354L3:.dc.b $72,$0
355L6:.dc.b $62,$6F,$6F,$74,$65,$72,$3A,$20,$20,$55,$6E,$61,$62,$6C,$65,$20,$74,$6F,$20,$6F,$70,$65,$6E,$20,$22,$25,$73,$22,$A,$0
356L10:.dc.b $62,$6F,$6F,$74,$65,$72,$3A,$20,$20,$55,$6E,$61,$62,$6C,$65,$20,$74,$6F,$20,$72,$65,$61,$64,$20,$68,$65,$61,$64,$65,$72
357.dc.b $20,$66,$6F,$72,$20,$22,$25,$73,$22,$A,$0
358L13:.dc.b $62,$6F,$6F,$74,$65,$72,$3A,$20,$20,$42,$61,$64,$20,$6D,$61,$67,$69,$63,$20,$5B,$30,$78,$25,$30,$34,$78,$5D,$20,$69,$6E
359.dc.b $20,$66,$69,$6C,$65,$20,$22,$25,$73,$22,$0
360L17:.dc.b $62,$6F,$6F,$74,$65,$72,$3A,$20,$20,$55,$6E,$61,$62,$6C,$65,$20,$74,$6F,$20,$72,$65,$61,$64,$20,$22,$25,$73,$22,$A,$0
361L25:.dc.b $46,$69,$6C,$65,$20,$22,$25,$73,$22,$20,$6C,$6F,$61,$64,$65,$64,$20,$66,$72,$6F,$6D,$20,$24,$25,$30,$38,$6C,$58,$20,$74
362.dc.b $6F,$20,$24,$25,$30,$38,$6C,$58,$D,$A,$0
363L26:.dc.b $20,$20,$20,$42,$53,$53,$20,$24,$25,$30,$38,$6C,$58,$20,$74,$6F,$20,$24,$25,$30,$38,$6C,$58,$D,$A,$0
364L27:.dc.b $43,$68,$65,$63,$6B,$73,$75,$6D,$20,$20,$20,$3D,$20,$24,$25,$30,$38,$6C,$58,$2C,$20,$4C,$6F,$61,$64,$20,$6C,$65,$6E,$67
365.dc.b $74,$68,$20,$3D,$20,$25,$6C,$64,$20,$28,$24,$25,$30,$38,$6C,$58,$29,$D,$A,$0
366L28:.dc.b $20,$20,$20,$42,$5F,$74,$78,$74,$5F,$6F,$20,$3D,$20,$24,$25,$30,$38,$6C,$58,$2C,$20,$42,$5F,$64,$61,$74,$5F,$6F,$20,$3D
367.dc.b $20,$24,$25,$30,$38,$6C,$58,$2C,$20,$42,$5F,$62,$73,$73,$5F,$6F,$20,$3D,$20,$24,$25,$30,$38,$6C,$58,$D,$A,$0
368L29:.dc.b $20,$20,$20,$42,$5F,$74,$78,$74,$5F,$6C,$20,$3D,$20,$24,$25,$30,$38,$6C,$58,$2C,$20,$42,$5F,$64,$61,$74,$5F,$6C,$20,$3D
369.dc.b $20,$24,$25,$30,$38,$6C,$58,$2C,$20,$42,$5F,$62,$73,$73,$5F,$6C,$20,$3D,$20,$24,$25,$30,$38,$6C,$58,$D,$A,$0
Note: See TracBrowser for help on using the repository browser.