source: buchla-68k/alcyon/fsinit.s@ 9519422

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[7bf3856]1.globl _errno
2.globl __bpbin
3.globl __dirin
4.globl __fatin
5.globl __dirmod
6.globl __fatmod
7.globl _Stdbufs
8.comm _Stdbufs,4
9.globl _Wrkbuf
10.comm _Wrkbuf,512
11.globl _Stdbuf
12.comm _Stdbuf,8192
13.globl _Cbuffs
14.comm _Cbuffs,198
15.globl __fcbtab
16.comm __fcbtab,448
17.globl _chantab
18.comm _chantab,132
19.globl __b_tbuf
20.comm __b_tbuf,4608
21.globl __b_trak
22.comm __b_trak,2
23.globl __b_side
24.comm __b_side,2
25.globl __b_sect
26.comm __b_sect,2
27.globl __b_tsec
28.comm __b_tsec,2
29.globl __badfd
30.text
31__badfd:
32~~_badfd:
33link R14,#-4
34*line 57
35move #9,_errno
36*line 58
37move #-1,R0
38bra L1
39L1:unlk R14
40rts
41.globl __noper
42.text
43__noper:
44~~_noper:
45link R14,#-4
46*line 70
47clr R0
48bra L2
49L2:unlk R14
50rts
51.globl _InitCH
52.text
53_InitCH:
54~~InitCH:
55~cp=R13
56~rdi=13
57~wri=15
58~ioi=17
59~ski=19
60~cfp=20
61~charg=24
62link R14,#0
63movem.l R7-R7/R13-R13,-(sp)
64*line 88
65move.l 8(R14),R13
66*line 88
67move.b 13(R14),(R13)
68*line 89
69move.b 15(R14),1(R13)
70*line 90
71move.b 17(R14),2(R13)
72*line 91
73move.b 19(R14),3(R13)
74*line 92
75move.l 20(R14),4(R13)
76*line 93
77move.l 24(R14),8(R13)
78L3:tst.l (sp)+
79movem.l (sp)+,R13-R13
80unlk R14
81rts
82.globl _Init_CB
83.text
84_Init_CB:
85~~Init_CB:
86~fp=R13
87~flags=13
88~unit=15
89~bufad=16
90~bufsize=20
91link R14,#0
92movem.l R7-R7/R13-R13,-(sp)
93*line 108
94move.l 8(R14),R13
95*line 108
96clr.l (R13)
97*line 109
98clr.l 4(R13)
99*line 110
100move.l 16(R14),8(R13)
101*line 111
102move.b 13(R14),12(R13)
103*line 112
104move.b 15(R14),13(R13)
105*line 113
106clr.b 14(R13)
107*line 114
108move 20(R14),16(R13)
109L4:tst.l (sp)+
110movem.l (sp)+,R13-R13
111unlk R14
112rts
113.globl _InitFS
114.text
115_InitFS:
116~~InitFS:
117link R14,#0
118movem.l R6-R7,-(sp)
119~i=R7
120*line 130
121move #448,(sp)
122clr -(sp)
123move.l #__fcbtab,-(sp)
124jsr _memset
125addq.l #6,sp
126*line 131
127move #4096,(sp)
128clr -(sp)
129move.l #_Stdbuf,-(sp)
130jsr _memsetw
131addq.l #6,sp
132*line 133
133move #1024,(sp)
134clr.l -(sp)
135clr -(sp)
136move #1,-(sp)
137move.l #_Cbuffs,-(sp)
138jsr _Init_CB
139adda.l #12,sp
140*line 134
141move #1,(sp)
142clr.l -(sp)
143move #1,-(sp)
144move #1,-(sp)
145move.l #18+_Cbuffs,-(sp)
146jsr _Init_CB
147adda.l #12,sp
148*line 135
149move #1,(sp)
150clr.l -(sp)
151move #2,-(sp)
152move #1,-(sp)
153move.l #36+_Cbuffs,-(sp)
154jsr _Init_CB
155adda.l #12,sp
156*line 137
157move #3,R7
158bra L8
159L9:
160*line 138
161clr (sp)
162clr.l -(sp)
163clr -(sp)
164clr -(sp)
165move R7,R0
166muls #18,R0
167add.l #_Cbuffs,R0
168move.l R0,-(sp)
169jsr _Init_CB
170adda.l #12,sp
171L7:
172*line 137
173add #1,R7
174L8:
175*line 137
176cmp #11,R7
177blt L9
178L6:
179*line 140
180clr.l _Stdbuf
181*line 142
182move #1,R7
183bra L12
184L13:
185*line 143
186move R7,R0
187sub #1,R0
188move #10,R1
189asl R1,R0
190ext.l R0
191add.l #_Stdbuf,R0
192move R7,R1
193move #10,R2
194asl R2,R1
195ext.l R1
196add.l #_Stdbuf,R1
197move.l R1,R9
198move.l R0,(R9)
199L11:
200*line 142
201add #1,R7
202L12:
203*line 142
204cmp #8,R7
205blt L13
206L10:
207*line 145
208move.l #7168+_Stdbuf,_Stdbufs
209*line 147
210move.l #$2,(sp)
211move.l #__noper,-(sp)
212clr -(sp)
213move #1,-(sp)
214clr -(sp)
215move #2,-(sp)
216move.l #_chantab,-(sp)
217jsr _InitCH
218adda.l #16,sp
219*line 148
220move.l #$2,(sp)
221move.l #__noper,-(sp)
222clr -(sp)
223move #1,-(sp)
224move #2,-(sp)
225clr -(sp)
226move.l #12+_chantab,-(sp)
227jsr _InitCH
228adda.l #16,sp
229*line 149
230move.l #$2,(sp)
231move.l #__noper,-(sp)
232clr -(sp)
233move #1,-(sp)
234move #2,-(sp)
235clr -(sp)
236move.l #24+_chantab,-(sp)
237jsr _InitCH
238adda.l #16,sp
239*line 151
240move #3,R7
241bra L16
242L17:
243*line 152
244clr.l (sp)
245move.l #__badfd,-(sp)
246clr -(sp)
247clr -(sp)
248clr -(sp)
249clr -(sp)
250move R7,R0
251muls #12,R0
252add.l #_chantab,R0
253move.l R0,-(sp)
254jsr _InitCH
255adda.l #16,sp
256L15:
257*line 151
258add #1,R7
259L16:
260*line 151
261cmp #11,R7
262blt L17
263L14:
264*line 154
265clr __bpbin
266*line 155
267clr __dirin
268*line 156
269clr __fatin
270*line 157
271clr __fatmod
272*line 158
273clr __dirmod
274*line 161
275move #-1,__b_trak
276*line 162
277move #-1,__b_side
278L5:tst.l (sp)+
279movem.l (sp)+,R7-R7
280unlk R14
281rts
282.data
Note: See TracBrowser for help on using the repository browser.