Browse Source

reindented DOS_D9065 to approximate the LST output of the assembler

master
Michael Steil 2 years ago
parent
commit
bbac8207d7
69 changed files with 7701 additions and 7701 deletions
  1. 111
    111
      DOS_D9065/addfil
  2. 158
    158
      DOS_D9065/addrel
  3. 58
    58
      DOS_D9065/allromcheck
  4. 33
    33
      DOS_D9065/autoit
  5. 133
    133
      DOS_D9065/begin
  6. 318
    318
      DOS_D9065/block
  7. 42
    42
      DOS_D9065/chksum
  8. 176
    176
      DOS_D9065/close
  9. 108
    108
      DOS_D9065/comprs
  10. 86
    86
      DOS_D9065/copyall
  11. 56
    56
      DOS_D9065/copysetup
  12. 145
    145
      DOS_D9065/dskint
  13. 155
    155
      DOS_D9065/duplct
  14. 2
    2
      DOS_D9065/echksm
  15. 48
    48
      DOS_D9065/equate
  16. 3
    3
      DOS_D9065/erom
  17. 292
    292
      DOS_D9065/erproc
  18. 3
    3
      DOS_D9065/fmt40
  19. 98
    98
      DOS_D9065/fndrel
  20. 212
    212
      DOS_D9065/frets
  21. 20
    20
      DOS_D9065/getact
  22. 38
    38
      DOS_D9065/i_odef
  23. 66
    66
      DOS_D9065/idle
  24. 184
    184
      DOS_D9065/ieee
  25. 194
    194
      DOS_D9065/init
  26. 103
    103
      DOS_D9065/jobs
  27. 313
    313
      DOS_D9065/lookup
  28. 104
    104
      DOS_D9065/lstdir
  29. 200
    200
      DOS_D9065/map
  30. 60
    60
      DOS_D9065/master
  31. 59
    59
      DOS_D9065/master.old
  32. 45
    45
      DOS_D9065/memrw
  33. 57
    57
      DOS_D9065/mver
  34. 231
    231
      DOS_D9065/new
  35. 127
    127
      DOS_D9065/newss
  36. 35
    35
      DOS_D9065/nulbuf
  37. 177
    177
      DOS_D9065/opchnl
  38. 345
    345
      DOS_D9065/open
  39. 177
    177
      DOS_D9065/opx
  40. 202
    202
      DOS_D9065/parsex
  41. 2
    2
      DOS_D9065/patc
  42. 61
    61
      DOS_D9065/patchlst
  43. 176
    176
      DOS_D9065/ramvar
  44. 104
    104
      DOS_D9065/record
  45. 82
    82
      DOS_D9065/rel1
  46. 77
    77
      DOS_D9065/rel2
  47. 36
    36
      DOS_D9065/rel3
  48. 45
    45
      DOS_D9065/rel4
  49. 182
    182
      DOS_D9065/rename
  50. 3
    3
      DOS_D9065/rom
  51. 75
    75
      DOS_D9065/romtbl
  52. 67
    67
      DOS_D9065/scrtch
  53. 98
    98
      DOS_D9065/setdrv
  54. 33
    33
      DOS_D9065/ssend
  55. 28
    28
      DOS_D9065/sstest
  56. 116
    116
      DOS_D9065/ssutil
  57. 91
    91
      DOS_D9065/system
  58. 97
    97
      DOS_D9065/temp
  59. 220
    220
      DOS_D9065/trnsfr
  60. 321
    321
      DOS_D9065/tst2
  61. 166
    166
      DOS_D9065/tst3
  62. 172
    172
      DOS_D9065/tst4
  63. 51
    51
      DOS_D9065/tstflg
  64. 142
    142
      DOS_D9065/tstfnd
  65. 88
    88
      DOS_D9065/tsutil
  66. 105
    105
      DOS_D9065/utlodr
  67. 15
    15
      DOS_D9065/vector
  68. 73
    73
      DOS_D9065/verdir
  69. 1
    1
      README.md

+ 111
- 111
DOS_D9065/addfil View File

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

+ 158
- 158
DOS_D9065/addrel View File

@@ -1,179 +1,179 @@
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
- LDA #0
29
- STA SSNUM
30
- INC GRPNUM
31
- 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
+	LDA #0
29
+	STA SSNUM
30
+	INC GRPNUM
31
+	BNE AR25        ; JUMP
32 32
 AR20
33
- LDA #BIGFIL
34
- JSR CMDERR ; TOO MANY SS'S
33
+	LDA #BIGFIL
34
+	JSR CMDERR      ; TOO MANY SS'S
35 35
 AR25
36
- LDA SSIND ; CALC # BLOCKS NEEDED...
37
- SEC ; ...& CHECK AGAINST AVAIL.
38
- SBC R1
39
- BCS AR30
40
- SBC #SSIOFF-1
41
- CLC
36
+	LDA SSIND       ; CALC # BLOCKS NEEDED...
37
+	SEC             ; ...& CHECK AGAINST AVAIL.
38
+	SBC R1
39
+	BCS AR30
40
+	SBC #SSIOFF-1
41
+	CLC
42 42
 AR30
43
- STA T3
44
- LDA SSNUM
45
- SBC R0
46
- BCS ADDBI1
47
- INC R3
48
- ADC #6
43
+	STA T3
44
+	LDA SSNUM
45
+	SBC R0
46
+	BCS ADDBI1
47
+	INC R3
48
+	ADC #6
49 49
 ADDBI1
50
- STA T4
51
- LDA GRPNUM
52
- SEC
53
- SBC R3
54
- STA R3
55
- JSR SSSCAL
56
- LDA RESULT+1
57
- BNE AR35
58
- LDX RESULT
59
- BNE ADDBI2
60
- RTS
50
+	STA T4
51
+	LDA GRPNUM
52
+	SEC
53
+	SBC R3
54
+	STA R3
55
+	JSR SSSCAL
56
+	LDA RESULT+1
57
+	BNE AR35
58
+	LDX RESULT
59
+	BNE ADDBI2
60
+	RTS
61 61
 ADDBI2
62
- DEX
63
- BNE AR35
62
+	DEX
63
+	BNE AR35
64 64
 AR34
65
- INC R2
65
+	INC R2
66 66
 AR35
67
- CMP NBTEMP+1
68
- BCC AR40 ; OK!!
69
- BNE AR20
70
- LDA NBTEMP
71
- CMP T1
72
- BCC AR20 ; NOT ENOUGH BLOCKS
67
+	CMP NBTEMP+1
68
+	BCC AR40        ; OK!!
69
+	BNE AR20
70
+	LDA NBTEMP
71
+	CMP T1
72
+	BCC AR20        ; NOT ENOUGH BLOCKS
73 73
 AR40
74
- LDA #1
75
- JSR DRDBYT ; LOOK AT SECTOR LINK
76
- CLC
77
- ADC #1 ; +1 IS NR
78
- LDX LINDX
79
- STA NR,X
80
- JSR NXTTS ; GET NEXT BLOCK...
81
- JSR SETLNK ; ...& SET LINK.
82
- LDA R2
83
- BNE AR50 ; ADD ONE BLOCK
84
- JSR WRTOUT ; WRITE CURRENT LAST REC
74
+	LDA #1
75
+	JSR DRDBYT      ; LOOK AT SECTOR LINK
76
+	CLC
77
+	ADC #1          ; +1 IS NR
78
+	LDX LINDX
79
+	STA NR,X
80
+	JSR NXTTS       ; GET NEXT BLOCK...
81
+	JSR SETLNK      ; ...& SET LINK.
82
+	LDA R2
83
+	BNE AR50        ; ADD ONE BLOCK
84
+	JSR WRTOUT      ; WRITE CURRENT LAST REC
85 85
 AR45
86
- JSR DBLBUF ; SWITCH BUFS
87
- JSR SETHDR ; SET HDR FROM T & S
88
- JSR NXTTS ; GET ANOTHER
89
- JSR SETLNK ; SET UP LINK
90
- JSR NULBUF ; CLEAN IT OUT
91
- JMP AR55
86
+	JSR DBLBUF      ; SWITCH BUFS
87
+	JSR SETHDR      ; SET HDR FROM T & S
88
+	JSR NXTTS       ; GET ANOTHER
89
+	JSR SETLNK      ; SET UP LINK
90
+	JSR NULBUF      ; CLEAN IT OUT
91
+	JMP AR55
92 92
 AR50
93
- JSR DBLBUF ; SWITCH BUFS
94
- JSR SETHDR ; SET HDR FROM T & S
95
- JSR NULBUF ; CLEAN BUFFER
96
- JSR NULLNK ; LAST BLOCK = 0, LSTCHR
93
+	JSR DBLBUF      ; SWITCH BUFS
94
+	JSR SETHDR      ; SET HDR FROM T & S
95
+	JSR NULBUF      ; CLEAN BUFFER
96
+	JSR NULLNK      ; LAST BLOCK = 0, LSTCHR
97 97
 AR55
98
- JSR WRTOUT ; WRITE BUFFER
99
- JSR GETLNK ; GET T&S FROM LINK
100
- LDA TRACK
101
- PHA ; SAVE 'EM
102
- LDA SECTOR
103
- PHA
104
- JSR GETHDR ; NOW GET HDR T&S
105
- LDA SECTOR
106
- PHA ; SAVE 'EM
107
- LDA TRACK
108
- PHA
109
- JSR GSSPNT ; CHECK SS PTR
110
- TAX
111
- BNE AR60
112
- JSR NEWSS ; NEED ANOTHER SS
113
- LDA #SSIOFF
114
- JSR SETSSP ; .A = BT VAL
115
- INC R0 ; ADVANCE SS COUNT
98
+	JSR WRTOUT      ; WRITE BUFFER
99
+	JSR GETLNK      ; GET T&S FROM LINK
100
+	LDA TRACK
101
+	PHA             ; SAVE 'EM
102
+	LDA SECTOR
103
+	PHA
104
+	JSR GETHDR      ; NOW GET HDR T&S
105
+	LDA SECTOR
106
+	PHA             ; SAVE 'EM
107
+	LDA TRACK
108
+	PHA
109
+	JSR GSSPNT      ; CHECK SS PTR
110
+	TAX
111
+	BNE AR60
112
+	JSR NEWSS       ; NEED ANOTHER SS
113
+	LDA #SSIOFF
114
+	JSR SETSSP      ; .A = BT VAL
115
+	INC R0          ; ADVANCE SS COUNT
116 116
 AR60
117
- PLA
118
- JSR PUTSS ; RECORD T&S...
119
- PLA
120
- JSR PUTSS ; ...IN SS.
121
- PLA ; GET T&S FROM LINK
122
- STA SECTOR
123
- PLA
124
- STA TRACK
125
- BEQ AR65 ; T = 0, THAT'S ALL!!
126
- LDA R5
127
- CMP GRPNUM
128
- BCC AR45
117
+	PLA
118
+	JSR PUTSS       ; RECORD T&S...
119
+	PLA
120
+	JSR PUTSS       ; ...IN SS.
121
+	PLA             ; GET T&S FROM LINK
122
+	STA SECTOR
123
+	PLA
124
+	STA TRACK
125
+	BEQ AR65        ; T = 0, THAT'S ALL!!
126
+	LDA R5
127
+	CMP GRPNUM
128
+	BCC AR45
129 129
 AR61
130
- LDA R0
131
- CMP SSNUM
132
- BNE AR45 ; NOT DONE YET
133
- JSR GSSPNT
134
- CMP SSIND
135
- BCC AR45 ; ALMOST DONE
136
- BCS AR50 ; ONE MORE BLOCK LEFT
130
+	LDA R0
131
+	CMP SSNUM
132
+	BNE AR45        ; NOT DONE YET
133
+	JSR GSSPNT
134
+	CMP SSIND
135
+	BCC AR45        ; ALMOST DONE
136
+	BCS AR50        ; ONE MORE BLOCK LEFT
137 137
 AR65
138
- JSR GSSPNT
139
- PHA
140
- LDA #0
141
- JSR SSDIR
142
- LDA #0
143
- TAY
144
- STA (DIRBUF),Y
145
- INY
146
- PLA
147
- SEC
148
- SBC #1
149
- STA (DIRBUF),Y
150
- JSR WRTSS ; WRITE SS
151
- JSR WATJOB
152
- JSR MAPOUT
153
- JSR FNDREL
154
- JSR DBLBUF ; GET BACK TO LEADING BUFFER
155
- JSR SSPOS
156
- BVS AR70
157
- JMP POSITN
138
+	JSR GSSPNT
139
+	PHA
140
+	LDA #0
141
+	JSR SSDIR
142
+	LDA #0
143
+	TAY
144
+	STA (DIRBUF),Y
145
+	INY
146
+	PLA
147
+	SEC
148
+	SBC #1
149
+	STA (DIRBUF),Y
150
+	JSR WRTSS       ; WRITE SS
151
+	JSR WATJOB
152
+	JSR MAPOUT
153
+	JSR FNDREL
154
+	JSR DBLBUF      ; GET BACK TO LEADING BUFFER
155
+	JSR SSPOS
156
+	BVS AR70
157
+	JMP POSITN
158 158
 AR70
159
- LDA #LRF
160
- JSR SETFLG
161
- LDA #NOREC
162
- JSR CMDERR
159
+	LDA #LRF
160
+	JSR SETFLG
161
+	LDA #NOREC
162
+	JSR CMDERR
163 163
 ADRELS
164
- JSR SETDRN
165
- JSR SSEND ; SET UP END OF FILE
166
- JSR POSBUF
167
- LDA GRPNUM
168
- STA R5
169
- STA R3
164
+	JSR SETDRN
165
+	JSR SSEND       ; SET UP END OF FILE
166
+	JSR POSBUF
167
+	LDA GRPNUM
168
+	STA R5
169
+	STA R3
170 170
 ADREL1
171
- LDA SSIND
172
- STA R1 ; SAVE SS INDEX
173
- LDA SSNUM
174
- STA R0 ; SAVE SS NUMBER
175
- LDA #0
176
- STA R2 ; CLEAR FLAG FOR ONE BLOCK
177
- STA RECPTR ; TO 1ST BYTE IN RECORD
178
- RTS
171
+	LDA SSIND
172
+	STA R1          ; SAVE SS INDEX
173
+	LDA SSNUM
174
+	STA R0          ; SAVE SS NUMBER
175
+	LDA #0
176
+	STA R2          ; CLEAR FLAG FOR ONE BLOCK
177
+	STA RECPTR      ; TO 1ST BYTE IN RECORD
178
+	RTS
179 179
 .END

+ 58
- 58
DOS_D9065/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_D9065/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

+ 133
- 133
DOS_D9065/begin View File

@@ -1,161 +1,161 @@
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
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 43
 DSKIN1
44
- STA LINTAB,X
45
- DEX
46
- BPL DSKIN1
47
- LDX #MXCHNS-1
44
+	STA LINTAB,X
45
+	DEX
46
+	BPL DSKIN1
47
+	LDX #MXCHNS-1
48 48
 DSKIN2
49
- STA BUF0,X ; SET BUFFERS AS UNUSED
50
- STA BUF1,X
51
- STA SS,X
52
- DEX
53
- BPL DSKIN2
54
- LDA #BFCNT+2 ; SET BUFFER POINTERS
55
- STA BUF0+CMDCHN
56
- LDA #BFCNT+3
57
- STA BUF0+ERRCHN
58
- LDA #ERRCHN
59
- STA LINTAB+ERRSA
60
- LDA #CMDCHN+$80
61
- STA LINTAB+CMDSA
62
- LDA #LXINT ; LINDX 0 TO 5 FREE
63
- STA LINUSE
64
- LDA #RDYLST
65
- STA CHNRDY+CMDCHN
66
- LDA #RDYTLK
67
- STA CHNRDY+ERRCHN
68
- LDA #0
69
- STA BUFUSE
70
- LDA #$D0
71
- STA BUFUSE+1
72
- JSR USRINT ; INITIALIZE USER JUMP TABLE
73
- LDA #0
74
- STA RESULT+1
75
- STA RESULT+2
76
- LDA SECTRS
77
- STA RESULT
78
- LDA #8
79
- JSR DIV006+2
80
- LDA ACCUM+1
81
- BEQ DSKIN3
82
- INC RESULT
49
+	STA BUF0,X      ; SET BUFFERS AS UNUSED
50
+	STA BUF1,X
51
+	STA SS,X
52
+	DEX
53
+	BPL DSKIN2
54
+	LDA #BFCNT+2    ; SET BUFFER POINTERS
55
+	STA BUF0+CMDCHN
56
+	LDA #BFCNT+3
57
+	STA BUF0+ERRCHN
58
+	LDA #ERRCHN
59
+	STA LINTAB+ERRSA
60
+	LDA #CMDCHN+$80
61
+	STA LINTAB+CMDSA
62
+	LDA #LXINT      ; LINDX 0 TO 5 FREE
63
+	STA LINUSE
64
+	LDA #RDYLST
65
+	STA CHNRDY+CMDCHN
66
+	LDA #RDYTLK
67
+	STA CHNRDY+ERRCHN
68
+	LDA #0
69
+	STA BUFUSE
70
+	LDA #$D0
71
+	STA BUFUSE+1
72
+	JSR USRINT      ; INITIALIZE USER JUMP TABLE
73
+	LDA #0
74
+	STA RESULT+1
75
+	STA RESULT+2
76
+	LDA SECTRS
77
+	STA RESULT
78
+	LDA #8
79
+	JSR DIV006+2
80
+	LDA ACCUM+1
81
+	BEQ DSKIN3
82
+	INC RESULT
83 83
 DSKIN3
84
- INC RESULT
85
- LDA RESULT
86
- STA BAMSIZ ; BAMSIZ = (SECTRS/8)+1
87
- LDX HEADS
88
- LDA #0
89
- CLC
84
+	INC RESULT
85
+	LDA RESULT
86
+	STA BAMSIZ      ; BAMSIZ = (SECTRS/8)+1
87
+	LDX HEADS
88
+	LDA #0
89
+	CLC
90 90
 DSKIN4
91
- ADC BAMSIZ
92
- DEX
93
- BNE DSKIN4
94
- STA BTSIZE ; BTSIZE = HEADS*BAMSIZ
95
- LDX HEADS
96
- LDA #0
97
- CLC
91
+	ADC BAMSIZ
92
+	DEX
93
+	BNE DSKIN4
94
+	STA BTSIZE      ; BTSIZE = HEADS*BAMSIZ
95
+	LDX HEADS
96
+	LDA #0
97
+	CLC
98 98
 DSKIN5
99
- ADC SECTRS
100
- DEX
101
- BNE DSKIN5
102
- STA MAXCYL ; MAXCYL = HEADS*SECTRS
103
- LDA #0
104
- STA RESULT+1
105
- STA RESULT+2
106
- LDA #250
107
- STA RESULT
108
- LDA BTSIZE
109
- JSR DIV006+2
110
- LDA ACCUM+1
111
- CLC
112
- ADC #6
113
- STA MAPOFF ; MAPOFF = REMAINDER(250/BTSIZE)+6
114
- LDA RESULT
115
- STA TRKBAM ; TRKBAM = INT(250/BTSIZE)
116
- LDX CYLLOW
117
- INX
118
- STX MAXTRK
119
- LDA #'A
120
- STA VERNUM
121
- LDA #1
122
- STA WPSW
123
- STA WPSW+1 ; POWER UP INIT FLAG
99
+	ADC SECTRS
100
+	DEX
101
+	BNE DSKIN5
102
+	STA MAXCYL      ; MAXCYL = HEADS*SECTRS
103
+	LDA #0
104
+	STA RESULT+1
105
+	STA RESULT+2
106
+	LDA #250
107
+	STA RESULT
108
+	LDA BTSIZE
109
+	JSR DIV006+2
110
+	LDA ACCUM+1
111
+	CLC
112
+	ADC #6
113
+	STA MAPOFF      ; MAPOFF = REMAINDER(250/BTSIZE)+6
114
+	LDA RESULT
115
+	STA TRKBAM      ; TRKBAM = INT(250/BTSIZE)
116
+	LDX CYLLOW
117
+	INX
118
+	STX MAXTRK
119
+	LDA #'A
120
+	STA VERNUM
121
+	LDA #1
122
+	STA WPSW
123
+	STA WPSW+1      ; POWER UP INIT FLAG
124 124
 ;
125 125
 ; SET INDIRECT VECTORS
126 126
 ;
127
- LDA #<DIAGOK
128
- STA VNMI
129
- LDA #>DIAGOK
130
- STA VNMI+1
131
- LDA #10 ; SET UP SECTOR ALLOCATE
132
- STA SECINC
133
- LDA #5
134
- STA REVCNT ; SET UP RECOVERY COUNT
135
- STA RETRY
127
+	LDA #<DIAGOK
128
+	STA VNMI
129
+	LDA #>DIAGOK
130
+	STA VNMI+1
131
+	LDA #10         ; SET UP SECTOR ALLOCATE
132
+	STA SECINC
133
+	LDA #5
134
+	STA REVCNT      ; SET UP RECOVERY COUNT
135
+	STA RETRY
136 136
 ;
137 137
 ; SET VECTORS TO IDLE LOOP AND IEEE
138 138
 ;
139
- LDA #<VIDLE
140
- STA VECIDL
141
- LDA #>VIDLE
142
- STA VECIDL+1
143
- LDA #<VIEEE
144
- STA VECIEE
145
- LDA #>VIEEE
146
- STA VECIEE+1
139
+	LDA #<VIDLE
140
+	STA VECIDL
141
+	LDA #>VIDLE
142
+	STA VECIDL+1
143
+	LDA #<VIEEE
144
+	STA VECIEE
145
+	LDA #>VIEEE
146
+	STA VECIEE+1
147 147
 ;
148 148
 ; SET UP POWER UP MESSAGE
149 149
 ;
150 150
 MESAGE
151
- LDA #CBMVER ; DOS VERSION NUMBER
152
- JSR ERRTS0 ; TRANSFER MESSAGE
151
+	LDA #CBMVER     ; DOS VERSION NUMBER
152
+	JSR ERRTS0      ; TRANSFER MESSAGE
153 153
 ;
154 154
 ; ALLOW 'ATN' TO INTERRUPT
155 155
 ;
156
- STA ATNPE
157
- JMP BOOT ; CHECK POWER UP BOOT
156
+	STA ATNPE
157
+	JMP BOOT        ; CHECK POWER UP BOOT
158 158
 ;
159 159
 ; MUST BE CONTIGUOUS TO IDLE ROUTINE
160 160
 ;
161
- .END
161
+.END

+ 318
- 318
DOS_D9065/block View File

@@ -1,426 +1,426 @@
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
249
- JSR GETHED ; EXTRACT THE HEAD NUMBER
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 USEDT0 ; HEAD ALREADY  OUT
258
- JMP ENDCMD
248
+	JSR BLKTST
249
+	JSR GETHED      ; EXTRACT THE HEAD NUMBER
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 USEDT0      ; HEAD ALREADY  OUT
258
+	JMP ENDCMD
259 259
 BA15
260
- PLA ; POP STACK
260
+	PLA             ; POP STACK
261 261
 BA20
262
- LDA #0
263
- STA SECTOR ; START AT SECTOR 0
264
- INC HEAD ; HEAD+1
265
- LDA HEAD
266
- CMP HEADS
267
- BCC BA25
268
- LDA #0
269
- STA HEAD ; SET HEAD = 0
270
- INC TRACK
271
- LDA TRACK
272
- CMP MAXTRK
273
- BCS BA40 ; GONE ALL THE WAY
262
+	LDA #0
263
+	STA SECTOR      ; START AT SECTOR 0
264
+	INC HEAD        ; HEAD+1
265
+	LDA HEAD
266
+	CMP HEADS
267
+	BCC BA25
268
+	LDA #0
269
+	STA HEAD        ; SET HEAD = 0
270
+	INC TRACK
271
+	LDA TRACK
272
+	CMP MAXTRK
273
+	BCS BA40        ; GONE ALL THE WAY
274 274
 BA25
275
- JSR GETSEC
276
- BEQ BA20
275
+	JSR GETSEC
276
+	BEQ BA20
277 277
 BA30
278
- JSR ADDHED ; ADD THE HEAD TO THE SECTOR
279
- LDA #NOBLK
280
- JSR CMDER2
278
+	JSR ADDHED      ; ADD THE HEAD TO THE SECTOR
279
+	LDA #NOBLK
280
+	JSR CMDER2
281 281
 BA40
282
- LDA #NOBLK
283
- JSR CMDERR ; T = 0, S = 0, NONE LEFT
282
+	LDA #NOBLK
283
+	JSR CMDERR      ; T = 0, S = 0, NONE LEFT
284 284
 ;
285 285
 ; BLOCK READ SUBS
286 286
 ;
287 287
 BLKRD2
288
- JSR BKOTST ; TEST PARMS
289
- JMP DRTRD
288
+	JSR BKOTST      ; TEST PARMS
289
+	JMP DRTRD
290 290
 GETSIM
291
- JSR GETPRE ; GET BYTE W/O INC
292
- LDA (BUFTAB,X)
293
- RTS
291
+	JSR GETPRE      ; GET BYTE W/O INC
292
+	LDA (BUFTAB,X)
293
+	RTS
294 294
 ;
295 295
 ; BLOCK READ
296 296
 ;
297 297
 BLKRD3
298
- JSR BLKRD2
299
- LDA #0
300
- JSR SETPNT
301
- JSR GETSIM ; .Y = LINDX
302
- STA LSTCHR,Y
303
- LDA #RNDRDY
304
- STA CHNRDY,Y
305
- RTS
298
+	JSR BLKRD2
299
+	LDA #0
300
+	JSR SETPNT
301
+	JSR GETSIM      ; .Y = LINDX
302
+	STA LSTCHR,Y
303
+	LDA #RNDRDY
304
+	STA CHNRDY,Y
305
+	RTS
306 306
 BLKRD
307
- JSR BLKRD3
308
- JSR RNGET1
309
- JMP ENDCMD
307
+	JSR BLKRD3
308
+	JSR RNGET1
309
+	JMP ENDCMD
310 310
 ;
311 311
 ; USER DIRECT READ, LSTCHR = $FF
312 312
 ;
313 313
 UBLKRD
314
- JSR BLKPAR
315
- JSR BLKRD3
316
- LDA LSTCHR,Y
317
- STA CHNDAT,Y
318
- LDA #$FF
319
- STA LSTCHR,Y
320
- JMP ENDCMD ; (RTS)
314
+	JSR BLKPAR
315
+	JSR BLKRD3
316
+	LDA LSTCHR,Y
317
+	STA CHNDAT,Y
318
+	LDA #$FF
319
+	STA LSTCHR,Y
320
+	JMP ENDCMD      ; (RTS)
321 321
 ;
322 322
 ; BLOCK-WRITE
323 323
 ;
324 324
 BLKWT
325
- JSR BKOTST
326
- JSR GETPNT
327
- TAY
328
- DEY
329
- CMP #2
330
- BCS BW10
331
- LDY #1
325
+	JSR BKOTST
326
+	JSR GETPNT
327
+	TAY
328
+	DEY
329
+	CMP #2
330
+	BCS BW10
331
+	LDY #1
332 332
 BW10
333
- LDA #0 ; SET RECORD SIZE
334
- JSR SETPNT
335
- TYA
336
- JSR PUTBYT
337
- TXA
338
- PHA
333
+	LDA #0          ; SET RECORD SIZE
334
+	JSR SETPNT
335
+	TYA
336
+	JSR PUTBYT
337
+	TXA
338
+	PHA
339 339
 BW20
340
- JSR DRTWRT ; WRITE BLOCK
341
- PLA
342
- TAX
343
- LDY LINDX
344
- JSR RNGET2
345
- JMP ENDCMD
340
+	JSR DRTWRT      ; WRITE BLOCK
341
+	PLA
342
+	TAX
343
+	LDY LINDX
344
+	JSR RNGET2
345
+	JMP ENDCMD
346 346
 ;
347 347
 ; USER DIRCT WRITE, NO LSTCHR
348 348
 ;
349 349
 UBLKWT
350
- JSR BLKPAR
351
- JSR BKOTST
352
- JSR DRTWRT
353
- JMP ENDCMD
350
+	JSR BLKPAR
351
+	JSR BKOTST
352
+	JSR DRTWRT
353
+	JMP ENDCMD
354 354
 ;
355 355
 ; BLOCK-EXECUTE
356 356
 ;
357 357
 BLKEXC
358
- JSR BLKRD2 ; READ BLOCK & EXECUTE
359
- LDA #0
358
+	JSR BLKRD2      ; READ BLOCK & EXECUTE
359
+	LDA #0
360 360
 BE05
361
- STA TEMP
362
- LDX JOBNUM
363
- LDA BUFIND,X
364
- STA TEMP+1
365
- JSR BE10 ; INDIRECT JSR
366
- JMP ENDCMD
361
+	STA TEMP
362
+	LDX JOBNUM
363
+	LDA BUFIND,X
364
+	STA TEMP+1
365
+	JSR BE10        ; INDIRECT JSR
366
+	JMP ENDCMD
367 367
 BE10
368
- JMP (TEMP)
368
+	JMP (TEMP)
369 369
 ;
370 370
 ; BUFFER-POINTER, SET BUFFER POINTER
371 371
 ;
372 372
 BLKPTR
373
- JSR BUFTST
374
- LDA JOBNUM
375
- ASL A
376
- TAX
377
- LDA FILSEC+1
378
- STA BUFTAB,X
379
- JSR GETPRE
380
- JSR RNGET2 ; SET UP GET
381
- JMP ENDCMD
373
+	JSR BUFTST
374
+	LDA JOBNUM
375
+	ASL A
376
+	TAX
377
+	LDA FILSEC+1
378
+	STA BUFTAB,X
379
+	JSR GETPRE
380
+	JSR RNGET2      ; SET UP GET
381
+	JMP ENDCMD
382 382
 ;
383 383
 ; TEST FOR ALLOCATED BUFFER..
384 384
 ; ..RELATED TO SA
385 385
 ;
386 386
 BUFTST
387
- LDX F1PTR
388
- INC F1PTR
389
- LDA FILSEC,X
390
- TAY
391
- DEY
392
- DEY
393
- CPY #BAMJOB
394
- BCC BT20
387
+	LDX F1PTR
388
+	INC F1PTR
389
+	LDA FILSEC,X
390
+	TAY
391
+	DEY
392
+	DEY
393
+	CPY #BAMJOB
394
+	BCC BT20
395 395
 BT15
396
- LDA #NOCHNL
397
- JMP CMDERR
396
+	LDA #NOCHNL
397
+	JMP CMDERR
398 398
 BT20
399
- STA SA
400
- JSR FNDRCH
401
- BCS BT15
402
- JSR GETACT
403
- STA JOBNUM
404
- RTS
399
+	STA SA
400
+	JSR FNDRCH
401
+	BCS BT15
402
+	JSR GETACT
403
+	STA JOBNUM
404
+	RTS
405 405
 ;
406 406
 ; TEST BLOCK OPERATION PARMS
407 407
 ;
408 408
 BKOTST
409
- JSR BUFTST
409
+	JSR BUFTST
410 410
 ;
411 411
 ; TEST FOR LEGAL BLOCK &..
412 412
 ; ..SET UP DRV, TRK, SEC
413 413
 ;
414 414
 BLKTST
415
- LDX F1PTR
416
- LDA FILSEC,X
417
- AND #1
418
- STA DRVNUM
419
- LDA FILSEC+2,X
420
- STA SECTOR
421
- LDA FILSEC+1,X
422
- STA TRACK
415
+	LDX F1PTR
416
+	LDA FILSEC,X
417
+	AND #1
418
+	STA DRVNUM
419
+	LDA FILSEC+2,X
420
+	STA SECTOR
421
+	LDA FILSEC+1,X
422
+	STA TRACK
423 423
 BT05
424
- JSR TSCHK
425
- JMP SETLDS ; (RTS)
424
+	JSR TSCHK
425
+	JMP SETLDS      ; (RTS)
426 426
 .END

+ 42
- 42
DOS_D9065/chksum View File

@@ -1,45 +1,45 @@
1
- .PAGE 'CHECKSUM'
2
-*=$005E
3
-TEMP *=*+2
4
-*=$0500
5
- CLD
6
- SEI
7
- LDA #0
8
- STA $1000
9
- CMP $1000
1
+.PAGE 'CHECKSUM'
2
+	*=$005E
3
+TEMP	*=*+2
4
+	*=$0500
5
+	CLD
6
+	SEI
7
+	LDA #0
8
+	STA $1000
9
+	CMP $1000
10 10
 CHKPRO
11
- BNE CHKPRO
12
- LDA #$10
13
- JSR CHKSUM
14
- STA $1000
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 $1000
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
 CHKSUM
25
- CLC
26
- STA TEMP+1
27
- LDA #0
28
- STA TEMP
29
- LDX #32
30
- LDY #0
25
+	CLC
26
+	STA TEMP+1
27
+	LDA #0
28
+	STA TEMP
29
+	LDX #32
30
+	LDY #0
31 31
 CHK1
32
- ADC (TEMP)Y
33
- INY
34
- BNE CHK1
35
- INC TEMP+1
36
- DEX
37
- BNE CHK1
38
- ADC #0
39
- STA TEMP+1
40
- LDA #$C0
41
- SEC
42
- SBC TEMP+1
43
- SBC #0
44
- RTS
45
- .END
32
+	ADC (TEMP)Y
33
+	INY
34
+	BNE CHK1
35
+	INC TEMP+1
36
+	DEX
37
+	BNE CHK1
38
+	ADC #0
39
+	STA TEMP+1
40
+	LDA #$C0
41
+	SEC
42
+	SBC TEMP+1
43
+	SBC #0
44
+	RTS
45
+.END

+ 176
- 176
DOS_D9065/close View File

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

+ 108
- 108
DOS_D9065/comprs View File

</
@@ -1,122 +1,122 @@
1 1
 .PAGE 'COMPRESS DIRECTORY'
2 2
 COMPRS
3
- LDA BUFIND
4
- STA DIRBUF+1 ; USE BUFFER 0
5
- LDY #1
6
- LDA #0
7
- JSR SETBUF ; SET BUFFER 1 TO ZERO'S
8
- LDA #1
9
- STA IP
10
- LDY DRVNUM
11
- LDA DSTRK,Y ; START OF DIRECTORY (TRACK)
12
- STA TRACK
13
- LDA DSSEC,Y ; START OF DIRECTORY (SECTOR)
14
- STA SECTOR
15
- LDA #1 ; BUFFER 1 FOR NEW DIRECTORY
16
- JSR SETH ; SET HEADER FOR NEW DIRECTORY
17
- JMP COMPR1
3
+	LDA BUFIND
4
+	STA DIRBUF+1    ; USE BUFFER 0
5
+	LDY #1
6
+	LDA #0
7
+	JSR SETBUF      ; SET BUFFER 1 TO ZERO'S
8
+	LDA #1
9
+	STA IP
10
+	LDY DRVNUM
11
+	LDA DSTRK,Y     ; START OF DIRECTORY (TRACK)
12
+	STA TRACK
13
+	LDA DSSEC,Y     ; START OF DIRECTORY (SECTOR)
14
+	STA SECTOR
15
+	LDA #1          ; BUFFER 1 FOR NEW DIRECTORY
16
+	JSR SETH        ; SET HEADER FOR NEW DIRECTORY
17
+	JMP COMPR1
18 18
 COMPR0
19
- LDA TRACK
20
- BEQ COMPR5 ; DONE
19
+	LDA TRACK
20
+	BEQ COMPR5      ; DONE
21 21
 COMPR1
22
- LDA #0
23
- STA JOBNUM ; DIRECTORY IN BUFFER 0
24
- JSR SETH
25
- JSR DOREAD ; READ THE DIRECTORY
26
- LDA #0
27
- STA DIRBUF
28
- TAY
29
- LDA (DIRBUF),Y ; NEXT SECTOR LINK (TRACK)
30
- STA TRACK
31
- BEQ COMPR2 ; NO LINK
32
- INY
33
- LDA (DIRBUF),Y ; NEXT SECTOR LINK (SECTOR)
34
- STA SECTOR
35
- JSR FRETS ; FREE THESE LINKS
22
+	LDA #0
23
+	STA JOBNUM      ; DIRECTORY IN BUFFER 0
24
+	JSR SETH
25
+	JSR DOREAD      ; READ THE DIRECTORY
26
+	LDA #0
27
+	STA DIRBUF
28
+	TAY
29
+	LDA (DIRBUF),Y  ; NEXT SECTOR LINK (TRACK)
30
+	STA TRACK
31
+	BEQ COMPR2      ; NO LINK
32
+	INY
33
+	LDA (DIRBUF),Y  ; NEXT SECTOR LINK (SECTOR)
34
+	STA SECTOR
35
+	JSR FRETS       ; FREE THESE LINKS
36 36
 COMPR2
37
- LDA #2
38
- STA DIRBUF
37
+	LDA #2
38
+	STA DIRBUF
39 39
 COMPR3
40
- LDY #0
41
- LDA (DIRBUF),Y ; GET FILE STATUS
42
- BPL COMPR4 ; DELETE OR NOT CLOSED
43
- JSR ADDENT ; ADD THIS ENTRY
40
+	LDY #0
41
+	LDA (DIRBUF),Y  ; GET FILE STATUS
42
+	BPL COMPR4      ; DELETE OR NOT CLOSED
43
+	JSR ADDENT      ; ADD THIS ENTRY
44 44
 COMPR4
45
- LDA #32
46
- CLC
47
- ADC DIRBUF
48
- STA DIRBUF ; POINT TO NEXT ENTRY
49
- BCC COMPR3
50
- BCS COMPR0 ; READ THE NEXT SECTOR
45
+	LDA #32
46
+	CLC
47
+	ADC DIRBUF
48
+	STA DIRBUF      ; POINT TO NEXT ENTRY
49
+	BCC COMPR3
50
+	BCS COMPR0      ; READ THE NEXT SECTOR
51 51
 COMPR5
52
- LDA #0
53
- STA IP
54
- TAY
55
- STA (IP),Y ; TRACK LINK = 0, LAST SECTOR
56
- INY
57
- LDA #$FF
58
- STA (IP),Y ; SECTOR LINK
59
- LDA #1
60
- STA JOBNUM
61
- JMP DOWRIT ; WRITE LAST SECTOR (RTS)
52
+	LDA #0
53
+	STA IP
54
+	TAY
55
+	STA (IP),Y      ; TRACK LINK = 0, LAST SECTOR
56
+	INY
57
+	LDA #$FF
58
+	STA (IP),Y      ; SECTOR LINK
59
+	LDA #1
60
+	STA JOBNUM
61
+	JMP DOWRIT      ; WRITE LAST SECTOR (RTS)
62 62
 .PAGE 'ADD ENTRY'
63 63
 ADDENT
64
- LDY #0
65
- LDX #30 ; MOVE 30 CHARACTERS
64
+	LDY #0
65
+	LDX #30         ; MOVE 30 CHARACTERS
66 66
 ADDEN1
67
- INC IP
68
- LDA IP
69
- CMP #1
70
- BEQ ADDEN2  ; WRITE THIS SECTOR
71
- TYA
72
- PHA
73
- LDA (DIRBUF),Y
74
- LDY #0
75
- STA (IP),Y ; STORE IN NEW DIRECTORY
76
- PLA
77
- TAY
78
- INY
79
- DEX
80
- BNE ADDEN1
81
- INC IP
82
- INC IP
83
- LDA IP
84
- CMP #1
85
- BNE ADDE1
86
- DEC IP
67
+	INC IP
68
+	LDA IP
69
+	CMP #1
70
+	BEQ ADDEN2      ; WRITE THIS SECTOR