-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathlccfmt3.src
101 lines (64 loc) · 1.28 KB
/
lccfmt3.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
.page
.subttl lccfmt3
;* format done, now verify it
lda #200 ;look at 200 syncs
sta trys
comp lda #0 ;pointer into headers
sta bufpnt
lda #>buff0
sta bufpnt+1
lda sectr ;sector counter
sta sect
cmpr10 jsr sync ;find sync
ldx #10
ldy #0
cmpr15 bvc * ;get header byte
clv
lda data2
cmp (bufpnt),y ;compare gcr
bne cmpr20 ;error
iny
dex
bne cmpr15 ;test all bytes
clc ;update headr pointer
lda bufpnt
adc #10
sta bufpnt
jmp tstdat ;now test data
cmpr20 dec trys ;test if too many errors
bne comp
lda #notfnd ;too many error
jmp fmterr
tstdat jsr sync ;find data sync
ldy #256-topwrt
tst05 bvc *
clv
lda data2 ;compare gcr
cmp ovrbuf,y
bne cmpr20 ;error
iny
bne tst05 ;do all ovrbuf
ldx #255-3 ;now do buffer, dont test off bytes
tst10 bvc *
clv
lda data2
cmp buff2,y
bne cmpr20
iny
dex
bne tst10
dec sect ;more sectors to test?
bne cmpr10 ;yes
; all sectors done ok
inc ftnum ;goto next track
lda ftnum
cmp #36 ;#tracks max
bcs fmtend
jmp end ;more to do
fmtend lda #$ff ;clear ftnum
sta ftnum
lda #$0 ;clear gcr buffer flag
sta gcrflg
lda #1 ;return ok code
jmp errr
; .end