-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathlcc.fmt3
105 lines (105 loc) · 1.37 KB
/
lcc.fmt3
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
102
103
104
105
.PAGE 'LCC.FMT3'
;
;
;
;* 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