source: buchla-68k/alcyon/blkrd.s@ d21fc6f

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

Added Alcyon C reference output.

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[7bf3856]1.globl _errno
2.globl __berrno
3.globl __thefat
4.globl __thebpb
5.globl __b_tbuf
6.globl __b_trak
7.globl __b_side
8.globl __b_sect
9.globl __b_tsec
10.globl __secrd
11.text
12__secrd:
13~~_secrd:
14~buf=R13
15~rec=R7
16link R14,#-4
17movem.l R3-R7/R13-R13,-(sp)
18~track=R6
19~side=R5
20~sector=R4
21~brc=-4
22*line 81
23move.l 8(R14),R13
24*line 81
25move 12(R14),R7
26*line 81
27*line 82
28move.l __thebpb,R8
29cmp #9,24(R8)
30beq L2
31*line 82
32move.l #$fffffff9,R0
33bra L1
34*line 83
35L2:
36*line 84
37*line 85
38move.l __thebpb,R8
39cmp #512,(R8)
40beq L3
41*line 85
42move.l #$fffffff9,R0
43bra L1
44*line 86
45L3:
46*line 87
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 88
55move R6,R0
56move.l __thebpb,R9
57mulu 22(R9),R0
58move R0,__b_tsec
59*line 89
60move R7,R4
61sub __b_tsec,R4
62*line 91
63*line 91
64move.l __thebpb,R8
65cmp 24(R8),R4
66blo L4
67*line 92
68*line 93
69move.l __thebpb,R8
70move 24(R8),R0
71sub R0,R4
72*line 94
73move #1,R5
74*line 95
75move.l __thebpb,R8
76move 24(R8),R0
77add R0,__b_tsec
78*line 96
79bra L5
80L4:
81*line 97
82*line 98
83*line 99
84clr R5
85L5:
86*line 108
87*line 108
88cmp __b_trak,R6
89bne L10000
90cmp __b_side,R5
91beq L6
92L10000:*line 109
93*line 110
94*line 110
95clr (sp)
96move __b_tsec,-(sp)
97move.l __thebpb,R8
98move 24(R8),-(sp)
99move.l #__b_tbuf,-(sp)
100clr -(sp)
101move #4,-(sp)
102jsr _trap13
103adda.l #12,sp
104move.l R0,-4(R14)
105beq L7
106*line 111
107*line 112
108move #-1,__b_trak
109*line 113
110move #-1,__b_side
111*line 114
112move.l -4(R14),R0
113bra L1
114*line 115
115*line 116
116L7:
117*line 117
118move R6,__b_trak
119*line 118
120move R5,__b_side
121*line 119
122*line 120
123L6:
124*line 121
125move #512,(sp)
126move R4,R0
127move #9,R1
128asl R1,R0
129ext.l R0
130add.l #__b_tbuf,R0
131move.l R0,-(sp)
132move.l R13,-(sp)
133jsr _memcpy
134addq.l #8,sp
135*line 122
136clr.l R0
137bra L1
138L1:tst.l (sp)+
139movem.l (sp)+,R4-R7/R13-R13
140unlk R14
141rts
142.globl _blkrd
143.text
144_blkrd:
145~~blkrd:
146~fcp=R13
147~buf=R12
148~ns=R7
149link R14,#0
150movem.l R4-R7/R12-R13,-(sp)
151~brc=R6
152~rb=R5
153*line 146
154move.l 8(R14),R13
155*line 146
156move.l 12(R14),R12
157*line 146
158move 16(R14),R7
159*line 146
160*line 147
161tst R7
162bge L9
163*line 147
164move R7,R0
165bra L8
166*line 148
167L9:
168*line 149
169bra L12
170L11:
171*line 150
172*line 155
173*line 156
174*line 157
175*line 158
176*line 158
177move.l 44(R13),R0
178move R0,(sp)
179move.l R12,-(sp)
180jsr __secrd
181addq.l #4,sp
182move.l R0,R6
183beq L13
184*line 161
185*line 162
186*line 163
187move.l R6,__berrno
188*line 164
189move #5,_errno
190*line 165
191move R7,R0
192bra L8
193*line 166
194*line 167
195L13:
196*line 168
197*line 168
198move.l #__thefat,(sp)
199move.l __thebpb,-(sp)
200move.l R13,-(sp)
201jsr __nsic
202addq.l #8,sp
203move R0,R5
204beq L14
205*line 169
206*line 170
207*line 171
208cmp #-1,R5
209bne L15
210*line 171
211move #5,_errno
212*line 172
213L15:
214*line 173
215move R7,R0
216bra L8
217*line 174
218*line 175
219L14:
220*line 176
221move.l __thebpb,R8
222clr R0
223move (R8),R0
224swap R0
225clr R0
226swap R0
227add.l R0,R12
228L12:
229*line 177
230move R7,R0
231sub #1,R7
232tst R0
233bne L11
234L10:
235*line 179
236clr R0
237bra L8
238L8:tst.l (sp)+
239movem.l (sp)+,R5-R7/R12-R13
240unlk R14
241rts
242.data
Note: See TracBrowser for help on using the repository browser.