OpenCores
URL https://opencores.org/ocsvn/System09/System09/trunk

Subversion Repositories System09

[/] [System09/] [trunk/] [src/] [Flex9/] [f9-fms.asm] - Blame information for rev 83

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 59 davidgb
*
2
** FILE MANAGEMENT SYSTEM
3
*
4
ZD400 JMP >ZD436
5
FMSCLS JMP >ZD459
6
FMS JMP >FMS1
7
CPYMSG FCC / DISK OPERATING SYSTEM/
8
 FCC / COPYRIGHT (C) 1980 BY/
9
 FCC / TECHNICAL SYSTEMS CONSULTANTS/
10
 ORG CPYMSG
11
FCBPTR RMB 2
12
CURFCB RMB 4
13
ZD40F RMB 2
14
ZD411 RMB 1
15
ZD412 RMB 1
16
ZD413 RMB 1
17
ZD414 RMB 1
18
ZD415 RMB 2
19
ZD417 RMB 1
20
ZD418 RMB 2
21
ZD41A RMB 1
22
ZD41B RMB 2
23
ZD41D RMB 24
24
VERFLG FCB $FF
25
*
26
**
27
*
28
ZD436 JSR >COLDDR
29
 LDX #FCBPTR
30
 LDB #$0A
31
 BSR ZD451
32
 LDX #Z0005
33
 STX >ZD413
34
 STX >ZD415
35
 CLR >ZD41A
36
ZD44C LDX #ZD41B
37
 LDB #$1A
38
ZD451 CLR ,X+
39
 DECB
40
 BNE ZD451
41
 JMP >PRSPL5
42
 
43
ZD459 JSR >PRSPL4
44
ZD45C LDX >FCBPTR
45
 BEQ ZD44C
46
 LEAX -$1C,X
47
 STX >CURFCB
48
 PSHS Y
49
 JSR >CLOSE
50
 PULS Y
51
 BCC ZD45C
52
 LDX >CURFCB
53
 CLR $02,X
54
 JSR >PRSPL5
55
 LDB #$FF
56
 RTS
57
 
58
*
59
** FMS CALL, PROCESSING
60
*
61
FMS1 TST >ZCCFC
62
 BEQ ZD483
63
 JSR >PRSPL4
64
ZD483 PSHS Y,B
65
 STX >CURFCB
66
 CLR $01,X
67
 LDB ,X
68
 BNE DOFUNC
69
*
70
** READ/WRITE CHAR/BYTE
71
*
72
 LDB $02,X
73
 BEQ ZD4AC
74
 CMPB #$02
75
 BEQ ZD4A7
76
 JSR >ZD5B4
77
ZD499 LDX >CURFCB
78
 BCS ZD4C4
79
 TST >ZCCFC
80
 BNE ZD4C6
81
 CLRB
82
 PULS Y,B
83
 RTS
84
 
85
ZD4A7 JSR >ZD6CF
86
 BRA ZD499
87
ZD4AC LDB #$12
88
 BRA ZD4C4
89
 
90
DOFUNC CMPB #$16
91
 BLS DOFUN1
92
 LDB #$01
93
 BRA ZD4C4
94
DOFUN1 DECB
95
 ASLB
96
 LDX #FMSTBL
97
 JSR [B,X]
98
 LDX >CURFCB
99
 BCC ZD4C6
100
ZD4C4 STB $01,X
101
ZD4C6 JSR >PRSPL5
102
 TST $01,X
103
 PULS Y,B
104
 RTS
105
*
106
** FMS COMMAND VECTOR TABLE
107
*
108
FMSTBL FDB OPENRD FC 1
109
 FDB OPENWR FC 2
110
 FDB OPENUD FC 3
111
 FDB CLOSE FC 4
112
 FDB REWIND FC 5
113
 FDB OPNDIR FC 6
114
 FDB GETREC FC 7
115
 FDB PUTREC FC 8
116
 FDB RDSECT FC 9
117
 FDB WRSECT FC 10
118
 FDB RESV1 FC 11
119
 FDB DELETE FC 12
120
 FDB RENAME FC 13
121
 FDB RESV2 FC 14
122
 FDB NXTSEC FC 15
123
 FDB OPNREC FC 16
124
 FDB GETBYT FC 17
125
 FDB PUTBYT FC 18
126
 FDB RESV3 FC 19
127
 FDB NXTDRV FC 20
128
 FDB POSREC FC 21
129
 FDB BAKREC FC 22
130
*
131
**
132
*
133
ZD4FA BSR ZD51C
134
 BNE ZD503
135
 LDB #$02
136
 ORCC #$01
137
 RTS
138
 
139
ZD503 STD ,X
140
 LDX ,X
141
 CLR ,X
142
 CLR $01,X
143
 RTS
144
 
145
ZD50C BSR ZD51C
146
 BEQ ZD515
147
 LDB #$0D
148
 ORCC #$01
149
 RTS
150
 
151
ZD515 LDD [,X]
152
 STD ,X
153
 ANDCC #$FE
154
 RTS
155
 
156
ZD51C LDD >CURFCB
157
 ADDD #$001C
158
 LDX #FCBPTR
159
ZD525 LDY ,X
160
 BNE ZD52D
161
 ANDCC #$FB
162
 RTS
163
 
164
ZD52D CMPD ,X
165
 BNE ZD533
166
 RTS
167
ZD533 LDX ,X
168
 BRA ZD525
169
 
170
ZD537 LDX >CURFCB
171
 CLRA
172
 CLRB
173
 BSR ZD540
174
 LDB #$2F
175
ZD540 STA $11,X
176
 LEAX $01,X
177
 DECB
178
 BNE ZD540
179
 RTS
180
 
181
ZD549 LDX >CURFCB
182
 LDB #$0B
183
ZD54E LDA $04,X
184
 STA $24,X
185
 LEAX $01,X
186
 DECB
187
 BNE ZD54E
188
 RTS
189
 
190
ZD559 LDX >CURFCB
191
 LDB #$0B
192
ZD55E LDA $04,X
193
 PSHS A
194
 LDA $24,X
195
 CMPA ,S+
196
 BNE ZD56E
197
 LEAX $01,X
198
 DECB
199
 BNE ZD55E
200
ZD56E RTS
201
*
202
** GET RANDOM BYTE FROM SECTOR
203
*
204
GETBYT LDX >CURFCB
205
 LDB $02,X
206
 LSRB
207
 BCC ZD5F0
208
 LDB $23,X
209
 JMP >ZD600
210
 
211
ZD57D LDX >CURFCB
212
 LDB $22,X
213
 INC $22,X
214
 ABX
215
 STA $40,X
216
 INCB
217
 BNE ZD5AC
218
 ORCC #$01
219
 RTS
220
*
221
** PUT RANDOM BYTE IN SECTOR
222
*
223
PUTBYT LDX >CURFCB
224
 LDB $02,X
225
 ANDB #$03
226
 CMPB #$03
227
 BNE ZD5F0
228
 ORB #$80
229
 STB $02,X
230
 LDB $0F,X
231
 BITB #$80
232
 BNE ZD5AF
233
 LDB $23,X
234
 ABX
235
 STA $40,X
236
ZD5AC ANDCC #$FE
237
 RTS
238
 
239
ZD5AF LDB #$0B
240
 ORCC #$01
241
 RTS
242
 
243
ZD5B4 LDA $3B,X
244
 BMI ZD5F5
245
 BEQ ZD5C2
246
 DEC $3B,X
247
 LDA #$20
248
 BRA ZD5DF
249
 
250
ZD5C2 BSR ZD5F5
251
 BCS ZD5E1
252
 CMPA #$18
253
 BHI ZD5DF
254
 BEQ ZD5C2
255
 CMPA #$09
256
 BNE ZD5DC
257
 BSR ZD5F5
258
 BCS ZD5E1
259
 LDX >CURFCB
260
 STA $3B,X
261
 BRA ZD5B4
262
 
263
ZD5DC TSTA
264
 BEQ ZD5C2
265
ZD5DF ANDCC #$FE
266
ZD5E1 RTS
267
*
268
** REWIND FILE
269
*
270
REWIND JSR >ZDAB1
271
 BCS ZD5F0
272
 BITA #$01
273
 BEQ ZD5F0
274
 STA ,X
275
 JMP >ZD9A0
276
 
277
ZD5F0 LDB #$12
278
 ORCC #$01
279
 RTS
280
 
281
ZD5F5 LDX >CURFCB
282
 LDB $22,X
283
 BEQ ZD607
284
 INC $22,X
285
ZD600 ABX
286
 LDA $40,X
287
 ANDCC #$FE
288
 RTS
289
 
290
ZD607 BSR ZD60C
291
 BCC ZD5F5
292
 RTS
293
 
294
ZD60C LDX >CURFCB
295
 LDD $40,X
296
 INC $21,X
297
 BNE ZD61A
298
 INC $20,X
299
ZD61A CMPD #$0000
300
 BEQ ZD63C
301
ZD620 STD $1E,X
302
 PSHS A
303
 LDA #$04
304
 STA $22,X
305
 PULS A
306
 BSR RDSECT
307
 BCC ZD640
308
 BITB #$80
309
 BEQ ZD638
310
 LDB #$10
311
 BRA ZD63E
312
 
313
ZD638 LDB #$09
314
 BRA ZD63E
315
 
316
ZD63C LDB #$08
317
ZD63E ORCC #$01
318
ZD640 RTS
319
*
320
** READ SINGLE SECTOR
321
*
322
RDSECT BSR ZD668
323
 LDX >CURFCB
324
 JSR >DRIVE
325
 BCS ZD65D
326
ZD64B BSR ZD65E
327
 JSR >READ
328
 BNE ZD655
329
 ANDCC #$FE
330
 RTS
331
 
332
ZD655 PSHS B
333
 BSR ZD670
334
 PULS B
335
 BCC ZD64B
336
ZD65D RTS
337
 
338
ZD65E LDX >CURFCB
339
 LDD $1E,X
340
 LEAX $40,X
341
 RTS
342
 
343
ZD668 CLRA
344
 STA >ZD411
345
 STA >ZD412
346
 RTS
347
 
348
ZD670 BITB #$10
349
 BNE ZD685
350
 BITB #$80
351
 BNE ZD69C
352
 LDB >ZD411
353
 INCB
354
 CMPB #$07
355
 BEQ ZD685
356
 STB >ZD411
357
 BRA RESV2
358
 
359
ZD685 CLR >ZD411
360
 LDB >ZD412
361
 INCB
362
 CMPB #$04
363
 BEQ ZD69C
364
 STB >ZD412
365
 LDX >CURFCB
366
 JSR >RESTOR
367
*
368
** RESERVED
369
*
370
RESV2 ANDCC #$FE
371
 RTS
372
ZD69C ORCC #$01
373
 RTS
374
*
375
** WRITE SINGLE SECTOR
376
*
377
WRSECT BSR ZD668
378
 LDX >CURFCB
379
 JSR >DRIVE
380
 BCS ZD6C9
381
ZD6A9 LDX >CURFCB
382
 BSR ZD65E
383
 JSR >WRITE
384
 BNE ZD6BD
385
 LDA >VERFLG
386
 BEQ ZD6EF
387
 JSR >VERIFY
388
 BEQ ZD6EF
389
ZD6BD BITB #$40
390
 BNE ZD6CC
391
 PSHS B
392
 BSR ZD670
393
 PULS B
394
 BCC ZD6A9
395
ZD6C9 RTS
396
 
397
 LDB #$20
398
ZD6CC ORCC #$01
399
 RTS
400
 
401
ZD6CF LDX >CURFCB
402
 LDB $3B,X
403
 BMI ZD714
404
 CMPA #$20
405
 BNE ZD6EA
406
 INCB
407
 STB $3B,X
408
 CMPB #$7F
409
 BNE ZD6EF
410
 BRA ZD6F2
411
 
412
ZD6E5 BSR ZD6F2
413
 BCC ZD6CF
414
 RTS
415
 
416
ZD6EA TSTB
417
 BEQ ZD714
418
 BRA ZD6E5
419
 
420
ZD6EF ANDCC #$FE
421
 RTS
422
 
423
ZD6F2 PSHS A
424
 CMPB #$01
425
 BNE ZD6FC
426
 LDA #$20
427
 BRA ZD70C
428
 
429
ZD6FC LDA #$09
430
 BSR ZD714
431
 PULS A
432
 BCS ZD713
433
 PSHS A
434
 LDX >CURFCB
435
 LDA $3B,X
436
ZD70C CLR $3B,X
437
 BSR ZD714
438
 PULS A
439
ZD713 RTS
440
 
441
ZD714 LDX >CURFCB
442
 LDB $02,X
443
 CMPB #$02
444
 LBNE ZD5F0
445
 LDB $22,X
446
 CMPB #$04
447
 BNE ZD72E
448
 PSHS A
449
 BSR ZD74B
450
 PULS A
451
 BCS ZD73D
452
ZD72E JSR >ZD57D
453
 BCC ZD73D
454
 LDB #$04
455
 LDX >CURFCB
456
 STB $22,X
457
 ANDCC #$FE
458
ZD73D RTS
459
 
460
ZD73E LDX >CURFCB
461
 CLRA
462
 CLRB
463
 STD $20,X
464
 STD $42,X
465
 BRA ZD772
466
 
467
ZD74B LDB $12,X
468
 BNE ZD772
469
 LDB $17,X
470
 BEQ ZD799
471
 CLR $17,X
472
 BSR ZD799
473
 BCS ZD786
474
 BSR ZD73E
475
 BCS ZD786
476
 BSR ZD73E
477
 BCS ZD786
478
 LDX >CURFCB
479
 LDB #$02
480
 STB $17,X
481
 LDD $11,X
482
 JMP >ZDC82
483
 
484
ZD772 BSR ZD782
485
 LDX >CURFCB
486
 STD $40,X
487
 JSR >WRSECT
488
 BCC ZD799
489
 JMP >ZDBC1
490
 
491
ZD782 BSR ZD787
492
 LDD ,X
493
ZD786 RTS
494
 
495
ZD787 LDX >CURFCB
496
 LDB $03,X
497
 LDA #$06
498
 MUL
499
 LDX #ZD41D
500
 ABX
501
 STX >ZD41B
502
 TST ,X
503
 RTS
504
 
505
ZD799 BSR ZD782
506
 BNE ZD7A2
507
 LDB #$07
508
ZD79F ORCC #$01
509
 RTS
510
 
511
ZD7A2 LDX >CURFCB
512
 STD $13,X
513
 TST $12,X
514
 BNE ZD7B0
515
 STD $11,X
516
ZD7B0 INC $16,X
517
 BNE ZD7B8
518
 INC $15,X
519
ZD7B8 TST $17,X
520
 BEQ ZD7C8
521
 JSR >ZDC43
522
 BCS ZD79F
523
 LDX >CURFCB
524
 LDD $13,X
525
ZD7C8 JSR >ZD620
526
 BCS ZD79F
527
 LDX >CURFCB
528
 LDD $40,X
529
 PSHS B,A
530
 BSR ZD787
531
 PULS B,A
532
 STD ,X
533
 BNE ZD7E7
534
 CLR $02,X
535
 CLR $03,X
536
 CLR $04,X
537
 CLR $05,X
538
 BRA ZD7EF
539
 
540
ZD7E7 LDY $04,X
541
 LEAY -$01,Y
542
 STY $04,X
543
ZD7EF CLRA
544
 LDX >CURFCB
545
 INC $21,X
546
 BNE ZD7FB
547
 INC $20,X
548
ZD7FB CLRB
549
ZD7FC STA $40,X
550
 LEAX $01,X
551
 DECB
552
 BNE ZD7FC
553
 LDX >CURFCB
554
 LDD $20,X
555
 STD $42,X
556
 ANDCC #$FE
557
 RTS
558
*
559
** OPEN SYSTEM INFO. RECORD
560
*
561
OPNREC CLRB
562
 PSHS B
563
 LDB #$03
564
 BRA ZD825
565
 LDX >ZD415
566
 STX >ZD413
567
OPNDIR LDB >ZD413
568
 PSHS B
569
 LDB >ZD414
570
ZD825 LDX >CURFCB
571
 STB $41,X
572
 PULS B
573
 STB $40,X
574
 CLR >ZD418
575
 CLRB
576
 STB $22,X
577
 RTS
578
*
579
** GET INFO RECORD
580
*
581
GETREC LDX >CURFCB
582
 LDB $22,X
583
 BNE ZD85D
584
 JSR >ZD60C
585
 BCS ZD875
586
 LDX >CURFCB
587
 TST >ZD418
588
 BNE ZD852
589
 LDD 
590
 STD >ZD418
591
ZD852 LDA #$10
592
 STA $22,X
593
 LDD $1E,X
594
 STD $2F,X
595
ZD85D LDA $22,X
596
 STA $31,X
597
 LDB #$18
598
ZD865 PSHS X,B
599
 JSR >ZD5F5
600
 PULS X,B
601
 STA $04,X
602
 LEAX $01,X
603
 DECB
604
 BNE ZD865
605
 ANDCC #$FE
606
ZD875 RTS
607
*
608
** PUT INFORMATION RECORD
609
*
610
PUTREC LDX >CURFCB
611
 LDA $31,X
612
 STA $22,X
613
 LDB #$18
614
ZD881 PSHS X,B
615
 LDA $04,X
616
 JSR >ZD714
617
 PULS X,B
618
 LEAX $01,X
619
 DECB
620
 BNE ZD881
621
 JMP >WRSECT
622
 
623
ZD892 LDX >CURFCB
624
 LDA $03,X
625
 STA $23,X
626
 LDA >ZD417
627
 TST >ZD41A
628
 BNE ZD8D3
629
 STA $03,X
630
 LDX >ZD415
631
 STX >ZD413
632
ZD8AA CMPX #Z0005
633
 BEQ ZD8BB
634
 BSR ZD8D3
635
 BLS ZD8EA
636
 LDX >ZD418
637
 STX >ZD413
638
 BRA ZD8AA
639
 
640
ZD8BB LDX >CURFCB
641
 LDA $23,X
642
 STA $03,X
643
 BPL ZD8D3
644
ZD8C5 JSR >NXTDRV
645
 BCS ZD900
646
 BSR ZD8D3
647
 BLS ZD8EA
648
 JSR >ZDDAD
649
 BRA ZD8C5
650
 
651
ZD8D3 LDX >CURFCB
652
 CLR >ZD41A
653
 JSR >ZD549
654
 JSR >OPNDIR
655
ZD8DF JSR >GETREC
656
 BCC ZD8EB
657
 CMPB #$08
658
 BEQ ZD900
659
 ORCC #$01
660
ZD8EA RTS
661
 
662
ZD8EB LDX >CURFCB
663
 LDA $04,X
664
 BEQ ZD8FE
665
 BPL ZD8F6
666
 BSR ZD905
667
ZD8F6 JSR >ZD559
668
 BNE ZD8DF
669
 ANDCC #$FE
670
 RTS
671
 
672
ZD8FE BSR ZD905
673
ZD900 ANDCC #$FB
674
 ANDCC #$FE
675
 RTS
676
 
677
ZD905 LDA $33,X
678
 BNE ZD916
679
 LDD $2F,X
680
 STD $32,X
681
 LDA $31,X
682
 STA $34,X
683
ZD916 RTS
684
 
685
ZD917 JSR >ZD787
686
 BNE ZD933
687
 BSR ZD936
688
 BCS ZD935
689
 LDB #$06
690
 LDY >CURFCB
691
 LDX >ZD41B
692
ZD929 LDA $5D,Y
693
 LEAY $01,Y
694
 STA ,X+
695
 DECB
696
 BNE ZD929
697
ZD933 ANDCC #$FE
698
ZD935 RTS
699
 
700
ZD936 JSR >OPNREC
701
 JSR >ZD60C
702
 BCS ZD946
703
 LDX >CURFCB
704
 LDB #$10
705
 STB $22,X
706
ZD946 RTS
707
 
708
ZD947 JSR >ZD787
709
 BSR ZD936
710
 BCS ZD946
711
 LDB #$06
712
 LDY >CURFCB
713
 LDX >ZD41B
714
ZD957 LDA ,X+
715
 STA $5D,Y
716
 LEAY $01,Y
717
 DECB
718
 BNE ZD957
719
 JSR >WRSECT
720
 BCC ZD946
721
 JMP >ZDBC1
722
*
723
**
724
*
725
RESV1 LDX >CURFCB
726
 LDA #$02
727
 STA $02,X
728
 LDD $2F,X
729
 STD $1E,X
730
 JSR >RDSECT
731
 BCS ZD983
732
 JSR >PUTREC
733
 BCC ZD985
734
 JMP >ZDBC1
735
 
736
ZD983 LDB #$0A
737
ZD985 RTS
738
*
739
** OPEN FOR READ
740
*
741
OPENRD JSR >ZD4FA
742
 BCS ZD9C8
743
 JSR >ZD892
744
 BCS ZD9C8
745
 BNE ZD9CD
746
 LDX >CURFCB
747
 TST >ZD41A
748
 BEQ ZD9A0
749
 LDA $0F,X
750
 BITA #$20
751
 BNE ZD9C9
752
ZD9A0 JSR >ZDCC0
753
 BCS ZD9CF
754
 LDD $11,X
755
 STD $40,X
756
 JSR >ZDA76
757
 LDB $17,X
758
 BEQ ZD9C6
759
ZD9B3 PSHS B
760
 JSR >ZD60C
761
 PULS B
762
 BCS ZD9C8
763
 DECB
764
 BNE ZD9B3
765
 LDX >CURFCB
766
 CLRB
767
 STB $22,X
768
ZD9C6 ANDCC #$FE
769
ZD9C8 RTS
770
 
771
ZD9C9 LDB #$11
772
 BRA ZD9CF
773
 
774
ZD9CD LDB #$04
775
ZD9CF PSHS B
776
 JSR >ZD50C
777
 PULS B
778
 ORCC #$01
779
 RTS
780
 
781
OPENWR LDX >CURFCB
782
 TST $03,X
783
 BPL ZD9E8
784
 JSR >NXTDRV
785
 BCC ZD9E8
786
 LDB #$10
787
 RTS
788
 
789
ZD9E8 JSR >ZD4FA
790
 BCS ZD9CF
791
 JSR >ZD537
792
 JSR >ZD917
793
 BCS ZD9CF
794
 JSR >ZD892
795
 BCS ZD9CF
796
 BNE ZDA00
797
 LDB #$03
798
 BRA ZD9CF
799
 
800
ZDA00 JSR >ZDCC0
801
 BCS ZD9CF
802
 LDX >CURFCB
803
 LDB #$0A
804
ZDA0A CLR $0F,X
805
 LEAX $01,X
806
 DECB
807
 BNE ZDA0A
808
 LDX >CURFCB
809
 LDD $32,X
810
 BEQ ZDA40
811
 STD $2F,X
812
 LDA $34,X
813
 STA $31,X
814
 LDD >DATERG
815
 STD $19,X
816
 LDA >YEAR
817
 STA $1B,X
818
 JSR >ZDDAD
819
 JSR >RESV1
820
 BCS ZD9CF
821
 BSR ZDA76
822
 LDA #$04
823
 STA $22,X
824
 ANDCC #$FE
825
 RTS
826
 
827
ZDA40 LDX >CURFCB
828
 CLR $17,X
829
 INC $12,X
830
 LDD $2F,X
831
 JSR >ZD620
832
 BCS ZDA5E
833
 JSR >ZD772
834
 BCS ZDA5E
835
 JSR >WRSECT
836
 BCC ZDA61
837
 JSR >ZDBC1
838
ZDA5E JMP >ZD9CF
839
 
840
ZDA61 LDX >CURFCB
841
 LDD $1E,X
842
 STD $32,X
843
 LDA #$10
844
 STA $34,X
845
 JSR >ZD947
846
 BCS ZDA5E
847
 BRA ZDA00
848
 
849
ZDA76 LDX >CURFCB
850
 LDA ,X
851
 STA $02,X
852
 CLR ,X
853
 CLR $3B,X
854
 CLRA
855
 STA $22,X
856
 RTS
857
*
858
** READ/WRITE NEXT SECTOR
859
*
860
NXTSEC BSR ZDAB1
861
 BCS ZDA99
862
 CLR ,X
863
 LSRA
864
 LBCS ZD60C
865
 LDB #$04
866
 STB $22,X
867
 ANDCC #$FE
868
ZDA99 RTS
869
 
870
ZDA9A LDX >CURFCB
871
 LDA $02,X
872
 CMPA #$83
873
 BNE ZDAAE
874
 LDA #$03
875
 STA $02,X
876
ZDAA7 JSR >WRSECT
877
 LBCS ZDBC1
878
ZDAAE ANDCC #$FE
879
 RTS
880
 
881
ZDAB1 BSR ZDA9A
882
 BCS ZDAC2
883
 LDX >CURFCB
884
 LDA $02,X
885
 CMPA #$03
886
 BLS ZDAAE
887
 LDB #$12
888
 ORCC #$01
889
ZDAC2 RTS
890
 
891
CLOSE BSR ZDAB1
892
 BCS ZDAF8
893
 CMPA #$02
894
 BEQ ZDAD3
895
ZDACB LDX >CURFCB
896
 CLR $02,X
897
 JMP >ZD50C
898
 
899
ZDAD3 LDA $12,X
900
 BNE ZDADD
901
 JSR >ZDBA7
902
 BRA ZDAF6
903
 
904
ZDADD BSR ZDAA7
905
 BCS ZDAF8
906
 LDX >CURFCB
907
 TST $17,X
908
 BEQ ZDAEE
909
 JSR >ZDC98
910
 BCS ZDAF8
911
ZDAEE JSR >RESV1
912
 BCS ZDAF8
913
 JSR >ZD947
914
ZDAF6 BCC ZDACB
915
ZDAF8 RTS
916
*
917
** OPEN FOR UPDATE
918
*
919
OPENUD JSR >OPENRD
920
 BCS ZDB26
921
 JSR >ZD60C
922
 BCS ZDB26
923
 LDA #$03
924
 BRA ZDB1F
925
*
926
**
927
*
928
RESV3 JSR >OPENRD
929
 BCS ZDB26
930
 LDX >CURFCB
931
 LDA $0F,X
932
 BITA #$80
933
 BNE ZDB27
934
 LDD $13,X
935
 JSR >ZD620
936
 BCS ZDB26
937
 LDA #$02
938
ZDB1F LDX >CURFCB
939
 STA $02,X
940
 ANDCC #$FE
941
ZDB26 RTS
942
 
943
ZDB27 LDB #$0B
944
 ORCC #$01
945
 RTS
946
*
947
** RENAME FILE
948
*
949
RENAME BSR ZDB63
950
 JSR >ZD892
951
 BCS ZDB5D
952
 BEQ ZDB59
953
 LDX >CURFCB
954
 LDB #$0B
955
ZDB3A LDA $24,X
956
 STA $04,X
957
 LEAX $01,X
958
 DECB
959
 BNE ZDB3A
960
 BSR ZDB93
961
 BCS ZDB5D
962
 LDX >CURFCB
963
 LDA $0F,X
964
 BITA #$80
965
 BNE ZDB27
966
 BITA #$60
967
 BNE ZDB5E
968
 BSR ZDB63
969
 BRA ZDBAE
970
 
971
ZDB59 LDB #$03
972
 ORCC #$01
973
ZDB5D RTS
974
ZDB5E LDB #$0C
975
 ORCC #$01
976
 RTS
977
 
978
ZDB63 LDX >CURFCB
979
 LDA #$0B
980
 STA >ZD411
981
ZDB6B LDA $04,X
982
 LDB $35,X
983
 STA $35,X
984
 STB $04,X
985
 LEAX $01,X
986
 DEC >ZD411
987
 BNE ZDB6B
988
 LDX >CURFCB
989
 LDA $0C,X
990
 BNE ZDB8F
991
 LDB #$03
992
ZDB85 LDA $3D,X
993
 STA $0C,X
994
 LEAX $01,X
995
 DECB
996
 BNE ZDB85
997
ZDB8F LDX >CURFCB
998
 RTS
999
 
1000
ZDB93 BSR ZDB63
1001
ZDB95 JSR >ZD892
1002
 BCS ZDBA1
1003
 BNE ZDBA2
1004
 LDX >CURFCB
1005
 ANDCC #$FE
1006
ZDBA1 RTS
1007
 
1008
ZDBA2 LDB #$04
1009
 ORCC #$01
1010
 RTS
1011
 
1012
ZDBA7 LDX >CURFCB
1013
 LDA #$FF
1014
 STA $04,X
1015
ZDBAE JSR >RESV1
1016
 LDX >CURFCB
1017
 LDA #$00
1018
 STA $02,X
1019
 RTS
1020
 
1021
ZDBB9 STD $40,X
1022
 JSR >WRSECT
1023
 BCC ZDBD5
1024
ZDBC1 BITB #$40
1025
 BNE ZDBCD
1026
 BITB #$80
1027
 BEQ ZDBD3
1028
 LDB #$10
1029
 BRA ZDBD3
1030
ZDBCD LDB #$0B
1031
 BRA ZDBD3
1032
 
1033
 LDB #$0A
1034
ZDBD3 ORCC #$01
1035
ZDBD5 RTS
1036
*
1037
** DELETE FILE
1038
*
1039
DELETE JSR >ZD917
1040
 BCS ZDC39
1041
 BSR ZDB95
1042
 BCS ZDC39
1043
 LDX >CURFCB
1044
 LDA $0F,X
1045
 BITA #$80
1046
 BNE ZDC3A
1047
 BITA #$60
1048
 BNE ZDC3E
1049
 JSR >ZD787
1050
 LDX >ZD41B
1051
 LDD $02,X
1052
 BNE ZDC05
1053
 LDX >CURFCB
1054
 LDD $11,X
1055
 BEQ ZDC31
1056
 LDX >ZD41B
1057
 STD ,X
1058
 BRA ZDC19
1059
 
1060
ZDC05 LDX >CURFCB
1061
 JSR >ZD620
1062
 BCS ZDC39
1063
 LDX >CURFCB
1064
 LDD $11,X
1065
 BEQ ZDC31
1066
 BSR ZDBB9
1067
 BCS ZDC39
1068
ZDC19 LDX >CURFCB
1069
 LDD $13,X
1070
 LDX >ZD41B
1071
 STD $02,X
1072
 LDX >CURFCB
1073
 LDD $15,X
1074
 LDX >ZD41B
1075
 ADDD $04,X
1076
 STD $04,X
1077
ZDC31 JSR >ZDBA7
1078
 BCS ZDC39
1079
 JSR >ZD947
1080
ZDC39 RTS
1081
 
1082
ZDC3A LDB #$0B
1083
 BRA ZDC40
1084
ZDC3E LDB #$0C
1085
ZDC40 ORCC #$01
1086
 RTS
1087
 
1088
ZDC43 LDD $1E,X
1089
 INCB
1090
 CMPB $3C,X
1091
 BLS ZDC4F
1092
 LDB #$01
1093
 INCA
1094
ZDC4F CMPD $13,X
1095
 BNE ZDC63
1096
 LDA $37,X
1097
 CMPA #$FF
1098
 BEQ ZDC63
1099
 INCA
1100
 STA $37,X
1101
 ANDCC #$FE
1102
 RTS
1103
 
1104
ZDC63 BSR ZDC98
1105
 BCS ZDC97
1106
 LDX >CURFCB
1107
 LDA $3A,X
1108
 ADDA #$03
1109
 BNE ZDC87
1110
 LDD $1E,X
1111
 CMPD $11,X
1112
 BEQ ZDC7F
1113
 LDB #$17
1114
 ORCC #$01
1115
 RTS
1116
 
1117
ZDC7F LDD $40,X
1118
ZDC82 STD $38,X
1119
 LDA #$04
1120
ZDC87 STA $3A,X
1121
 LDD $13,X
1122
 STD $35,X
1123
 LDA #$01
1124
 STA $37,X
1125
 ANDCC #$FE
1126
ZDC97 RTS
1127
 
1128
ZDC98 LDD $38,X
1129
 JSR >ZD620
1130
 BCS ZDC97
1131
 LDX >CURFCB
1132
 TFR X,Y
1133
 LDB $3A,X
1134
 ABX
1135
 LDB #$03
1136
ZDCAB LDA $35,Y
1137
 LEAY $01,Y
1138
 STA $40,X
1139
 LEAX $01,X
1140
 DECB
1141
 BNE ZDCAB
1142
 JSR >WRSECT
1143
 BCC ZDC97
1144
 JMP >ZDBC1
1145
 
1146
ZDCC0 JSR >OPNREC
1147
 JSR >ZD60C
1148
 BCS ZDD0E
1149
 LDX >CURFCB
1150
 CLRA
1151
 CLRB
1152
 STD $20,X
1153
 LDA $67,X
1154
 STA $3C,X
1155
 CLRB
1156
ZDCD7 CLR $40,X
1157
 LEAX $01,X
1158
 DECB
1159
 BNE ZDCD7
1160
 LDX >CURFCB
1161
 ANDCC #$FE
1162
 RTS
1163
*
1164
** BACKUP ONE RECORD
1165
*
1166
BAKREC LDX >CURFCB
1167
 LDA $17,X
1168
 BEQ ZDD0A
1169
 LDD $20,X
1170
 SUBD #$0001
1171
 BPL ZDCF8
1172
 JMP >ZDD9A
1173
*
1174
** POSITION TO RECORD N
1175
*
1176
ZDCF8 STD $20,X
1177
POSREC JSR >ZDAB1
1178
 BCS ZDD0E
1179
 RORA
1180
 BCC ZDD0A
1181
 CLR ,X
1182
 LDA $17,X
1183
 BNE ZDD0F
1184
ZDD0A LDB #$12
1185
 ORCC #$01
1186
ZDD0E RTS
1187
 
1188
ZDD0F CLR >ZD411
1189
 LDD $11,X
1190
 LDY $20,X
1191
 BEQ ZDD85
1192
 JSR >ZDD9F
1193
 BCS ZDD0E
1194
 CLRA
1195
 CLRB
1196
ZDD22 TST $02,X
1197
 BEQ ZDD9A
1198
 ADDB $02,X
1199
 ADCA #$00
1200
 STX >ZD40F
1201
 LDX >CURFCB
1202
 CMPD $20,X
1203
 BCC ZDD62
1204
 LDX >ZD40F
1205
 LEAX $03,X
1206
 PSHS A
1207
 LDA >ZD411
1208
 INCA
1209
 STA >ZD411
1210
 CMPA #$54
1211
 BEQ ZDD50
1212
 CMPA #$A8
1213
 PULS A
1214
 BEQ ZDD9A
1215
 BRA ZDD22
1216
 
1217
ZDD50 PSHS B
1218
 LDX >CURFCB
1219
 LDD $40,X
1220
 BSR ZDD9F
1221
 BCS ZDD9A
1222
 PULS B
1223
 PULS A
1224
 BRA ZDD22
1225
 
1226
ZDD62 SUBD $20,X
1227
 LDX >ZD40F
1228
 LDA $02,X
1229
 PSHS B
1230
 SUBA ,S+
1231
 DECA
1232
 TFR A,B
1233
 LDA ,X
1234
 ADDB $01,X
1235
 LDX >CURFCB
1236
 BCS ZDD7F
1237
ZDD7A CMPB $3C,X
1238
 BLS ZDD85
1239
ZDD7F SUBB $3C,X
1240
 INCA
1241
 BRA ZDD7A
1242
 
1243
ZDD85 JSR >ZD620
1244
 BCS ZDD9E
1245
 LDX >CURFCB
1246
 LDD $42,X
1247
 CMPD $20,X
1248
 BEQ ZDDAA
1249
 LDB #$19
1250
 BRA ZDD9C
1251
 
1252
ZDD9A LDB #$18
1253
ZDD9C ORCC #$01
1254
ZDD9E RTS
1255
 
1256
ZDD9F JSR >ZD620
1257
 BCS ZDDAC
1258
 LDX >CURFCB
1259
 LDB #$44
1260
 ABX
1261
ZDDAA ANDCC #$FE
1262
ZDDAC RTS
1263
 
1264
ZDDAD LDX >CURFCB
1265
 LDB #$0B
1266
ZDDB2 LDA $24,X
1267
 STA $04,X
1268
 LEAX $01,X
1269
 DECB
1270
 BNE ZDDB2
1271
 RTS
1272
*
1273
** FIND NEXT DRIVE
1274
*
1275
NXTDRV LDX >CURFCB
1276
 LDA $03,X
1277
 INCA
1278
 CMPA #$04
1279
 BCC ZDDD6
1280
 STA $03,X
1281
 BNE ZDDD0
1282
 JSR >DRVRDY
1283
 BRA ZDDD3
1284
 
1285
ZDDD0 JSR >QUICK
1286
ZDDD3 BCS NXTDRV
1287
 RTS
1288
 
1289
ZDDD6 LDB #$10
1290
 ORCC #$01
1291
 RTS
1292
 END
1293
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.