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