source: buchla-68k/alcyon/blkwr.s@ de91266

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 5.8 KB
Line 
1.globl _errno
2.globl __berrno
3.globl __thebpb
4.globl __thefat
5.globl __fatmod
6.globl __b_tbuf
7.globl __b_trak
8.globl __b_side
9.globl __b_sect
10.globl __b_tsec
11.globl __secwr
12.text
13__secwr:
14~~_secwr:
15~buf=R13
16~rec=R7
17link R14,#0
18movem.l R3-R7/R13-R13,-(sp)
19~track=R6
20~side=R5
21~sector=R4
22*line 71
23move.l 8(R14),R13
24*line 71
25move 12(R14),R7
26*line 71
27*line 72
28move.l __thebpb,R8
29cmp #9,24(R8)
30beq L2
31*line 72
32move.l #$fffffff9,R0
33bra L1
34*line 73
35L2:
36*line 74
37*line 75
38move.l __thebpb,R8
39cmp #512,(R8)
40beq L3
41*line 75
42move.l #$fffffff9,R0
43bra L1
44*line 76
45L3:
46*line 77
47move R7,R6
48move.l __thebpb,R8
49move 22(R8),-(sp)
50move R6,R0
51ext.l R0
52divu (sp)+,R0
53move R0,R6
54*line 78
55move R7,R4
56move R6,R0
57move.l __thebpb,R9
58mulu 22(R9),R0
59sub R0,R4
60*line 80
61*line 80
62move.l __thebpb,R8
63cmp 24(R8),R4
64blo L4
65*line 81
66*line 82
67move.l __thebpb,R8
68move 24(R8),R0
69sub R0,R4
70*line 83
71move #1,R5
72*line 84
73bra L5
74L4:
75*line 85
76*line 86
77*line 87
78clr R5
79L5:
80*line 100
81*line 101
82cmp __b_trak,R6
83bne L10000
84cmp __b_side,R5
85beq L6
86L10000:*line 101
87clr.l R0
88bra L1
89*line 102
90L6:
91*line 103
92move #512,(sp)
93move.l R13,-(sp)
94move R4,R0
95move #9,R1
96asl R1,R0
97ext.l R0
98add.l #__b_tbuf,R0
99move.l R0,-(sp)
100jsr _memcpy
101addq.l #8,sp
102*line 110
103clr.l R0
104bra L1
105L1:tst.l (sp)+
106movem.l (sp)+,R4-R7/R13-R13
107unlk R14
108rts
109.globl _blkwr
110.text
111_blkwr:
112~~blkwr:
113~fcp=8
114~buf=12
115~ns=16
116link R14,#-10
117~rc=-4
118~clustr=-6
119*line 134
120bra L10
121L9:
122*line 135
123*line 136
124*line 136
125move.l 8(R14),R8
126tst.l 52(R8)
127beq L11
128*line 137
129*line 138
130*line 138
131move.l 8(R14),R8
132move.l 40(R8),R0
133move.l 8(R14),R9
134move.l 52(R9),R1
135cmp.l R1,R0
136bge L12
137*line 139
138*line 144
139*line 145
140*line 146
141*line 146
142clr (sp)
143move.l 8(R14),R8
144move.l 44(R8),R0
145move R0,-(sp)
146move #1,-(sp)
147move.l 12(R14),-(sp)
148move #1,-(sp)
149move #4,-(sp)
150jsr _trap13
151adda.l #12,sp
152move.l R0,-4(R14)
153beq L13
154*line 147
155*line 151
156*line 152
157*line 153
158move.l -4(R14),__berrno
159*line 154
160move #5,_errno
161*line 155
162move 16(R14),R0
163bra L7
164*line 156
165*line 157
166*line 158
167L13:
168*line 159
169move.l 8(R14),R8
170move.l 44(R8),R0
171move R0,(sp)
172move.l 12(R14),-(sp)
173jsr __secwr
174addq.l #4,sp
175*line 160
176*line 161
177*line 162
178move.l #__thefat,(sp)
179move.l __thebpb,-(sp)
180move.l 8(R14),-(sp)
181jsr __nsic
182addq.l #8,sp
183ext.l R0
184move.l R0,-4(R14)
185*line 163
186*line 167
187*line 168
188*line 169
189*line 170
190sub #1,16(R14)
191bne L14
192*line 170
193clr R0
194bra L7
195*line 171
196L14:
197*line 172
198*line 172
199tst.l -4(R14)
200bge L15
201*line 173
202*line 174
203move #5,_errno
204*line 175
205move 16(R14),R0
206bra L7
207*line 176
208*line 177
209L15:
210*line 178
211move.l __thebpb,R8
212clr R0
213move (R8),R0
214swap R0
215clr R0
216swap R0
217add.l R0,12(R14)
218*line 179
219*line 180
220bra L16
221L12:
222*line 181
223*line 181
224move.l 8(R14),R8
225move.l 40(R8),R0
226move.l 8(R14),R9
227move.l 52(R9),R1
228cmp.l R1,R0
229bne L17
230*line 182
231*line 183
232*line 183
233move.l 8(R14),(sp)
234jsr __alcnew
235tst R0
236beq L18
237*line 184
238*line 185
239move #5,_errno
240*line 186
241move 16(R14),R0
242bra L7
243*line 187
244*line 188
245L18:
246*line 189
247move.l 8(R14),R8
248and #32767,32(R8)
249*line 190
250*line 195
251*line 196
252*line 197
253*line 197
254clr (sp)
255move.l 8(R14),R8
256move.l 44(R8),R0
257move R0,-(sp)
258move #1,-(sp)
259move.l 12(R14),-(sp)
260move #1,-(sp)
261move #4,-(sp)
262jsr _trap13
263adda.l #12,sp
264move.l R0,-4(R14)
265beq L19
266*line 198
267*line 202
268*line 203
269*line 204
270move.l -4(R14),__berrno
271*line 205
272move #5,_errno
273*line 206
274move 16(R14),R0
275bra L7
276*line 207
277*line 208
278*line 209
279L19:
280*line 210
281move.l 8(R14),R8
282move.l 44(R8),R0
283move R0,(sp)
284move.l 12(R14),-(sp)
285jsr __secwr
286addq.l #4,sp
287*line 211
288*line 212
289*line 213
290move.l 8(R14),R8
291add.l #$1,40(R8)
292*line 214
293move.l 8(R14),R8
294add #1,34(R8)
295*line 215
296move.l 8(R14),R8
297add.l #$1,44(R8)
298*line 216
299*line 217
300*line 218
301sub #1,16(R14)
302bne L20
303*line 218
304clr R0
305bra L7
306*line 219
307L20:
308*line 220
309move.l __thebpb,R8
310clr R0
311move (R8),R0
312swap R0
313clr R0
314swap R0
315add.l R0,12(R14)
316*line 221
317*line 222
318*line 223
319L17:L16:bra L21
320L11:
321*line 224
322*line 225
323*line 226
324*line 226
325jsr __newcls
326move R0,-6(R14)
327bne L22
328*line 227
329*line 228
330move #5,_errno
331*line 229
332move 16(R14),R0
333bra L7
334*line 230
335*line 231
336L22:
337*line 232
338move -6(R14),(sp)
339jsr _micons
340move R0,-(sp)
341move.l 8(R14),R8
342move (sp)+,26(R8)
343*line 233
344move #4088,(sp)
345move -6(R14),-(sp)
346move.l #__thefat,-(sp)
347jsr __ptcl12
348addq.l #6,sp
349*line 234
350move #1,__fatmod
351*line 235
352move.l 8(R14),-(sp)
353move -6(R14),-(sp)
354move.l __thebpb,-(sp)
355jsr __cl2lsn
356addq.l #6,sp
357ext.l R0
358move.l (sp)+,R8
359move.l R0,44(R8)
360*line 236
361move.l 8(R14),R8
362move -6(R14),36(R8)
363*line 237
364move.l 8(R14),R8
365clr 34(R8)
366*line 238
367move.l __thebpb,R8
368clr R0
369move 2(R8),R0
370swap R0
371clr R0
372swap R0
373move.l 8(R14),R9
374move.l R0,52(R9)
375*line 239
376move.l 8(R14),R8
377and #32767,32(R8)
378*line 240
379*line 241
380move.l 8(R14),R8
381and #32767,32(R8)
382*line 242
383*line 247
384*line 248
385*line 249
386*line 249
387clr (sp)
388move.l 8(R14),R8
389move.l 44(R8),R0
390move R0,-(sp)
391move #1,-(sp)
392move.l 12(R14),-(sp)
393move #1,-(sp)
394move #4,-(sp)
395jsr _trap13
396adda.l #12,sp
397move.l R0,-4(R14)
398beq L23
399*line 250
400*line 254
401*line 255
402*line 256
403move.l -4(R14),__berrno
404*line 257
405move #5,_errno
406*line 258
407move 16(R14),R0
408bra L7
409*line 259
410*line 260
411*line 261
412L23:
413*line 262
414move.l 8(R14),R8
415move.l 44(R8),R0
416move R0,(sp)
417move.l 12(R14),-(sp)
418jsr __secwr
419addq.l #4,sp
420*line 263
421*line 264
422*line 265
423move.l 8(R14),R8
424add.l #$1,40(R8)
425*line 266
426move.l 8(R14),R8
427add #1,34(R8)
428*line 267
429move.l 8(R14),R8
430add.l #$1,44(R8)
431*line 268
432*line 269
433*line 270
434sub #1,16(R14)
435bne L24
436*line 270
437clr R0
438bra L7
439*line 271
440L24:
441*line 272
442move.l __thebpb,R8
443clr R0
444move (R8),R0
445swap R0
446clr R0
447swap R0
448add.l R0,12(R14)
449L21:
450*line 273
451L10:
452*line 274
453tst 16(R14)
454bgt L9
455L8:
456*line 276
457move 16(R14),R0
458bra L7
459L7:unlk R14
460rts
461.data
Note: See TracBrowser for help on using the repository browser.