Browse Source

reindented DOS_8250 to approximate the LST output of the assembler

master
Michael Steil 2 years ago
parent
commit
b2402c45ac
64 changed files with 7431 additions and 7431 deletions
  1. 102
    102
      DOS_8250/addfil
  2. 183
    183
      DOS_8250/addrel
  3. 58
    58
      DOS_8250/allromcheck
  4. 33
    33
      DOS_8250/autoit
  5. 170
    170
      DOS_8250/begin
  6. 311
    311
      DOS_8250/block
  7. 43
    43
      DOS_8250/chksum
  8. 193
    193
      DOS_8250/close
  9. 85
    85
      DOS_8250/copyall
  10. 56
    56
      DOS_8250/copysetup
  11. 158
    158
      DOS_8250/dskint
  12. 122
    122
      DOS_8250/duplct
  13. 2
    2
      DOS_8250/echksm
  14. 48
    48
      DOS_8250/equate
  15. 3
    3
      DOS_8250/erom
  16. 288
    288
      DOS_8250/erproc
  17. 3
    3
      DOS_8250/fmt40
  18. 108
    108
      DOS_8250/fndrel
  19. 185
    185
      DOS_8250/frets
  20. 21
    21
      DOS_8250/getact
  21. 38
    38
      DOS_8250/i_odef
  22. 66
    66
      DOS_8250/idle
  23. 190
    190
      DOS_8250/ieee
  24. 194
    194
      DOS_8250/init
  25. 235
    235
      DOS_8250/jobs
  26. 339
    339
      DOS_8250/lookup
  27. 104
    104
      DOS_8250/lstdir
  28. 127
    127
      DOS_8250/map
  29. 59
    59
      DOS_8250/master
  30. 46
    46
      DOS_8250/memrw
  31. 57
    57
      DOS_8250/mver
  32. 107
    107
      DOS_8250/new
  33. 133
    133
      DOS_8250/newss
  34. 35
    35
      DOS_8250/nulbuf
  35. 193
    193
      DOS_8250/opchnl
  36. 364
    364
      DOS_8250/open
  37. 200
    200
      DOS_8250/parsex
  38. 172
    172
      DOS_8250/ramvar.sd
  39. 104
    104
      DOS_8250/record
  40. 82
    82
      DOS_8250/rel1
  41. 77
    77
      DOS_8250/rel2
  42. 36
    36
      DOS_8250/rel3
  43. 45
    45
      DOS_8250/rel4
  44. 181
    181
      DOS_8250/rename
  45. 7
    7
      DOS_8250/rom
  46. 106
    106
      DOS_8250/romtbl
  47. 67
    67
      DOS_8250/scrtch
  48. 98
    98
      DOS_8250/setdrv
  49. 35
    35
      DOS_8250/ssend
  50. 30
    30
      DOS_8250/sstest
  51. 130
    130
      DOS_8250/ssutil
  52. 97
    97
      DOS_8250/system.sd
  53. 97
    97
      DOS_8250/temp
  54. 228
    228
      DOS_8250/trnsfr
  55. 285
    285
      DOS_8250/tst2
  56. 166
    166
      DOS_8250/tst3
  57. 170
    170
      DOS_8250/tst4
  58. 49
    49
      DOS_8250/tstflg
  59. 159
    159
      DOS_8250/tstfnd
  60. 88
    88
      DOS_8250/tsutil
  61. 106
    106
      DOS_8250/utlodr
  62. 15
    15
      DOS_8250/vector
  63. 141
    141
      DOS_8250/verdir
  64. 1
    1
      README.md

+ 102
- 102
DOS_8250/addfil View File

@@ -1,105 +1,105 @@
1
- .PAGE 'ADDFIL'
1
+.PAGE 'ADDFIL'
2 2
 ; ADD FILE TO DIRECTORY
3
- .SKIP
4
-ADDFIL LDA SA ;SAVE VARIABLES 
5
- PHA
6
- LDA LINDX
7
- PHA
8
- LDA SECTOR
9
- PHA
10
- LDA TRACK
11
- PHA
12
- LDA #IRSA
13
- STA SA
14
- JSR CURBLK ;USE LAST ACCESSED SEARCH
15
- LDA TYPE
16
- PHA
17
- LDA FILDRV
18
- AND #1
19
- STA DRVNUM
20
- LDX JOBNUM
21
- EOR LSTJOB,X
22
- LSR A
23
- BCC AF08 ;SAME DRIVE AS REQUIRED
24
- .SKIP
25
- LDX #1
26
- STX DELIND ;LOOK FOR DELETED ENTRY
27
- JSR SRCHST
28
- BEQ AF15 ;ALL FULL, NEW SECTOR 
29
- BNE AF20 ;FOUND ONE
30
- .SKIP
31
-AF08 LDA DELSEC
32
- BEQ AF10 ;DELETED ENTRY NOT LOCATED
33
- CMP SECTOR
34
- BEQ AF20 ;SECTOR IS RESIDENT
35
- STA SECTOR
36
- JSR DRTRD ;READ SECTOR IN
37
- JMP AF20
38
- .SKIP
39
-AF10 LDA #1 ;FIND DELETED ENTRY
40
- STA DELIND
41
- JSR SEARCH
42
- BNE AF20
43
-AF15 JSR NXDRBK ;ALL FULL, NEW SECTOR
44
- LDA SECTOR
45
- STA DELSEC
46
- LDA #2
47
- STA DELIND
48
-AF20 LDA DELIND
49
- JSR SETPNT
50
- PLA
51
- STA TYPE ;SET TYPE
52
- CMP #RELTYP
53
- BNE AF25
54
- ORA #$80
3
+.SKIP
4
+ADDFIL	LDA SA          ;SAVE VARIABLES 
5
+	PHA
6
+	LDA LINDX
7
+	PHA
8
+	LDA SECTOR
9
+	PHA
10
+	LDA TRACK
11
+	PHA
12
+	LDA #IRSA
13
+	STA SA
14
+	JSR CURBLK      ;USE LAST ACCESSED SEARCH
15
+	LDA TYPE
16
+	PHA
17
+	LDA FILDRV
18
+	AND #1
19
+	STA DRVNUM
20
+	LDX JOBNUM
21
+	EOR LSTJOB,X
22
+	LSR A
23
+	BCC AF08        ;SAME DRIVE AS REQUIRED
24
+.SKIP
25
+	LDX #1
26
+	STX DELIND      ;LOOK FOR DELETED ENTRY
27
+	JSR SRCHST
28
+	BEQ AF15        ;ALL FULL, NEW SECTOR 
29
+	BNE AF20        ;FOUND ONE
30
+.SKIP
31
+AF08	LDA DELSEC
32
+	BEQ AF10        ;DELETED ENTRY NOT LOCATED
33
+	CMP SECTOR
34
+	BEQ AF20        ;SECTOR IS RESIDENT
35
+	STA SECTOR
36
+	JSR DRTRD       ;READ SECTOR IN
37
+	JMP AF20
38
+.SKIP
39
+AF10	LDA #1          ;FIND DELETED ENTRY
40
+	STA DELIND
41
+	JSR SEARCH
42
+	BNE AF20
43
+AF15	JSR NXDRBK      ;ALL FULL, NEW SECTOR
44
+	LDA SECTOR
45
+	STA DELSEC
46
+	LDA #2
47
+	STA DELIND
48
+AF20	LDA DELIND
49
+	JSR SETPNT
50
+	PLA
51
+	STA TYPE        ;SET TYPE
52
+	CMP #RELTYP
53
+	BNE AF25
54
+	ORA #$80
55 55
 AF25
56
- JSR PUTBYT
57
- PLA
58
- STA FILTRK ;...TABLE & ENTRY
59
- JSR PUTBYT
60
- PLA
61
- STA FILSEC ;SET SECTOR LINK IN...
62
- JSR PUTBYT ;...TABLE & ENTRY
63
- JSR GETACT
64
- TAY
65
- LDA FILTBL
66
- TAX
67
- LDA #16
68
- JSR TRNAME ;TRANSFER NAME
69
- LDY #16
70
- LDA #0 ;CLEAR # OF BLOCKS &...
71
-AF30 STA (DIRBUF),Y ;...& REPLACE LINKS
72
- INY
73
- CPY #27
74
- BCC AF30
75
- LDA TYPE ;A RELATIVE FILE ?
76
- CMP #RELTYP
77
- BNE AF50 ;NO
78
- LDY #16 ;YES
79
- LDA TRKSS ;GET SS TRACK
80
- STA (DIRBUF),Y ;PUT IN DIRECTORY
81
- INY
82
- LDA SECSS ;GET SS SECTOR
83
- STA (DIRBUF),Y ;PUT IN
84
- INY
85
- LDA REC ;GET RECORD SIZE
86
- STA (DIRBUF),Y
87
-AF50 JSR DRTWRT ;WRITE IT OUT
88
- PLA
89
- STA LINDX
90
- TAX
91
- PLA
92
- STA SA
93
- LDA DELSEC
94
- STA ENTSEC
95
- STA DSEC,X
96
- LDA DELIND
97
- STA ENTIND
98
- STA DIND,X
99
- LDA TYPE
100
- STA PATTYP
101
- LDA DRVNUM
102
- STA FILDRV
103
- RTS
56
+	JSR PUTBYT
57
+	PLA
58
+	STA FILTRK      ;...TABLE & ENTRY
59
+	JSR PUTBYT
60
+	PLA
61
+	STA FILSEC      ;SET SECTOR LINK IN...
62
+	JSR PUTBYT      ;...TABLE & ENTRY
63
+	JSR GETACT
64
+	TAY
65
+	LDA FILTBL
66
+	TAX
67
+	LDA #16
68
+	JSR TRNAME      ;TRANSFER NAME
69
+	LDY #16
70
+	LDA #0          ;CLEAR # OF BLOCKS &...
71
+AF30	STA (DIRBUF),Y  ;...& REPLACE LINKS
72
+	INY
73
+	CPY #27
74
+	BCC AF30
75
+	LDA TYPE        ;A RELATIVE FILE ?
76
+	CMP #RELTYP
77
+	BNE AF50        ;NO
78
+	LDY #16         ;YES
79
+	LDA TRKSS       ;GET SS TRACK
80
+	STA (DIRBUF),Y  ;PUT IN DIRECTORY
81
+	INY
82
+	LDA SECSS       ;GET SS SECTOR
83
+	STA (DIRBUF),Y  ;PUT IN
84
+	INY
85
+	LDA REC         ;GET RECORD SIZE
86
+	STA (DIRBUF),Y
87
+AF50	JSR DRTWRT      ;WRITE IT OUT
88
+	PLA
89
+	STA LINDX
90
+	TAX
91
+	PLA
92
+	STA SA
93
+	LDA DELSEC
94
+	STA ENTSEC
95
+	STA DSEC,X
96
+	LDA DELIND
97
+	STA ENTIND
98
+	STA DIND,X
99
+	LDA TYPE
100
+	STA PATTYP
101
+	LDA DRVNUM
102
+	STA FILDRV
103
+	RTS
104 104
 ;
105
- .END
105
+.END

+ 183
- 183
DOS_8250/addrel View File

@@ -1,208 +1,208 @@
1
- .PAGE 'ADDREL'
1
+.PAGE 'ADDREL'
2 2
 ADDREL
3
- JSR ADRELS
4
- JSR FNDREL ; CALC SS PTRS
3
+	JSR ADRELS
4
+	JSR FNDREL      ; CALC SS PTRS
5 5
 ADDR1
6
- JSR NUMFRE ; CALC AVAILABLE...
7
- LDY LINDX ; RECORD SPAN?
8
- LDX RS,Y
9
- DEX
10
- TXA
11
- CLC
12
- ADC RELPTR
13
- BCC AR10 ; NO SPAN
14
- INC SSIND ; INC SS PTRS & CHECK
15
- INC SSIND
16
- BNE AR10
17
- INC SSNUM
18
- LDA #SSIOFF
19
- STA SSIND
6
+	JSR NUMFRE      ; CALC AVAILABLE...
7
+	LDY LINDX       ; RECORD SPAN?
8
+	LDX RS,Y
9
+	DEX
10
+	TXA
11
+	CLC
12
+	ADC RELPTR
13
+	BCC AR10        ; NO SPAN
14
+	INC SSIND       ; INC SS PTRS & CHECK
15
+	INC SSIND
16
+	BNE AR10
17
+	INC SSNUM
18
+	LDA #SSIOFF
19
+	STA SSIND
20 20
 AR10
21
- LDA R1
22
- CLC
23
- ADC #2
24
- JSR SETSSP
25
- LDA SSNUM
26
- CMP #NSSL
27
- BCC AR25 ; VALID RANGE
28
- JSR BIGREL ; BIG RELATIVE FILE?
29
- BNE AR20 ; NO
30
- STA SSNUM ; .A = 0
31
- INC GRPNUM
32
- BNE AR25 ; JUMP
21
+	LDA R1
22
+	CLC
23
+	ADC #2
24
+	JSR SETSSP
25
+	LDA SSNUM
26
+	CMP #NSSL
27
+	BCC AR25        ; VALID RANGE
28
+	JSR BIGREL      ; BIG RELATIVE FILE?
29
+	BNE AR20        ; NO
30
+	STA SSNUM       ; .A = 0
31
+	INC GRPNUM
32
+	BNE AR25        ; JUMP
33 33
 AR20
34
- LDA #BIGFIL
35
- JSR CMDERR ; TOO MANY SS'S
34
+	LDA #BIGFIL
35
+	JSR CMDERR      ; TOO MANY SS'S
36 36
 AR25
37
- LDA SSIND ; CALC # BLOCKS NEEDED...
38
- SEC ; ...& CHECK AGAINST AVAIL.
39
- SBC R1
40
- BCS AR30
41
- SBC #SSIOFF-1
42
- CLC
37
+	LDA SSIND       ; CALC # BLOCKS NEEDED...
38
+	SEC             ; ...& CHECK AGAINST AVAIL.
39
+	SBC R1
40
+	BCS AR30
41
+	SBC #SSIOFF-1
42
+	CLC
43 43
 AR30
44
- PHA ; SAVE .A
45
- JSR BIGREL ; BIG RELATIVE FILE?
46
- BEQ ADDBIG ; YES
47
- PLA ; NO, RESTORE .A
48
- STA T3 ; # SS INDICES
49
- LDA SSNUM
50
- SBC R0
51
- STA T4 ; # SS NEEDED
52
- LDX #0 ; CLEAR ACCUM.
53
- STX T1
54
- STX T2
55
- TAX ; .X = #SS
56
- JSR SSCALC ; CALC # OF BLOCKS NEEDED
57
- LDA T2
58
- BNE AR35
59
- LDX T1
60
- DEX
61
- BNE AR35
62
- BEQ AR34 ; JUMP
44
+	PHA             ; SAVE .A
45
+	JSR BIGREL      ; BIG RELATIVE FILE?
46
+	BEQ ADDBIG      ; YES
47
+	PLA             ; NO, RESTORE .A
48
+	STA T3          ; # SS INDICES
49
+	LDA SSNUM
50
+	SBC R0
51
+	STA T4          ; # SS NEEDED
52
+	LDX #0          ; CLEAR ACCUM.
53
+	STX T1
54
+	STX T2
55
+	TAX             ; .X = #SS
56
+	JSR SSCALC      ; CALC # OF BLOCKS NEEDED
57
+	LDA T2
58
+	BNE AR35
59
+	LDX T1
60
+	DEX
61
+	BNE AR35
62
+	BEQ AR34        ; JUMP
63 63
 ;
64 64
 ; ADD FOR BIG REL (8250)
65 65
 ;
66 66
 ADDBIG
67
- PLA ; GET .A
68
- STA T3
69
- LDA SSNUM
70
- SBC R0
71
- BCS ADDBI1
72
- INC R3
73
- ADC #6
67
+	PLA             ; GET .A
68
+	STA T3
69
+	LDA SSNUM
70
+	SBC R0
71
+	BCS ADDBI1
72
+	INC R3
73
+	ADC #6
74 74
 ADDBI1
75
- STA T4
76
- LDA GRPNUM
77
- SEC
78
- SBC R3
79
- STA R3
80
- JSR SSSCAL
81
- LDA RESULT+1
82
- BNE AR35
83
- LDX RESULT
84
- BNE ADDBI2
85
- RTS
75
+	STA T4
76
+	LDA GRPNUM
77
+	SEC
78
+	SBC R3
79
+	STA R3
80
+	JSR SSSCAL
81
+	LDA RESULT+1
82
+	BNE AR35
83
+	LDX RESULT
84
+	BNE ADDBI2
85
+	RTS
86 86
 ADDBI2
87
- DEX
88
- BNE AR35
87
+	DEX
88
+	BNE AR35
89 89
 AR34
90
- INC R2
90
+	INC R2
91 91
 AR35
92
- CMP NBTEMP+1
93
- BCC AR40 ; OK!!
94
- BNE AR20
95
- LDA NBTEMP
96
- CMP T1
97
- BCC AR20 ; NOT ENOUGH BLOCKS
92
+	CMP NBTEMP+1
93
+	BCC AR40        ; OK!!
94
+	BNE AR20
95
+	LDA NBTEMP
96
+	CMP T1
97
+	BCC AR20        ; NOT ENOUGH BLOCKS
98 98
 AR40
99
- LDA #1
100
- JSR DRDBYT ; LOOK AT SECTOR LINK
101
- CLC
102
- ADC #1 ; +1 IS NR
103
- LDX LINDX
104
- STA NR,X
105
- JSR NXTTS ; GET NEXT BLOCK...
106
- JSR SETLNK ; ...& SET LINK.
107
- LDA R2
108
- BNE AR50 ; ADD ONE BLOCK
109
- JSR WRTOUT ; WRITE CURRENT LAST REC
99
+	LDA #1
100
+	JSR DRDBYT      ; LOOK AT SECTOR LINK
101
+	CLC
102
+	ADC #1          ; +1 IS NR
103
+	LDX LINDX
104
+	STA NR,X
105
+	JSR NXTTS       ; GET NEXT BLOCK...
106
+	JSR SETLNK      ; ...& SET LINK.
107
+	LDA R2
108
+	BNE AR50        ; ADD ONE BLOCK
109
+	JSR WRTOUT      ; WRITE CURRENT LAST REC
110 110
 AR45
111
- JSR DBLBUF ; SWITCH BUFS
112
- JSR SETHDR ; SET HDR FROM T & S
113
- JSR NXTTS ; GET ANOTHER
114
- JSR SETLNK ; SET UP LINK
115
- JSR NULBUF ; CLEAN IT OUT
116
- JMP AR55
111
+	JSR DBLBUF      ; SWITCH BUFS
112
+	JSR SETHDR      ; SET HDR FROM T & S
113
+	JSR NXTTS       ; GET ANOTHER
114
+	JSR SETLNK      ; SET UP LINK
115
+	JSR NULBUF      ; CLEAN IT OUT
116
+	JMP AR55
117 117
 AR50
118
- JSR DBLBUF ; SWITCH BUFS
119
- JSR SETHDR ; SET HDR FROM T & S
120
- JSR NULBUF ; CLEAN BUFFER
121
- JSR NULLNK ; LAST BLOCK = 0, LSTCHR
118
+	JSR DBLBUF      ; SWITCH BUFS
119
+	JSR SETHDR      ; SET HDR FROM T & S
120
+	JSR NULBUF      ; CLEAN BUFFER
121
+	JSR NULLNK      ; LAST BLOCK = 0, LSTCHR
122 122
 AR55
123
- JSR WRTOUT ; WRITE BUFFER
124
- JSR GETLNK ; GET T&S FROM LINK
125
- LDA TRACK
126
- PHA ; SAVE 'EM
127
- LDA SECTOR
128
- PHA
129
- JSR GETHDR ; NOW GET HDR T&S
130
- LDA SECTOR
131
- PHA ; SAVE 'EM
132
- LDA TRACK
133
- PHA
134
- JSR GSSPNT ; CHECK SS PTR
135
- TAX
136
- BNE AR60
137
- JSR NEWSS ; NEED ANOTHER SS
138
- LDA #SSIOFF
139
- JSR SETSSP ; .A = BT VAL
140
- INC R0 ; ADVANCE SS COUNT
123
+	JSR WRTOUT      ; WRITE BUFFER
124
+	JSR GETLNK      ; GET T&S FROM LINK
125
+	LDA TRACK
126
+	PHA             ; SAVE 'EM
127
+	LDA SECTOR
128
+	PHA
129
+	JSR GETHDR      ; NOW GET HDR T&S
130
+	LDA SECTOR
131
+	PHA             ; SAVE 'EM
132
+	LDA TRACK
133
+	PHA
134
+	JSR GSSPNT      ; CHECK SS PTR
135
+	TAX
136
+	BNE AR60
137
+	JSR NEWSS       ; NEED ANOTHER SS
138
+	LDA #SSIOFF
139
+	JSR SETSSP      ; .A = BT VAL
140
+	INC R0          ; ADVANCE SS COUNT
141 141
 AR60
142
- PLA
143
- JSR PUTSS ; RECORD T&S...
144
- PLA
145
- JSR PUTSS ; ...IN SS.
146
- PLA ; GET T&S FROM LINK
147
- STA SECTOR
148
- PLA
149
- STA TRACK
150
- BEQ AR65 ; T = 0, THAT'S ALL!!
151
- JSR BIGREL ; BIG RELATIVE FILE?
152
- BNE AR61 ; NO
153
- LDA R5
154
- CMP GRPNUM
155
- BCC AR45
142
+	PLA
143
+	JSR PUTSS       ; RECORD T&S...
144
+	PLA
145
+	JSR PUTSS       ; ...IN SS.
146
+	PLA             ; GET T&S FROM LINK
147
+	STA SECTOR
148
+	PLA
149
+	STA TRACK
150
+	BEQ AR65        ; T = 0, THAT'S ALL!!
151
+	JSR BIGREL      ; BIG RELATIVE FILE?
152
+	BNE AR61        ; NO
153
+	LDA R5
154
+	CMP GRPNUM
155
+	BCC AR45
156 156
 AR61
157
- LDA R0
158
- CMP SSNUM
159
- BNE AR45 ; NOT DONE YET
160
- JSR GSSPNT
161
- CMP SSIND
162
- BCC AR45 ; ALMOST DONE
163
- BEQ AR50 ; ONE MORE BLOCK LEFT
157
+	LDA R0
158
+	CMP SSNUM
159
+	BNE AR45        ; NOT DONE YET
160
+	JSR GSSPNT
161
+	CMP SSIND
162
+	BCC AR45        ; ALMOST DONE
163
+	BEQ AR50        ; ONE MORE BLOCK LEFT
164 164
 AR65
165
- JSR GSSPNT
166
- PHA
167
- LDA #0
168
- JSR SSDIR
169
- LDA #0
170
- TAY
171
- STA (DIRBUF),Y
172
- INY
173
- PLA
174
- SEC
175
- SBC #1
176
- STA (DIRBUF),Y
177
- JSR WRTSS ; WRITE SS
178
- JSR WATJOB
179
- JSR MAPOUT
180
- JSR FNDREL
181
- JSR DBLBUF ; GET BACK TO LEADING BUFFER
182
- JSR SSPOS
183
- BVS AR70
184
- JMP POSITN
165
+	JSR GSSPNT
166
+	PHA
167
+	LDA #0
168
+	JSR SSDIR
169
+	LDA #0
170
+	TAY
171
+	STA (DIRBUF),Y
172
+	INY
173
+	PLA
174
+	SEC
175
+	SBC #1
176
+	STA (DIRBUF),Y
177
+	JSR WRTSS       ; WRITE SS
178
+	JSR WATJOB
179
+	JSR MAPOUT
180
+	JSR FNDREL
181
+	JSR DBLBUF      ; GET BACK TO LEADING BUFFER
182
+	JSR SSPOS
183
+	BVS AR70
184
+	JMP POSITN
185 185
 AR70
186
- LDA #LRF
187
- JSR SETFLG
188
- LDA #NOREC
189
- JSR CMDERR
186
+	LDA #LRF
187
+	JSR SETFLG
188
+	LDA #NOREC
189
+	JSR CMDERR
190 190
 ADRELS
191
- JSR SETDRN
192
- JSR SSEND ; SET UP END OF FILE
193
- JSR POSBUF
194
- JSR BIGREL ; BIG RELATIVE FILE?
195
- BNE ADREL1 ; NO
196
- LDA GRPNUM
197
- STA R5
198
- STA R3
191
+	JSR SETDRN
192
+	JSR SSEND       ; SET UP END OF FILE
193
+	JSR POSBUF
194
+	JSR BIGREL      ; BIG RELATIVE FILE?
195
+	BNE ADREL1      ; NO
196
+	LDA GRPNUM
197
+	STA R5
198
+	STA R3
199 199
 ADREL1
200
- LDA SSIND
201
- STA R1 ; SAVE SS INDEX
202
- LDA SSNUM
203
- STA R0 ; SAVE SS NUMBER
204
- LDA #0
205
- STA R2 ; CLEAR FLAG FOR ONE BLOCK
206
- STA RECPTR ; TO 1ST BYTE IN RECORD
207
- RTS
200
+	LDA SSIND
201
+	STA R1          ; SAVE SS INDEX
202
+	LDA SSNUM
203
+	STA R0          ; SAVE SS NUMBER
204
+	LDA #0
205
+	STA R2          ; CLEAR FLAG FOR ONE BLOCK
206
+	STA RECPTR      ; TO 1ST BYTE IN RECORD
207
+	RTS
208 208
 .END

+ 58
- 58
DOS_8250/allromcheck View File

@@ -1,65 +1,65 @@
1 1
 IP=0 ;ZPAGE POINTER
2
-*=$F800
3
-START SEI
4
- LDY #0
5
- LDA #$20
2
+	*=$F800
3
+START	SEI
4
+	LDY #0
5
+	LDA #$20
6 6
 LOOP
7
- STA $8000,Y ;CLEAR SCREEN
8
- STA $8100,Y
9
- STA $8200,Y
10
- STA $8300,Y
11
- INY
12
- BNE LOOP
7
+	STA $8000,Y     ;CLEAR SCREEN
8
+	STA $8100,Y
9
+	STA $8200,Y
10
+	STA $8300,Y
11
+	INY
12
+	BNE LOOP
13 13
 CALC
14
- LDA #$B0 ;SET FOR $A SLOT
15
- STA IP+1
16
- LDA #0
17
- STA IP ;ZERO LO INDIRECT
18
- TAY
19
- LDX #16 ;16 PAGES IN 4K ROM
20
- CLC
21
-RT10 DEC IP+1 ;DO IT BACKWARDS
22
-RT20 ADC (IP),Y ;TOTAL CHECKSUM IN A
23
- INY
24
- BNE RT20
25
- DEX
26
- BNE RT10
27
- ADC #0 ;ADD IN LAST CARRY
28
- PHA
29
- AND #$F
30
- TAX
31
- LDA HEX,X
32
- STA $8029 ;POKE LOW NYBBLE
33
- PLA
34
- LSR A
35
- LSR A
36
- LSR A
37
- LSR A
38
- TAX
39
- LDA HEX,X
40
- STA $8028 ;POKE HIGH NYBBLE
41
- JSR WAIT
42
- LDA $8028
43
- EOR #$40
44
- STA $8028
45
- LDA $8029
46
- EOR #$40
47
- STA $8029
48
- JSR WAIT
49
- JMP CALC
14
+	LDA #$B0        ;SET FOR $A SLOT
15
+	STA IP+1
16
+	LDA #0
17
+	STA IP          ;ZERO LO INDIRECT
18
+	TAY
19
+	LDX #16         ;16 PAGES IN 4K ROM
20
+	CLC
21
+RT10	DEC IP+1        ;DO IT BACKWARDS
22
+RT20	ADC (IP),Y      ;TOTAL CHECKSUM IN A
23
+	INY
24
+	BNE RT20
25
+	DEX
26
+	BNE RT10
27
+	ADC #0          ;ADD IN LAST CARRY
28
+	PHA
29
+	AND #$F
30
+	TAX
31
+	LDA HEX,X
32
+	STA $8029       ;POKE LOW NYBBLE
33
+	PLA
34
+	LSR A
35
+	LSR A
36
+	LSR A
37
+	LSR A
38
+	TAX
39
+	LDA HEX,X
40
+	STA $8028       ;POKE HIGH NYBBLE
41
+	JSR WAIT
42
+	LDA $8028
43
+	EOR #$40
44
+	STA $8028
45
+	LDA $8029
46
+	EOR #$40
47
+	STA $8029
48
+	JSR WAIT
49
+	JMP CALC
50 50
 ;
51 51
 WAIT
52
- LDY #0
52
+	LDY #0
53 53
 W2
54
- LDX #0
54
+	LDX #0
55 55
 W3
56
- DEX
57
- BNE W3
58
- DEY
59
- BNE W2
60
- RTS
61
-HEX .BYTE '0123456789'
62
- .BYTE 1,2,3,4,5,6 ;SCREEN ALPHA
63
- *=$FFFC
64
- .WORD START
65
- .END
56
+	DEX
57
+	BNE W3
58
+	DEY
59
+	BNE W2
60
+	RTS
61
+HEX	.BYTE '0123456789'
62
+	.BYTE 1,2,3,4,5,6 ;SCREEN ALPHA
63
+	*=$FFFC
64
+	.WORD START
65
+.END

+ 33
- 33
DOS_8250/autoit View File

@@ -1,4 +1,4 @@
1
- .PAGE 'AUTOIT'
1
+.PAGE 'AUTOIT'
2 2
 ;RSR TEST SUBROUTINES
3 3
 ;
4 4
 ; THIS AUTO INIT SUBROUTINE WILL
@@ -11,38 +11,38 @@
11 11
 ; THIS ROUTINE WILL END IN ERROR
12 12
 ; IF ANY ERROR BUT DISK ID OCCURS
13 13
 ;
14
-AUTOIT LDX #$FF ;FLAG FOR ERROR RTN
15
- STX JOBRTN
16
- JSR INITSU ;.A=DRVNUM< >=ERROR
17
- CMP #03 ;CHK MISSING DISK
18
- BEQ CATID3
19
-CATID5 CMP #2 ;CHK FOR OKAY
20
- BCC CATID4
21
-CATID2 JMP ERROR ;MUST BE AN ERROR
22
-CATID3 LDY DRVCNT ;CHK FOR SINGLE
23
- BEQ CATID2
24
- LDA #0 ;ONLY ONE GOOD DRIVE?
25
- STA DRVCNT
26
- LDA DRVNUM ;FLIP TO CHK OTHER DRV
27
- EOR #1
28
- STA DRVNUM
29
- JMP AUTOIT
14
+AUTOIT	LDX #$FF        ;FLAG FOR ERROR RTN
15
+	STX JOBRTN
16
+	JSR INITSU      ;.A=DRVNUM< >=ERROR
17
+	CMP #03         ;CHK MISSING DISK
18
+	BEQ CATID3
19
+CATID5	CMP #2          ;CHK FOR OKAY
20
+	BCC CATID4
21
+CATID2	JMP ERROR       ;MUST BE AN ERROR
22
+CATID3	LDY DRVCNT      ;CHK FOR SINGLE
23
+	BEQ CATID2
24
+	LDA #0          ;ONLY ONE GOOD DRIVE?
25
+	STA DRVCNT
26
+	LDA DRVNUM      ;FLIP TO CHK OTHER DRV
27
+	EOR #1
28
+	STA DRVNUM
29
+	JMP AUTOIT
30 30
 ;
31
-CATID4 TXA ;X PRESERVED
32
- ASL A ;MULT *8
33
- ASL A
34
- ASL A
35
- TAY
36
- LDA DRVNUM
37
- ASL A
38
- TAX
39
- LDA HDRS,Y ;CHK DISK ID
40
- CMP DSKID,X ;AGAINST OLD ID
41
- BNE CATID1
42
- LDA HDRS+1,Y
43
- CMP DSKID+1,X
44
- BNE CATID1
45
- RTS ;SAME ID
46
-CATID1 JMP INITDR ;DIFF SO INIT
31
+CATID4	TXA             ;X PRESERVED
32
+	ASL A           ;MULT *8
33
+	ASL A
34
+	ASL A
35
+	TAY
36
+	LDA DRVNUM
37
+	ASL A
38
+	TAX
39
+	LDA HDRS,Y      ;CHK DISK ID
40
+	CMP DSKID,X     ;AGAINST OLD ID
41
+	BNE CATID1
42
+	LDA HDRS+1,Y
43
+	CMP DSKID+1,X
44
+	BNE CATID1
45
+	RTS             ;SAME ID
46
+CATID1	JMP INITDR      ;DIFF SO INIT
47 47
 ;
48 48
 .END

+ 170
- 170
DOS_8250/begin View File

@@ -1,227 +1,227 @@
1 1
 .PAGE 'BEGIN DOS'
2 2
 BEGIN
3
- LDX #$FF
4
- TXS ; INITIALIZE STACK
5
- LDA PBD2
6
- AND #255-ERRLED-LED0-LED1
7
- STA PBD2 ; TURN LEDS OFF
8
- LDA PBD2 ; COMPUTE PRIMARY ADDR
9
- AND #7
10
- ORA #$48 ; TALK ADDRESS
11
- STA TLKADR
12
- EOR #$60 ; LISTEN ADDRESS
13
- STA LSNADR
3
+	LDX #$FF
4
+	TXS             ; INITIALIZE STACK
5
+	LDA PBD2
6
+	AND #255-ERRLED-LED0-LED1
7
+	STA PBD2        ; TURN LEDS OFF
8
+	LDA PBD2        ; COMPUTE PRIMARY ADDR
9
+	AND #7
10
+	ORA #$48        ; TALK ADDRESS
11
+	STA TLKADR
12
+	EOR #$60        ; LISTEN ADDRESS
13
+	STA LSNADR
14 14
 ;
15 15
 ; INITIALIZE BUFFER POINTER TABLE
16 16
 ;
17 17
 INTTAB
18
- LDX #0
19
- LDY #0
18
+	LDX #0
19
+	LDY #0
20 20
 INTT1
21
- LDA #0
22
- STA BUFTAB,X
23
- INX
24
- LDA BUFIND,Y
25
- STA BUFTAB,X
26
- INX
27
- INY
28
- CPY #BFCNT+2
29
- BNE INTT1
30
- LDA #<CMDBUF ; SET POINTER TO COMMAND BUFFER
31
- STA BUFTAB,X
32
- INX
33
- LDA #>CMDBUF
34
- STA BUFTAB,X
35
- INX
36
- LDA #<ERRBUF ; SET POINTER TO ERROR BUFFER
37
- STA BUFTAB,X
38
- INX
39
- LDA #>ERRBUF
40
- STA BUFTAB,X
41
- LDA #$FF
42
- LDX #MAXSA
43
-DSKIN1 STA LINTAB,X
44
- DEX
45
- BPL DSKIN1
46
- LDX #MXCHNS-1
21
+	LDA #0
22
+	STA BUFTAB,X
23
+	INX
24
+	LDA BUFIND,Y
25
+	STA BUFTAB,X
26
+	INX
27
+	INY
28
+	CPY #BFCNT+2
29
+	BNE INTT1
30
+	LDA #<CMDBUF    ; SET POINTER TO COMMAND BUFFER
31
+	STA BUFTAB,X
32
+	INX
33
+	LDA #>CMDBUF
34
+	STA BUFTAB,X
35
+	INX
36
+	LDA #<ERRBUF    ; SET POINTER TO ERROR BUFFER
37
+	STA BUFTAB,X
38
+	INX
39
+	LDA #>ERRBUF
40
+	STA BUFTAB,X
41
+	LDA #$FF
42
+	LDX #MAXSA
43
+DSKIN1	STA LINTAB,X
44
+	DEX
45
+	BPL DSKIN1
46
+	LDX #MXCHNS-1
47 47
 DSKIN2
48
- STA BUF0,X ; SET BUFFERS AS UNUSED
49
- STA BUF1,X
50
- STA SS,X
51
- DEX
52
- BPL DSKIN2
53
- LDA #BFCNT+2 ; SET BUFFER POINTERS
54
- STA BUF0+CMDCHN
55
- LDA #BFCNT+3
56
- STA BUF0+ERRCHN
57
- LDA #ERRCHN
58
- STA LINTAB+ERRSA
59
- LDA #CMDCHN+$80
60
- STA LINTAB+CMDSA
61
- LDA #LXINT ; LINDX 0 TO 5 FREE
62
- STA LINUSE
63
- LDA #RDYLST
64
- STA CHNRDY+CMDCHN
65
- LDA #RDYTLK
66
- STA CHNRDY+ERRCHN
67
- LDA #0
68
- STA BUFUSE
69
- LDA #$F0
70
- STA BUFUSE+1
71
- JSR USRINT ; INITIALIZE USER JUMP TABLE
48
+	STA BUF0,X      ; SET BUFFERS AS UNUSED
49
+	STA BUF1,X
50
+	STA SS,X
51
+	DEX
52
+	BPL DSKIN2
53
+	LDA #BFCNT+2    ; SET BUFFER POINTERS
54
+	STA BUF0+CMDCHN
55
+	LDA #BFCNT+3
56
+	STA BUF0+ERRCHN
57
+	LDA #ERRCHN
58
+	STA LINTAB+ERRSA
59
+	LDA #CMDCHN+$80
60
+	STA LINTAB+CMDSA
61
+	LDA #LXINT      ; LINDX 0 TO 5 FREE
62
+	STA LINUSE
63
+	LDA #RDYLST
64
+	STA CHNRDY+CMDCHN
65
+	LDA #RDYTLK
66
+	STA CHNRDY+ERRCHN
67
+	LDA #0
68
+	STA BUFUSE
69
+	LDA #$F0
70
+	STA BUFUSE+1
71
+	JSR USRINT      ; INITIALIZE USER JUMP TABLE
72 72
 ;
73 73
 ; SET INDIRECT VECTORS
74 74
 ;
75
- LDA #<DIAGOK
76
- STA VNMI
77
- LDA #>DIAGOK
78
- STA VNMI+1
79
- LDA #5 ; SET UP SECTOR ALLOCATE
80
- STA SECINC
81
- LDA #5
82
- STA REVCNT ; SET UP RECOVERY COUNT
75
+	LDA #<DIAGOK
76
+	STA VNMI
77
+	LDA #>DIAGOK
78
+	STA VNMI+1
79
+	LDA #5          ; SET UP SECTOR ALLOCATE
80
+	STA SECINC
81
+	LDA #5
82
+	STA REVCNT      ; SET UP RECOVERY COUNT
83 83
 ;
84 84
 ; CONFIGURE THE TABLES ACCORDING TO DOS
85 85
 ;
86 86
 CONFIG
87
- LDX DOS
88
- LDA BMSIZE,X
89
- STA BAMSIZ ; SET BAM SIZE
90
- LDA MPOFF,X
91
- STA MAPOFF ; SET MAP OFFSET
92
- LDA LOWTRK,X
93
- STA LOTRK ; SET LOW TRACK IN BAM
94
- LDA DISKNM,X
95
- STA DSKNAM ; DISK NAME OFFSET
96
- LDA DOS
97
- BEQ CONFI6 ; 4040 DOS
87
+	LDX DOS
88
+	LDA BMSIZE,X
89
+	STA BAMSIZ      ; SET BAM SIZE
90
+	LDA MPOFF,X
91
+	STA MAPOFF      ; SET MAP OFFSET
92
+	LDA LOWTRK,X
93
+	STA LOTRK       ; SET LOW TRACK IN BAM
94
+	LDA DISKNM,X
95
+	STA DSKNAM      ; DISK NAME OFFSET
96
+	LDA DOS
97
+	BEQ CONFI6      ; 4040 DOS
98 98
 ;
99 99
 ; 8050/8250 DOS
100 100
 ;
101
- LDA #39
102
- STA DIRTRK ; DIRECTORY TRACK
103
- LDA #'C
104
- STA VERNUM ; 8050/8250 VERSION
105
- LDX #4
106
- LDA NSIDES ; # OF SIDES ON DISK
107
- LSR A
108
- BNE CONFI1 ; DOUBLE SIDED 8250
109
- DEX ; SINGLE SIDED 8050
110
- DEX ; .X = 2
111
- BNE CONFI2 ; JUMP AROUND DOUBLE SIDED STUFF
101
+	LDA #39
102
+	STA DIRTRK      ; DIRECTORY TRACK
103
+	LDA #'C
104
+	STA VERNUM      ; 8050/8250 VERSION
105
+	LDX #4
106
+	LDA NSIDES      ; # OF SIDES ON DISK
107
+	LSR A
108
+	BNE CONFI1      ; DOUBLE SIDED 8250
109
+	DEX             ; SINGLE SIDED 8050
110
+	DEX             ; .X = 2
111
+	BNE CONFI2      ; JUMP AROUND DOUBLE SIDED STUFF
112 112
 .PAGE
113 113
 ;
114 114
 ; 8250, DOUBLE SIDED
115 115
 ;
116 116
 CONFI1
117
- LDA BMT80D,X
118
- STA BAMTRK,X ; BAM TRACK TABLE
119
- LDA BMS80D,X
120
- STA BAMSEC,X ; BAM SECTOR TABLE
121
- DEX
122
- BPL CONFI1
123
- INX ; .X = 0
124
- STX SWITCH ; 8250, BIG RELATIVE FILE
125
- LDA #155
126
- STA MAXTRK ; MAX TRACK+1 ON DISK
127
- LDA #77
128
- STA MTRACK ; # OF TRACKS PER SIDE
129
- BNE CONFI3 ; JUMP AROUND SINGLE SIDED STUFF
117
+	LDA BMT80D,X
118
+	STA BAMTRK,X    ; BAM TRACK TABLE
119
+	LDA BMS80D,X
120
+	STA BAMSEC,X    ; BAM SECTOR TABLE
121
+	DEX
122
+	BPL CONFI1
123
+	INX             ; .X = 0
124
+	STX SWITCH      ; 8250, BIG RELATIVE FILE
125
+	LDA #155
126
+	STA MAXTRK      ; MAX TRACK+1 ON DISK
127
+	LDA #77
128
+	STA MTRACK      ; # OF TRACKS PER SIDE
129
+	BNE CONFI3      ; JUMP AROUND SINGLE SIDED STUFF
130 130
 ;
131 131
 ; 8050, SINGLE SIDED
132 132
 ;
133 133
 CONFI2
134
- LDA BMT80S,X
135
- STA BAMTRK,X ; BAM TRACK TABLE
136
- LDA BMS80S,X
137
- STA BAMSEC,X ; BAM SECTOR TABLE
138
- DEX
139
- BPL CONFI2
140
- STX SWITCH ; 8050, NO BIG RELATIVE FILE
141
- LDA #78
142
- STA MAXTRK ; MAX TRACK+1 ON DISK
143
- LDX #0
144
- STX MTRACK ; 0 FOR SINGLE SIDED
134
+	LDA BMT80S,X
135
+	STA BAMTRK,X    ; BAM TRACK TABLE
136
+	LDA BMS80S,X
137
+	STA BAMSEC,X    ; BAM SECTOR TABLE
138
+	DEX
139
+	BPL CONFI2
140
+	STX SWITCH      ; 8050, NO BIG RELATIVE FILE
141
+	LDA #78
142
+	STA MAXTRK      ; MAX TRACK+1 ON DISK
143
+	LDX #0
144
+	STX MTRACK      ; 0 FOR SINGLE SIDED
145 145
 ;
146 146
 ; 8050/8250 COMMON STUFF
147 147
 ;
148 148
 CONFI3
149
- LDX #6
150
- LDA NSEC80,X
151
- STA TLGAP ; MAX TAIL GAP
152
- DEX
149
+	LDX #6
150
+	LDA NSEC80,X
151
+	STA TLGAP       ; MAX TAIL GAP
152
+	DEX
153 153
 CONFI4
154
- LDA NSEC80,X
155
- STA NUMSEC,X ; # OF SECTORS/ZONE AND GAPS
156
- DEX
157
- BPL CONFI4
158
- LDX #7
154
+	LDA NSEC80,X
155
+	STA NUMSEC,X    ; # OF SECTORS/ZONE AND GAPS
156
+	DEX
157
+	BPL CONFI4
158
+	LDX #7
159 159
 CONFI5
160
- LDA NTRK80,X
161
- STA TRKNUM,X ; TRACK ZONE BOUNDARIES
162
- DEX
163
- BPL CONFI5
164
- BMI CONFI9 ; JUMP AROUND 4040 STUFF
160
+	LDA NTRK80,X
161
+	STA TRKNUM,X    ; TRACK ZONE BOUNDARIES
162
+	DEX
163
+	BPL CONFI5
164
+	BMI CONFI9      ; JUMP AROUND 4040 STUFF
165 165
 ;
166 166
 ; 4040 DOS
167 167
 ;
168 168
 CONFI6
169
- LDA #1
170
- STA NSIDES ; SINGLE SIDED ONLY FOR 4040
171
- LDA #18
172
- STA DIRTRK ; DIRECTORY TRACK
173
- STA BAMTRK ; BAM TRACK FOR 4040
174
- LDA #'A
175
- STA VERNUM ; 4040 VERSION
176
- LDA #36
177
- STA MAXTRK ; MAX TRACK+1 ON DISK
178
- LDA #0
179
- STA MTRACK ; 0 FOR SINGLE SIDED
180
- STA BAMSEC ; BAM SECTOR FOR 4040
181
- LDX #6
182
- LDA NSEC40,X
183
- STA TLGAP ; MAX TAIL GAP
184
- DEX
169
+	LDA #1
170
+	STA NSIDES      ; SINGLE SIDED ONLY FOR 4040
171
+	LDA #18
172
+	STA DIRTRK      ; DIRECTORY TRACK
173
+	STA BAMTRK      ; BAM TRACK FOR 4040
174
+	LDA #'A
175
+	STA VERNUM      ; 4040 VERSION
176
+	LDA #36
177
+	STA MAXTRK      ; MAX TRACK+1 ON DISK
178
+	LDA #0
179
+	STA MTRACK      ; 0 FOR SINGLE SIDED
180
+	STA BAMSEC      ; BAM SECTOR FOR 4040
181
+	LDX #6
182
+	LDA NSEC40,X
183
+	STA TLGAP       ; MAX TAIL GAP
184
+	DEX
185 185
 CONFI7
186
- LDA NSEC40,X
187
- STA NUMSEC,X ; # OF SECTORS/ZONE AND GAPS
188
- DEX
189
- BPL CONFI7
190
- LDX #3
186
+	LDA NSEC40,X
187
+	STA NUMSEC,X    ; # OF SECTORS/ZONE AND GAPS
188
+	DEX
189
+	BPL CONFI7
190
+	LDX #3
191 191
 CONFI8
192
- LDA NTRK40,X
193
- STA TRKNUM,X ; TRACK ZONE BOUNDARIES
194
- DEX
195
- BPL CONFI8
192
+	LDA NTRK40,X
193
+	STA TRKNUM,X    ; TRACK ZONE BOUNDARIES
194
+	DEX
195
+	BPL CONFI8
196 196
 ;
197 197
 ; COMMON DOS VARIABLES
198 198
 ;
199 199
 CONFI9
200
- LDX #7
200
+	LDX #7
201 201
 CONF10
202
- LDA MSCCOM,X
203
- STA NZONES,X ; COMMON DOS VARIABLES
204
- DEX
205
- BPL CONF10
202
+	LDA MSCCOM,X
203
+	STA NZONES,X    ; COMMON DOS VARIABLES
204
+	DEX
205
+	BPL CONF10
206 206
 ;
207 207
 ; SET VECTOR TO IDLE LOOP
208 208
 ;
209
- LDA #<VIDLE
210
- STA VECIDL
211
- LDA #>VIDLE
212
- STA VECIDL+1
209
+	LDA #<VIDLE
210
+	STA VECIDL
211
+	LDA #>VIDLE
212
+	STA VECIDL+1
213 213
 ;
214 214
 ; SET UP POWER UP MESSAGE
215 215
 ;
216 216
 MESAGE
217
- LDA #CBMVER ; DOS VERSION NUMBER
218
- JSR ERRTS0 ; TRANSFER MESSAGE
217
+	LDA #CBMVER     ; DOS VERSION NUMBER
218
+	JSR ERRTS0      ; TRANSFER MESSAGE
219 219
 ;
220 220
 ; ALLOW 'ATN' TO INTERRUPT
221 221
 ;
222
- STA ATNPE
223
- JMP BOOT ; CHECK POWER UP BOOT
222
+	STA ATNPE
223
+	JMP BOOT        ; CHECK POWER UP BOOT
224 224
 ;
225 225
 ; MUST BE CONTIGUOUS TO IDLE ROUTINE
226 226
 ;
227
- .END
227
+.END

+ 311
- 311
DOS_8250/block View File

@@ -1,419 +1,419 @@
1
- .PAGE 'BLOCK COMMAND'
1
+.PAGE 'BLOCK COMMAND'
2 2
 ;
3 3
 ; USER COMMANDS
4 4
 ;
5 5
 USER
6
- LDY CMDBUF+1
7
- CPY #'0
8
- BNE US10 ; 0 RESETS PNTR
6
+	LDY CMDBUF+1
7
+	CPY #'0
8
+	BNE US10        ; 0 RESETS PNTR
9 9
 USRINT
10
- LDA #<UBLOCK ; SET DEFAULT BLOCK ADD
11
- STA USRJMP
12
- LDA #>UBLOCK
13
- STA USRJMP+1
14
- RTS
10
+	LDA #<UBLOCK    ; SET DEFAULT BLOCK ADD
11
+	STA USRJMP
12
+	LDA #>UBLOCK
13
+	STA USRJMP+1
14
+	RTS
15 15
 US10
16
- JSR USREXC ; EXECUTE CODE BY TABLE
17
- JMP ENDCMD
16
+	JSR USREXC      ; EXECUTE CODE BY TABLE
17
+	JMP ENDCMD
18 18
 USREXC
19
- DEY ; ENTRY IS (((INDEX-1)AND$F)*2)
20
- TYA
21
- AND #$F
22
- ASL A
23
- TAY
24
- LDA (USRJMP),Y
25
- STA IP
26
- INY
27
- LDA (USRJMP),Y
28
- STA IP+1
29
- JMP (IP)
30
- .PAGE 'BLOCK COMMANDS'
19
+	DEY             ; ENTRY IS (((INDEX-1)AND$F)*2)
20
+	TYA
21
+	AND #$F
22
+	ASL A
23
+	TAY
24
+	LDA (USRJMP),Y
25
+	STA IP
26
+	INY
27
+	LDA (USRJMP),Y
28
+	STA IP+1
29
+	JMP (IP)
30
+.PAGE 'BLOCK COMMANDS'
31 31
 ;
32 32
 ; OPEN DIRECT ACCESS BUFFER
33 33
 ; FROM OPEN "#"
34 34
 ;
35 35
 OPNBLK
36
- LDA LSTDRV
37
- STA DRVNUM
38
- LDA SA
39
- PHA
40
- JSR AUTOI
41
- PLA
42
- STA SA
43
- LDX CMDSIZ
44
- DEX
45
- BNE OB10
46
- LDA #1 ; GET ANY BUFFER
47
- JSR GETRCH
48
- JMP OB30
36
+	LDA LSTDRV
37
+	STA DRVNUM
38
+	LDA SA
39
+	PHA
40
+	JSR AUTOI
41
+	PLA
42
+	STA SA
43
+	LDX CMDSIZ
44
+	DEX
45
+	BNE OB10
46
+	LDA #1          ; GET ANY BUFFER
47
+	JSR GETRCH
48
+	JMP OB30
49 49
 OB05
50
- LDA #NOCHNL
51
- JMP CMDERR
50
+	LDA #NOCHNL
51
+	JMP CMDERR
52 52
 OB10
53
- LDY #1 ; BUFFER # IS REQUESTED
54
- JSR BP05
55
- LDX FILSEC
56
- CPX #BAMJOB ; MUST BE LESS THAN 13
57
- BCS OB05
58
- LDA #0
59
- STA TEMP
60
- STA TEMP+1
61
- SEC
53
+	LDY #1          ; BUFFER # IS REQUESTED
54
+	JSR BP05
55
+	LDX FILSEC
56
+	CPX #BAMJOB     ; MUST BE LESS THAN 13
57
+	BCS OB05
58
+	LDA #0
59
+	STA TEMP
60
+	STA TEMP+1
61
+	SEC
62 62
 OB15
63
- ROL TEMP
64
- ROL TEMP+1
65
- DEX
66
- BPL OB15
67
- LDA TEMP
68
- AND BUFUSE
69
- BNE OB05 ; BUFFER IS USED
70
- LDA TEMP+1
71
- AND BUFUSE+1
72
- BNE OB05 ; BUFFER IS USED
73
- LDA TEMP
74
- ORA BUFUSE ; SET BUFFER AS USED
75
- STA BUFUSE
76
- LDA TEMP+1
77
- ORA BUFUSE+1
78
- STA BUFUSE+1
79
- LDA #0 ; SET UP CHANNEL
80
- JSR GETRCH
81
- LDX LINDX
82
- LDA FILSEC
83
- STA BUF0,X
84
- TAX
85
- LDA DRVNUM
86
- STA LSTJOB,X
63
+	ROL TEMP
64
+	ROL TEMP+1
65
+	DEX
66
+	BPL OB15
67
+	LDA TEMP
68
+	AND BUFUSE
69
+	BNE OB05        ; BUFFER IS USED
70
+	LDA TEMP+1
71
+	AND BUFUSE+1
72
+	BNE OB05        ; BUFFER IS USED
73
+	LDA TEMP
74
+	ORA BUFUSE      ; SET BUFFER AS USED
75
+	STA BUFUSE
76
+	LDA TEMP+1
77
+	ORA BUFUSE+1
78
+	STA BUFUSE+1
79
+	LDA #0          ; SET UP CHANNEL
80
+	JSR GETRCH
81
+	LDX LINDX
82
+	LDA FILSEC
83
+	STA BUF0,X
84
+	TAX
85
+	LDA DRVNUM
86
+	STA LSTJOB,X
87 87
 OB30
88
- LDX SA
89
- LDA LINTAB,X ; SET LINDX TABLE
90
- ORA #$40
91
- STA LINTAB,X
92
- LDY LINDX
93
- LDA #$FF
94
- STA LSTCHR,Y
95
- LDA #RNDRDY
96
- STA CHNRDY,Y ; SET CHANNEL READY
97
- LDA BUF0,Y
98
- STA CHNDAT,Y ; BUFFER # AS 1ST CHAR
99
- ASL A
100
- TAX
101
- LDA #1
102
- STA BUFTAB,X
103
- LDA #DIRTYP+DIRTYP
104
- STA FILTYP,Y ; SET DIRECT FILE TYPE
105
- JMP ENDCMD
88
+	LDX SA
89
+	LDA LINTAB,X    ; SET LINDX TABLE
90
+	ORA #$40
91
+	STA LINTAB,X
92
+	LDY LINDX
93
+	LDA #$FF
94
+	STA LSTCHR,Y
95
+	LDA #RNDRDY
96
+	STA CHNRDY,Y    ; SET CHANNEL READY
97
+	LDA BUF0,Y
98
+	STA CHNDAT,Y    ; BUFFER # AS 1ST CHAR
99
+	ASL A
100
+	TAX
101
+	LDA #1
102
+	STA BUFTAB,X
103
+	LDA #DIRTYP+DIRTYP
104
+	STA FILTYP,Y    ; SET DIRECT FILE TYPE
105
+	JMP ENDCMD
106 106
 ;
107 107
 ; BLOCK COMMANDS
108 108
 ;
109 109
 BLOCK
110
- LDY #0
111
- LDX #0
112
- LDA #'- ; '-' SEPARATES CMD FROM SUBCMD
113
- JSR PARSE ; LOCATE SUB-CMD
114
- BNE BLK40
110
+	LDY #0
111
+	LDX #0
112
+	LDA #'-         ; '-' SEPARATES CMD FROM SUBCMD
113
+	JSR PARSE       ; LOCATE SUB-CMD
114
+	BNE BLK40
115 115
 BLK10
116
- LDA #BADCMD
117
- JMP CMDERR
116
+	LDA #BADCMD
117
+	JMP CMDERR
118 118
 BLK30
119
- LDA #BADSYN
120
- JMP CMDERR
119
+	LDA #BADSYN
120
+	JMP CMDERR
121 121
 BLK40
122
- TXA
123
- BNE BLK30
124
- LDX #NBCMDS-1 ; FIND COMMAND
125
- LDA CMDBUF,Y
122
+	TXA
123
+	BNE BLK30
124
+	LDX #NBCMDS-1   ; FIND COMMAND
125
+	LDA CMDBUF,Y
126 126
 BLK50
127
- CMP BCTAB,X
128
- BEQ BLK60
129
- DEX
130
- BPL BLK50
131
- BMI BLK10
127
+	CMP BCTAB,X
128
+	BEQ BLK60
129
+	DEX
130
+	BPL BLK50
131
+	BMI BLK10
132 132
 BLK60
133
- TXA
134
- ORA #$80
135
- STA CMDNUM
136
- JSR BLKPAR ; PARSE PARMS
137
- LDA CMDNUM
138
- ASL A
139
- TAX
140
- LDA BCJMP+1,X
141
- STA TEMP+1
142
- LDA BCJMP,X
143
- STA TEMP
144
- JMP (TEMP) ; GOTO COMMAND
133
+	TXA
134
+	ORA #$80
135
+	STA CMDNUM
136
+	JSR BLKPAR      ; PARSE PARMS
137
+	LDA CMDNUM
138
+	ASL A
139
+	TAX
140
+	LDA BCJMP+1,X
141
+	STA TEMP+1
142
+	LDA BCJMP,X
143
+	STA TEMP
144
+	JMP (TEMP)      ; GOTO COMMAND
145 145
 BCTAB
146
- .BYTE 'AFRWEP'
147
-NBCMDS = *-BCTAB
146
+	.BYTE 'AFRWEP'
147
+NBCMDS	= *-BCTAB
148 148
 BCJMP
149
- .WORD BLKALC ; BLOCK-ALLOCATE
150
- .WORD BLKFRE ; BLOCK-FREE
151
- .WORD BLKRD ; BLOCK-READ
152
- .WORD BLKWT ; BLOCK-WRITE
153
- .WORD BLKEXC ; BLOCK-EXECUTE
154
- .WORD BLKPTR ; BLOCK-POINTER
149
+	.WORD BLKALC    ; BLOCK-ALLOCATE
150
+	.WORD BLKFRE    ; BLOCK-FREE
151
+	.WORD BLKRD     ; BLOCK-READ
152
+	.WORD BLKWT     ; BLOCK-WRITE
153
+	.WORD BLKEXC    ; BLOCK-EXECUTE
154
+	.WORD BLKPTR    ; BLOCK-POINTER
155 155
 BLKPAR
156
- LDY #0 ; PARSE BLOCK PARMS
157
- LDX #0
158
- LDA #':
159
- JSR PARSE
160
- BNE BP05 ; FOUND ':'
161
- LDY #3 ; ELSE CHAR #3 IS BEGINNING
156
+	LDY #0          ; PARSE BLOCK PARMS
157
+	LDX #0
158
+	LDA #':
159
+	JSR PARSE
160
+	BNE BP05        ; FOUND ':'
161
+	LDY #3          ; ELSE CHAR #3 IS BEGINNING
162 162
 BP05
163
- LDA CMDBUF,Y
164
- CMP #' 
165
- BEQ BP10
166
- CMP #29 ; SKIP CHARACTER
167
- BEQ BP10
168
- CMP #',
169
- BNE BP20
163
+	LDA CMDBUF,Y
164
+	CMP #' 
165
+	BEQ BP10
166
+	CMP #29         ; SKIP CHARACTER
167
+	BEQ BP10
168
+	CMP #',
169
+	BNE BP20
170 170
 BP10
171
- INY
172
- CPY CMDSIZ
173
- BCC BP05
174
- RTS ; THAT'S ALL
171
+	INY
172
+	CPY CMDSIZ
173
+	BCC BP05
174
+	RTS             ; THAT'S ALL
175 175
 BP20
176
- JSR ASCHEX
177
- INC F1CNT
178
- LDY F2PTR
179
- CPX #MXFILS-1
180
- BCC BP10
181
- BCS BLK30 ; BAD SYNTAX
176
+	JSR ASCHEX
177
+	INC F1CNT
178
+	LDY F2PTR
179
+	CPX #MXFILS-1
180
+	BCC BP10
181
+	BCS BLK30       ; BAD SYNTAX
182 182
 ;
183 183
 ; CONVERT ASCII TO HEX (BINARY)
184 184
 ; & STORE CONVERSION IN TABLES
185 185
 ; .Y = PTR INTO CMDBUF
186 186
 ;
187 187
 ASCHEX
188
- LDA #0
189
- STA TEMP
190
- STA TEMP+1
191
- STA TEMP+3
192
- LDX #$FF
188
+	LDA #0
189
+	STA TEMP
190
+	STA TEMP+1
191
+	STA TEMP+3
192
+	LDX #$FF
193 193
 AH10
194
- LDA CMDBUF,Y ; TEST FOR DEC #
195
- CMP #$40
196
- BCS AH20 ; NON-NUMERIC TERMINATES
197
- CMP #$30
198
- BCC AH20 ; NON-NUMERIC
199
- AND #$F
200
- PHA
201
- LDA TEMP+1 ; SHIFT DIGITS (*10)
202
- STA TEMP+2
203
- LDA TEMP
204
- STA TEMP+1
205
- PLA
206
- STA TEMP
207
- INY
208
- CPY CMDSIZ
209
- BCC AH10 ; STILL IN STRING
194
+	LDA CMDBUF,Y    ; TEST FOR DEC #
195
+	CMP #$40
196
+	BCS AH20        ; NON-NUMERIC TERMINATES
197
+	CMP #$30
198
+	BCC AH20        ; NON-NUMERIC
199
+	AND #$F
200
+	PHA
201
+	LDA TEMP+1      ; SHIFT DIGITS (*10)
202
+	STA TEMP+2
203
+	LDA TEMP
204
+	STA TEMP+1
205
+	PLA
206
+	STA TEMP
207
+	INY
208
+	CPY CMDSIZ
209
+	BCC AH10        ; STILL IN STRING
210 210
 AH20
211
- STY F2PTR ; CONVERT DIGITS TO...
212
- CLC ; ...BINARY BY DEC TABLE
213
- LDA #0
211
+	STY F2PTR       ; CONVERT DIGITS TO...
212
+	CLC             ; ...BINARY BY DEC TABLE
213
+	LDA #0
214 214
 AH30
215
- INX
216
- CPX #3
217
- BCS AH40
218
- LDY TEMP,X
215
+	INX
216
+	CPX #3
217
+	BCS AH40
218
+	LDY TEMP,X
219 219
 AH35
220
- DEY
221
- BMI AH30
222
- ADC DECTAB,X
223
- BCC AH35
224
- CLC
225
- INC TEMP+3
226
- BNE AH35
220
+	DEY
221
+	BMI AH30
222
+	ADC DECTAB,X
223
+	BCC AH35
224
+	CLC
225
+	INC TEMP+3
226
+	BNE AH35
227 227
 AH40
228
- PHA
229
- LDX F1CNT
230
- LDA TEMP+3
231
- STA FILTRK,X ; STORE RESULT IN TABLE
232
- PLA
233
- STA FILSEC,X
234
- RTS
228
+	PHA
229
+	LDX F1CNT
230
+	LDA TEMP+3
231
+	STA FILTRK,X    ; STORE RESULT IN TABLE
232
+	PLA
233
+	STA FILSEC,X
234
+	RTS
235 235
 DECTAB
236
- .BYTE 1,10,100 ; DECIMAL TABLE
236
+	.BYTE 1,10,100  ; DECIMAL TABLE
237 237
 ;
238 238
 ; BLOCK-FREE
239 239
 ;
240 240
 BLKFRE
241
- JSR BLKTST
242
- JSR FRETS
243
- JMP ENDCMD
241
+	JSR BLKTST
242
+	JSR FRETS
243
+	JMP ENDCMD
244 244
 ;
245 245
 ; BLOCK-ALLOCATE
246 246
 ;
247 247
 BLKALC
248
- JSR BLKTST
248
+	JSR BLKTST
249 249
 BA10
250
- LDA SECTOR
251
- PHA
252
- JSR GETSEC
253
- BEQ BA15 ; NONE GREATER ON THIS TRACK
254
- PLA
255
- CMP SECTOR
256
- BNE BA30 ; REQUESTED SECTOR NOT AVAIL
257
- JSR USEDTS
258
- JMP ENDCMD
250
+	LDA SECTOR
251
+	PHA
252
+	JSR GETSEC
253
+	BEQ BA15        ; NONE GREATER ON THIS TRACK
254
+	PLA
255
+	CMP SECTOR
256
+	BNE BA30        ; REQUESTED SECTOR NOT AVAIL
257
+	JSR USEDTS
258
+	JMP ENDCMD
259 259
 BA15
260
- PLA ; POP STACK
260
+	PLA             ; POP STACK
261 261
 BA20
262
- LDA #0
263
- STA SECTOR
264
- INC TRACK
265
- LDA TRACK
266
- CMP MAXTRK
267
- BCS BA40 ; GONE ALL THE WAY
268
- JSR GETSEC
269
- BEQ BA20
262
+	LDA #0
263
+	STA SECTOR
264
+	INC TRACK
265
+	LDA TRACK
266
+	CMP MAXTRK
267
+	BCS BA40        ; GONE ALL THE WAY
268
+	JSR GETSEC
269
+	BEQ BA20
270 270
 BA30
271
- LDA #NOBLK
272
- JSR CMDER2
271
+	LDA #NOBLK
272
+	JSR CMDER2
273 273
 BA40
274
- LDA #NOBLK
275
- JSR CMDERR ; T = 0, S = 0, NONE LEFT
274
+	LDA #NOBLK
275
+	JSR CMDERR      ; T = 0, S = 0, NONE LEFT
276 276
 ;
277 277
 ; BLOCK READ SUBS
278 278
 ;
279 279
 BLKRD2
280
- JSR BKOTST ; TEST PARMS
281
- JMP DRTRD
280
+	JSR BKOTST      ; TEST PARMS
281
+	JMP DRTRD
282 282
 GETSIM
283
- JSR GETPRE ; GET BYTE W/O INC
284
- LDA (BUFTAB,X)
285
- RTS
283
+	JSR GETPRE      ; GET BYTE W/O INC
284
+	LDA (BUFTAB,X)
285
+	RTS
286 286
 ;
287 287
 ; BLOCK READ
288 288
 ;
289 289
 BLKRD3
290
- JSR BLKRD2
291
- LDA #0
292
- JSR SETPNT
293
- JSR GETSIM ; .Y = LINDX
294
- STA LSTCHR,Y
295
- LDA #RNDRDY
296
- STA CHNRDY,Y
297
- RTS
290
+	JSR BLKRD2
291
+	LDA #0
292
+	JSR SETPNT
293
+	JSR GETSIM      ; .Y = LINDX
294
+	STA LSTCHR,Y
295
+	LDA #RNDRDY
296
+	STA CHNRDY,Y
297
+	RTS
298 298
 BLKRD
299
- JSR BLKRD3
300
- JSR RNGET1
301
- JMP ENDCMD
299
+	JSR BLKRD3
300
+	JSR RNGET1
301
+	JMP ENDCMD
302 302
 ;
303 303
 ; USER DIRECT READ, LSTCHR = $FF
304 304
 ;
305 305
 UBLKRD
306
- JSR BLKPAR
307
- JSR BLKRD3
308
- LDA LSTCHR,Y
309
- STA CHNDAT,Y
310
- LDA #$FF
311
- STA LSTCHR,Y
312
- JMP ENDCMD ; (RTS)
306
+	JSR BLKPAR
307
+	JSR BLKRD3
308
+	LDA LSTCHR,Y
309
+	STA CHNDAT,Y
310
+	LDA #$FF
311
+	STA LSTCHR,Y
312
+	JMP ENDCMD      ; (RTS)
313 313
 ;
314 314
 ; BLOCK-WRITE
315 315
 ;
316 316
 BLKWT
317
- JSR BKOTST
318
- JSR GETPNT
319
- TAY
320
- DEY
321
- CMP #2
322
- BCS BW10
323
- LDY #1
317
+	JSR BKOTST
318
+	JSR GETPNT
319
+	TAY
320
+	DEY
321
+	CMP #2
322
+	BCS BW10
323
+	LDY #1
324 324
 BW10
325
- LDA #0 ; SET RECORD SIZE
326
- JSR SETPNT
327
- TYA
328
- JSR PUTBYT
329
- TXA
330
- PHA
325
+	LDA #0          ; SET RECORD SIZE
326
+	JSR SETPNT
327
+	TYA
328
+	JSR PUTBYT
329
+	TXA
330
+	PHA
331 331
 BW20
332
- JSR DRTWRT ; WRITE BLOCK
333
- PLA
334
- TAX
335
- LDY LINDX
336
- JSR RNGET2
337
- JMP ENDCMD
332
+	JSR DRTWRT      ; WRITE BLOCK
333
+	PLA
334
+	TAX
335
+	LDY LINDX
336
+	JSR RNGET2
337
+	JMP ENDCMD
338 338
 ;
339 339
 ; USER DIRCT WRITE, NO LSTCHR
340 340
 ;
341 341
 UBLKWT
342
- JSR BLKPAR
343
- JSR BKOTST
344
- JSR DRTWRT
345
- JMP ENDCMD
342
+	JSR BLKPAR
343
+	JSR BKOTST
344
+	JSR DRTWRT
345
+	JMP ENDCMD
346 346
 ;
347 347
 ; BLOCK-EXECUTE
348 348
 ;
349 349
 BLKEXC
350
- JSR KILLP ; KILL PROTECT
351
- JSR BLKRD2 ; READ BLOCK & EXECUTE
352
- LDA #0
350
+	JSR KILLP       ; KILL PROTECT
351
+	JSR BLKRD2      ; READ BLOCK & EXECUTE
352
+	LDA #0
353 353
 BE05
354
- STA TEMP
355
- LDX JOBNUM
356
- LDA BUFIND,X
357
- STA TEMP+1
358
- JSR BE10 ; INDIRECT JSR
359
- JMP ENDCMD
354
+	STA TEMP
355
+	LDX JOBNUM
356
+	LDA BUFIND,X
357
+	STA TEMP+1
358
+	JSR BE10        ; INDIRECT JSR
359
+	JMP ENDCMD
360 360
 BE10
361
- JMP (TEMP)
361
+	JMP (TEMP)
362 362
 ;
363 363
 ; BUFFER-POINTER, SET BUFFER POINTER
364 364
 ;
365 365
 BLKPTR
366
- JSR BUFTST
367
- LDA JOBNUM
368
- ASL A
369
- TAX
370
- LDA FILSEC+1
371
- STA BUFTAB,X
372
- JSR GETPRE
373
- JSR RNGET2 ; SET UP GET
374
- JMP ENDCMD
366
+	JSR BUFTST
367
+	LDA JOBNUM
368
+	ASL A
369
+	TAX
370
+	LDA FILSEC+1
371
+	STA BUFTAB,X
372
+	JSR GETPRE
373
+	JSR RNGET2      ; SET UP GET
374
+	JMP ENDCMD
375 375
 ;
376 376
 ; TEST FOR ALLOCATED BUFFER..
377 377
 ; ..RELATED TO SA
378 378
 ;
379 379
 BUFTST
380
- LDX F1PTR
381
- INC F1PTR
382
- LDA FILSEC,X
383
- TAY
384
- DEY
385
- DEY
386
- CPY #BAMJOB
387
- BCC BT20
380
+	LDX F1PTR
381
+	INC F1PTR
382
+	LDA FILSEC,X
383
+	TAY
384
+	DEY
385
+	DEY
386
+	CPY #BAMJOB
387
+	BCC BT20
388 388
 BT15
389
- LDA #NOCHNL
390
- JMP CMDERR
389
+	LDA #NOCHNL
390
+	JMP CMDERR
391 391
 BT20
392
- STA SA
393
- JSR FNDRCH
394
- BCS BT15
395
- JSR GETACT
396
- STA JOBNUM
397
- RTS
392
+	STA SA
393
+	JSR FNDRCH
394
+	BCS BT15
395
+	JSR GETACT
396
+	STA JOBNUM
397
+	RTS
398 398
 ;
399 399
 ; TEST BLOCK OPERATION PARMS
400 400
 ;
401 401
 BKOTST
402
- JSR BUFTST
402
+	JSR BUFTST
403 403
 ;
404 404
 ; TEST FOR LEGAL BLOCK &..
405 405
 ; ..SET UP DRV, TRK, SEC
406 406
 ;
407 407
 BLKTST
408
- LDX F1PTR
409
- LDA FILSEC,X
410
- AND #1
411
- STA DRVNUM
412
- LDA FILSEC+2,X
413
- STA SECTOR
414
- LDA FILSEC+1,X
415
- STA TRACK
408
+	LDX F1PTR
409
+	LDA FILSEC,X
410
+	AND #1
411
+	STA DRVNUM
412
+	LDA FILSEC+2,X
413
+	STA SECTOR
414
+	LDA FILSEC+1,X
415
+	STA TRACK
416 416
 BT05
417
- JSR TSCHK
418
- JMP SETLDS ; (RTS)
417
+	JSR TSCHK
418
+	JMP SETLDS      ; (RTS)
419 419
 .END

+ 43
- 43
DOS_8250/chksum View File

@@ -1,48 +1,48 @@
1
- .PAGE 'CHKSUM
2
- *= $BF00
3
- LDX #$FF
4
- TXS
5
- CLD
6
- SEI
7
- LDA #0
8
- STA $1421
9
- CMP $1421
1
+.PAGE 'CHKSUM
2
+	*= $BF00
3
+	LDX #$FF
4
+	TXS
5
+	CLD
6
+	SEI
7
+	LDA #0
8
+	STA $1421
9
+	CMP $1421
10 10
 CHKPRO
11
- BNE CHKPRO
12
- LDA #$10
13
- JSR CHKSUM
14
- STA $1421
15
- BRK
16
- LDA #0
17
- STA $3000
18
- CMP $3000
19
- BNE CHKPRO
20
- LDA #$30
21
- JSR CHKSUM
22
- STA $3000
23
- BRK
11
+	BNE CHKPRO
12
+	LDA #$10
13
+	JSR CHKSUM
14
+	STA $1421
15
+	BRK
16
+	LDA #0
17
+	STA $3000
18
+	CMP $3000
19
+	BNE CHKPRO
20
+	LDA #$30
21
+	JSR CHKSUM
22
+	STA $3000
23
+	BRK
24 24
 ;
25
-CHKSUM ;.A=ADDRESS
26
- CLC
27
- STA TEMP+1
28
- LDA #0
29
- STA TEMP
30
- LDX #32
31
- LDY #0
25
+CHKSUM	;.A=ADDRESS
26
+	CLC
27
+	STA TEMP+1
28
+	LDA #0
29
+	STA TEMP
30
+	LDX #32
31
+	LDY #0
32 32
 CHK1
33
- ADC (TEMP)Y
34
- INY
35
- BNE CHK1
33
+	ADC (TEMP)Y
34
+	INY
35
+	BNE CHK1
36 36
 ;
37
- INC TEMP+1
38
- DEX
39
- BNE CHK1
37
+	INC TEMP+1
38
+	DEX
39
+	BNE CHK1
40 40
 ;
41
- ADC #0
42
- STA TEMP+1
43
- LDA #$C0
44
- SEC
45
- SBC TEMP+1
46
- SBC #0 ;.A=CHECKSUM BYTE
47
- RTS
48
- .END
41
+	ADC #0
42
+	STA TEMP+1
43
+	LDA #$C0
44
+	SEC
45
+	SBC TEMP+1
46
+	SBC #0          ;.A=CHECKSUM BYTE
47
+	RTS
48
+.END

+ 193
- 193
DOS_8250/close View File

@@ -1,227 +1,227 @@
1
- .PAGE 'CLOSE'
1
+.PAGE 'CLOSE'
2 2
 ;
3 3
 ; CLOSE THE FILE ASSOCIATED WITH SA
4 4
 ;
5
-CLOSE LDA SA
6
- BNE CLS10 ; DIRECTORY CLOSE
7
- LDA #0
8
- STA DIRLST ; CLEAR DIR LIST
9
- JSR FRECHN
5
+CLOSE	LDA SA
6
+	BNE CLS10       ; DIRECTORY CLOSE
7
+	LDA #0
8
+	STA DIRLST      ; CLEAR DIR LIST
9
+	JSR FRECHN
10 10
 CLS05
11
- JMP FREICH
11
+	JMP FREICH
12 12
 CLS10
13
- CMP #$F
14
- BEQ CLSALL ; CLOSE CMD CHANL
15
- JSR CLSCHN ; CLOSE CHANNEL
16
- LDA SA
17
- CMP #2
18
- BCC CLS05
19
- JMP ENDCMD
13
+	CMP #$F
14
+	BEQ CLSALL      ; CLOSE CMD CHANL
15
+	JSR CLSCHN      ; CLOSE CHANNEL
16
+	LDA SA
17
+	CMP #2
18
+	BCC CLS05
19
+	JMP ENDCMD
20 20
 ;
21 21
 ; CLOSE ALL SECONDARY CHANNELS
22 22
 ;
23 23
 CLSALL
24
- LDA #14
25
- STA SA
24
+	LDA #14
25
+	STA SA
26 26
 CLS20
27
- JSR CLSCHN
28
- DEC SA
29
- BPL CLS20
30
- JMP ENDCMD
27
+	JSR CLSCHN
28
+	DEC SA
29
+	BPL CLS20
30
+	JMP ENDCMD
31 31
 ;
32 32
 ; CLOSE SECONDARY ADDRESS (SA)
33 33
 ;
34 34
 CLSCHN
35
- LDX SA
36
- LDA LINTAB,X
37
- CMP #$FF
38
- BNE CLSC28
39
- RTS
35
+	LDX SA
36
+	LDA LINTAB,X
37
+	CMP #$FF
38
+	BNE CLSC28
39
+	RTS
40 40
 CLSC28
41
- AND #$F
42
- STA LINDX
43
- JSR TYPFIL
44
- CMP #DIRTYP
45
- BEQ CLSC30 ; DIRECT CHANNEL
46
- CMP #RELTYP
47
- BEQ CLSREL
48
- JSR FNDWCH ; LOOK FOR WRITE CHANNEL
49
- BCS CLSC31
50
- JSR CLSWRT ; CLOSE SEQ WRITE
51
- JSR CLSDIR ; CLOSE DIRECTORY
41
+	AND #$F
42
+	STA LINDX
43
+	JSR TYPFIL
44
+	CMP #DIRTYP
45
+	BEQ CLSC30      ; DIRECT CHANNEL
46
+	CMP #RELTYP
47
+	BEQ CLSREL
48
+	JSR FNDWCH      ; LOOK FOR WRITE CHANNEL
49
+	BCS CLSC31
50
+	JSR CLSWRT      ; CLOSE SEQ WRITE
51
+	JSR CLSDIR      ; CLOSE DIRECTORY
52 52
 CLSC30
53
- JSR MAPOUT ; WRITE BAM OUT
53
+	JSR MAPOUT      ; WRITE BAM OUT
54 54
 CLSC31
55
- JMP FRECHN
55
+	JMP FRECHN
56 56
 CLSREL
57
- JSR SCRUB
58
- JSR DBLBUF
59
- JSR SSEND
60
- LDX SSNUM
61
- STX T4
62
- JSR BIGREL ; BIG RELATIVE FILE?
63
- BEQ CLSBIG ; YES
64
- INC T4
65
- LDA #0
66
- STA T1
67
- STA T2
68
- LDA SSIND
69
- SEC
70
- SBC #SSIOFF-2
71
- STA T3
72
- JSR SSCALC
73
- LDX LINDX
74
- LDA T1
75
- STA NBKL,X
76
- LDA T2
77
- STA NBKH,X
57
+	JSR SCRUB
58
+	JSR DBLBUF
59
+	JSR SSEND
60
+	LDX SSNUM
61
+	STX T4
62
+	JSR BIGREL      ; BIG RELATIVE FILE?
63
+	BEQ CLSBIG      ; YES
64
+	INC T4
65
+	LDA #0
66
+	STA T1
67
+	STA T2
68
+	LDA SSIND
69
+	SEC
70
+	SBC #SSIOFF-2
71
+	STA T3
72
+	JSR SSCALC
73
+	LDX LINDX
74
+	LDA T1
75
+	STA NBKL,X
76
+	LDA T2
77
+	STA NBKH,X
78 78
 CLSRE1
79
- LDA #DYFILE
80
- JSR TSTFLG ; TEST IF FILE WRITTEN TO
81
- BEQ CLSR1
82
- JSR CLSDIR
79
+	LDA #DYFILE
80
+	JSR TSTFLG      ; TEST IF FILE WRITTEN TO
81
+	BEQ CLSR1
82
+	JSR CLSDIR
83 83
 CLSR1
84
- JMP FRECHN
84
+	JMP FRECHN
85 85
 CLSBIG
86
- LDA SSIND
87
- SEC
88
- SBC #SSIOFF-2
89
- STA T3
90
- LDA GRPNUM
91
- STA R3
92
- JSR SSSCAL
93
- LDX #0
94
- LDA #2
95
- JSR ADDLIT
96
- LDX LINDX
97
- LDA RESULT
98
- STA NBKL,X
99
- LDA RESULT+1
100
- STA NBKH,X
101
- JMP CLSRE1
86
+	LDA SSIND
87
+	SEC
88
+	SBC #SSIOFF-2
89
+	STA T3
90
+	LDA GRPNUM
91
+	STA R3
92
+	JSR SSSCAL
93
+	LDX #0
94
+	LDA #2
95
+	JSR ADDLIT
96
+	LDX LINDX
97
+	LDA RESULT
98
+	STA NBKL,X
99
+	LDA RESULT+1
100
+	STA NBKH,X
101
+	JMP CLSRE1
102 102
 ;
103 103
 ; CLOSE A WRITE CHANL
104 104
 ;
105 105
 CLSWRT
106
- LDX LINDX
107
- LDA NBKL,X
108
- ORA NBKH,X
109
- BNE CLSW10 ; AT LEAST 1 BLOCK WRITTEN
110
- JSR GETPNT
111
- CMP #2
112
- BNE CLSW10 ; AT LEAST 1 BYTE WRITTEN
113
- LDA #CR
114
- JSR PUTBYT
106
+	LDX LINDX
107
+	LDA NBKL,X
108
+	ORA NBKH,X
109
+	BNE CLSW10      ; AT LEAST 1 BLOCK WRITTEN
110
+	JSR GETPNT
111
+	CMP #2
112
+	BNE CLSW10      ; AT LEAST 1 BYTE WRITTEN
113
+	LDA #CR
114
+	JSR PUTBYT
115 115
 CLSW10
116
- JSR GETPNT
117
- CMP #2
118
- BNE CLSW20 ; NOT MT BUFFER
119
- JSR DBLBUF ; SWITCH BUFS
120
- LDX LINDX
121
- LDA NBKL,X
122
- BNE CLSW15
123
- DEC NBKH,X
116
+	JSR GETPNT
117
+	CMP #2
118
+	BNE CLSW20      ; NOT MT BUFFER
119
+	JSR DBLBUF      ; SWITCH BUFS
120
+	LDX LINDX
121
+	LDA NBKL,X
122
+	BNE CLSW15
123
+	DEC NBKH,X
124 124
 CLSW15
125
- DEC NBKL,X
126
- JSR GETLNK
127
- JSR FRETS ; FREE EXTRA SECTOR
128
- LDA #0
125
+	DEC NBKL,X
126
+	JSR GETLNK
127
+	JSR FRETS       ; FREE EXTRA SECTOR
128
+	LDA #0
129 129
 CLSW20
130
- SEC
131
- SBC #1 ; BACK UP 1
132
- PHA ; SAVE IT
133
- LDA #0
134
- JSR SETPNT
135
- JSR PUTBYT ; TRACK LINK = 0
136
- PLA ; LSTCHR COUNT
137
- JSR PUTBYT
138
- JSR WRTBUF ; WRITE OUT LAST BUFFER
139
- JSR WATJOB ; FINISH JOB UP
140
- JMP DBLBUF ; MAKE SURE BOTH BUFS OK
130
+	SEC
131
+	SBC #1          ; BACK UP 1
132
+	PHA             ; SAVE IT
133
+	LDA #0
134
+	JSR SETPNT
135
+	JSR PUTBYT      ; TRACK LINK = 0
136
+	PLA             ; LSTCHR COUNT
137
+	JSR PUTBYT
138
+	JSR WRTBUF      ; WRITE OUT LAST BUFFER
139
+	JSR WATJOB      ; FINISH JOB UP
140
+	JMP DBLBUF      ; MAKE SURE BOTH BUFS OK
141 141
 ;
142 142
 ; DIRECTORY CLOSE ON OPEN WRITE FILE
143 143
 ;
144 144
 CLSDIR
145
- LDX LINDX ; SAVE LINDX
146
- STX WLINDX ; AND SA
147
- LDA SA
148
- PHA
149
- LDA DSEC,X ; GET DIRECTORY SECTOR
150
- STA SECTOR
151
- LDA DIND,X ; GET SECTOR OFFSET
152
- STA INDEX
153
- LDA FILTYP,X ; DRIVE # IN FILTYP
154
- AND #1
155
- STA DRVNUM
156
- LDA DIRTRK
157
- STA TRACK
158
- JSR GETACT ; ALLOCATE A BUFFER
159
- PHA
160
- STA JOBNUM
161
- JSR DRTRD ; READ DIRECTORY SECTOR
162
- LDY #0
163
- LDA BUFIND,X ; .X IS JOB#
164
- STA R0+1
165
- LDA INDEX
166
- STA R0
167
- LDA (R0),Y
168
- AND #$20
169
- BEQ CLSD5
170
- JSR TYPFIL
171
- CMP #RELTYP
172
- BEQ CLSD6
173
- LDA (R0),Y
174
- AND #$8F ; REPLACE FILE
175
- STA (R0),Y
176
- INY
177
- LDA (R0),Y
178
- STA TRACK
179
- STY TEMP+2
180
- LDY #27 ; EXTRACT REPLACEMENT LINK
181
- LDA (R0),Y ; TO LAST SECTOR
182
- PHA
183
- DEY
184
- LDA (R0),Y
185
- BNE CLSD4
186
- STA TRACK
187
- PLA
188
- STA SECTOR
189
- LDA #$67
190
- JSR CMDER2
145
+	LDX LINDX       ; SAVE LINDX
146
+	STX WLINDX      ; AND SA
147
+	LDA SA
148
+	PHA
149
+	LDA DSEC,X      ; GET DIRECTORY SECTOR
150
+	STA SECTOR
151
+	LDA DIND,X      ; GET SECTOR OFFSET
152
+	STA INDEX
153
+	LDA FILTYP,X    ; DRIVE # IN FILTYP
154
+	AND #1
155
+	STA DRVNUM
156
+	LDA DIRTRK
157
+	STA TRACK
158
+	JSR GETACT      ; ALLOCATE A BUFFER
159
+	PHA
160
+	STA JOBNUM
161
+	JSR DRTRD       ; READ DIRECTORY SECTOR
162
+	LDY #0
163
+	LDA BUFIND,X    ; .X IS JOB#
164
+	STA R0+1
165
+	LDA INDEX
166
+	STA R0
167
+	LDA (R0),Y
168
+	AND #$20
169
+	BEQ CLSD5
170
+	JSR TYPFIL
171
+	CMP #RELTYP
172
+	BEQ CLSD6
173
+	LDA (R0),Y
174
+	AND #$8F        ; REPLACE FILE
175
+	STA (R0),Y
176
+	INY
177
+	LDA (R0),Y
178
+	STA TRACK
179
+	STY TEMP+2
180
+	LDY #27         ; EXTRACT REPLACEMENT LINK
181
+	LDA (R0),Y      ; TO LAST SECTOR
182
+	PHA
183
+	DEY
184
+	LDA (R0),Y
185
+	BNE CLSD4
186
+	STA TRACK
187
+	PLA
188
+	STA SECTOR
189
+	LDA #$67
190
+	JSR CMDER2
191 191
 CLSD4
192
- PHA
193
- LDA #0
194
- STA (R0)Y
195
- INY
196
- STA (R0)Y
197
- PLA
198
- LDY TEMP+2
199
- STA (R0),Y
200
- INY
201
- LDA (R0),Y
202
- STA SECTOR
203
- PLA
204
- STA (R0),Y
205
- JSR DELFIL ; DELETE OLD FILE
206
- JMP CLSD6 ; SET CLOSE BIT
192
+	PHA
193
+	LDA #0
194
+	STA (R0)Y
195
+	INY
196
+	STA (R0)Y
197
+	PLA
198
+	LDY TEMP+2
199
+	STA (R0),Y
200
+	INY
201
+	LDA (R0),Y
202
+	STA SECTOR
203
+	PLA
204
+	STA (R0),Y
205
+	JSR DELFIL      ; DELETE OLD FILE
206
+	JMP CLSD6       ; SET CLOSE BIT
207 207
 CLSD5
208
- LDA (R0),Y
209
- AND #$F
210
- ORA #$80
211
- STA (R0),Y
212
-CLSD6 LDX WLINDX
213
- LDY #28 ; SET # OF BLOCKS
214
- LDA NBKL,X
215
- STA (R0),Y
216
- INY
217
- LDA NBKH,X
218
- STA (R0),Y
219
- PLA
220
- TAX
221
- LDA #WRITE ; WRITE DIRECTORY SECTOR
222
- ORA DRVNUM
223
- JSR DOIT
224
- PLA
225
- STA SA
226
- JMP FNDWCH ; RESTORE LINDX
227
- .END
208
+	LDA (R0),Y
209
+	AND #$F
210
+	ORA #$80
211
+	STA (R0),Y
212
+CLSD6	LDX WLINDX
213
+	LDY #28         ; SET # OF BLOCKS
214
+	LDA NBKL,X
215
+	STA (R0),Y
216
+	INY
217
+	LDA NBKH,X
218
+	STA (R0),Y
219
+	PLA
220
+	TAX
221
+	LDA #WRITE      ; WRITE DIRECTORY SECTOR
222
+	ORA DRVNUM
223
+	JSR DOIT
224
+	PLA
225
+