-
Notifications
You must be signed in to change notification settings - Fork 84
/
verdir.src
73 lines (66 loc) · 1.29 KB
/
verdir.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.page
.subttl verdir
; validate files with bam
; create new bam according to contents of files entered in dir
verdir
valdat ;validate is soft-load
jsr simprs ;extract drive #
jsr initdr
lda #$40
sta wbam
jsr newmpv ;set new bam
lda #0
sta delind
jsr srchst ;search for first file
bne vd25 ;found one
vd10 lda #0 ;set directory sectors...
sta sector ;...in bam
lda dirtrk
sta track
jsr vmkbam
lda #0
sta wbam
jsr scrbam ;write out bams
jmp endcmd
vd15 iny
lda (dirbuf),y
pha ;save track
iny
lda (dirbuf),y
pha ;save sector
ldy #19 ;get ss track
lda (dirbuf),y ;is this relative ?
beq vd17 ;no
sta track ;yes - save track
iny
lda (dirbuf),y ;get ss sector
sta sector
jsr vmkbam ;validate ss by links
vd17 pla
sta sector ;now do data blocks
pla
sta track
jsr vmkbam ;set bit used in bam
vd20 jsr srre ;search for more
beq vd10 ;no more files
vd25 ldy #0
lda (dirbuf),y
bmi vd15
jsr deldir ;not closed delete dir
jmp vd20
vmkbam jsr tschk ;mark bam with file sectors
jsr wused
jsr opnird
mrk2 lda #0
jsr setpnt
jsr getbyt
sta track
jsr getbyt
sta sector
lda track
bne mrk1
jmp frechn
mrk1 jsr wused
jsr nxtbuf
jmp mrk2
; .end