Browse Source

reindented DOS_4040 to approximate the LST output of the assembler

master
Michael Steil 2 years ago
parent
commit
7599baed0d
56 changed files with 6661 additions and 6661 deletions
  1. 105
    105
      DOS_4040/addfil
  2. 144
    144
      DOS_4040/addrel
  3. 35
    35
      DOS_4040/autoit
  4. 60
    60
      DOS_4040/bas4.a
  5. 382
    382
      DOS_4040/block
  6. 50
    50
      DOS_4040/chksum
  7. 223
    223
      DOS_4040/close
  8. 84
    84
      DOS_4040/copyall
  9. 53
    53
      DOS_4040/copysetup
  10. 3
    3
      DOS_4040/dos
  11. 245
    245
      DOS_4040/dskint
  12. 123
    123
      DOS_4040/duplct
  13. 2
    2
      DOS_4040/echksm
  14. 58
    58
      DOS_4040/equate
  15. 243
    243
      DOS_4040/erproc
  16. 124
    124
      DOS_4040/fndrel
  17. 32
    32
      DOS_4040/frets
  18. 21
    21
      DOS_4040/getact
  19. 44
    44
      DOS_4040/i_odef
  20. 54
    54
      DOS_4040/idle
  21. 189
    189
      DOS_4040/ieee
  22. 194
    194
      DOS_4040/init
  23. 80
    80
      DOS_4040/jobs
  24. 306
    306
      DOS_4040/lookup
  25. 123
    123
      DOS_4040/lstdir
  26. 54
    54
      DOS_4040/master
  27. 54
    54
      DOS_4040/mcopy.nl
  28. 52
    52
      DOS_4040/memrw
  29. 94
    94
      DOS_4040/new
  30. 87
    87
      DOS_4040/newss
  31. 35
    35
      DOS_4040/nulbuf
  32. 358
    358
      DOS_4040/opchnl
  33. 370
    370
      DOS_4040/open
  34. 209
    209
      DOS_4040/parsex
  35. 139
    139
      DOS_4040/ramvar
  36. 110
    110
      DOS_4040/record
  37. 82
    82
      DOS_4040/rel1
  38. 74
    74
      DOS_4040/rel2
  39. 38
    38
      DOS_4040/rel3
  40. 45
    45
      DOS_4040/rel4
  41. 172
    172
      DOS_4040/rename
  42. 48
    48
      DOS_4040/romtbl
  43. 67
    67
      DOS_4040/scrtch
  44. 99
    99
      DOS_4040/setdrv
  45. 32
    32
      DOS_4040/ssend
  46. 23
    23
      DOS_4040/sstest
  47. 106
    106
      DOS_4040/ssutil
  48. 226
    226
      DOS_4040/trnsfr
  49. 356
    356
      DOS_4040/tst2
  50. 162
    162
      DOS_4040/tst3
  51. 173
    173
      DOS_4040/tst4
  52. 46
    46
      DOS_4040/tstflg
  53. 166
    166
      DOS_4040/tstfnd
  54. 88
    88
      DOS_4040/tsutil
  55. 18
    18
      DOS_4040/vector
  56. 101
    101
      DOS_4040/verdir

+ 105
- 105
DOS_4040/addfil View File

@@ -1,108 +1,108 @@
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 FILDAT
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 FILDAT
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
- AND #$1F
95
- STA FILENT
96
- LDA DELIND
97
- AND #$E0
98
- ORA FILENT
99
- STA FILENT
100
- STA DIRENT,X
101
- LDA TYPE
102
- ASL A
103
- AND #$1E
104
- ORA DRVNUM
105
- STA FILDAT
106
- 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
+	AND #$1F
95
+	STA FILENT
96
+	LDA DELIND
97
+	AND #$E0
98
+	ORA FILENT
99
+	STA FILENT
100
+	STA DIRENT,X
101
+	LDA TYPE
102
+	ASL A
103
+	AND #$1E
104
+	ORA DRVNUM
105
+	STA FILDAT
106
+	RTS
107 107
 ;
108
- .END
108
+.END

+ 144
- 144
DOS_4040/addrel View File

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

+ 35
- 35
DOS_4040/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,40 +11,40 @@
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
- LDA JOBNUM ;RETRIEVE JOB
46
- JSR SETH ;SO CAN SET RESTORE ALL
47
- RTS ;SAME ID
48
-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
+	LDA JOBNUM      ;RETRIEVE JOB
46
+	JSR SETH        ;SO CAN SET RESTORE ALL
47
+	RTS             ;SAME ID
48
+CATID1	JMP INITDR      ;DIFF SO INIT
49 49
 ;
50 50
 .END

+ 60
- 60
DOS_4040/bas4.a View File

@@ -1,62 +1,62 @@
1 1
 ;>S0:BAS4.A
2 2
 ;CPUT"0:BAS4.A"
3
-BAS2 = 1
4
-BAS4 = 0
5
- .OPT LST,NOSYMBOL
6
- .LIB HEADER.A
7
- .LIB MISC.A
8
- .LIB ASC.A
9
- .LIB EQU.A
10
- .LIB IO.A
11
- .LIB TOKENS.A
12
- *=$B000
13
- .LIB JMPTAB.A
14
- .LIB KWORDS.A
15
- .LIB BASMSG.A
16
- .LIB SUBS.A
17
- .LIB BASMON.A
18
- .LIB NEW.A
19
- .LIB LIST.A
20
- .LIB FOR.A
21
- .LIB EXEC.A
22
- .LIB STATS.A
23
- .LIB LET.A
24
- .LIB PRINT.A
25
- .LIB IGR.A
26
- .LIB NEXT.A
27
- .LIB EVAL.A
28
- .LIB OAC.A
29
- .LIB EVLVAR.A
30
- .LIB FRE-POS.A
31
- .LIB FN.A
32
- .LIB STR.A
33
- .LIB FP.A
34
- .LIB INITBA.A
35
- .LIB MON2.A
36
- .LIB MON1.A
37
- .LIB DISK.A
38
- .LIB INITOS.A
39
- .LIB SCREEN.A
40
- .LIB IRQ.A
41
- .LIB DISP.A
42
- .LIB TAB.A
43
- *=$F000
44
- .LIB SYSMSG.A
45
- .LIB IEEE.A
46
- .LIB CIO.A
47
- .LIB CLOSE.A
48
- .LIB LOAD.A
49
- .LIB OPEN.A
50
- .LIB TAPE1.A
51
- .LIB SYS.A
52
- .LIB SAVE.A
53
- .LIB CLOCK.A
54
- .LIB IOCHN.A
55
- .LIB TAPE2.A
56
- .LIB TRW.A
57
- .LIB RESET.A
58
- *=$FF93
59
- .LIB JMPVEC.A
60
- *=$FFFA
61
- .LIB HWVEC.A
62
- .END
3
+BAS2	= 1
4
+BAS4	= 0
5
+.OPT LST,NOSYMBOL
6
+.LIB HEADER.A
7
+.LIB MISC.A
8
+.LIB ASC.A
9
+.LIB EQU.A
10
+.LIB IO.A
11
+.LIB TOKENS.A
12
+	*=$B000
13
+.LIB JMPTAB.A
14
+.LIB KWORDS.A
15
+.LIB BASMSG.A
16
+.LIB SUBS.A
17
+.LIB BASMON.A
18
+.LIB NEW.A
19
+.LIB LIST.A
20
+.LIB FOR.A
21
+.LIB EXEC.A
22
+.LIB STATS.A
23
+.LIB LET.A
24
+.LIB PRINT.A
25
+.LIB IGR.A
26
+.LIB NEXT.A
27
+.LIB EVAL.A
28
+.LIB OAC.A
29
+.LIB EVLVAR.A
30
+.LIB FRE-POS.A
31
+.LIB FN.A
32
+.LIB STR.A
33
+.LIB FP.A
34
+.LIB INITBA.A
35
+.LIB MON2.A
36
+.LIB MON1.A
37
+.LIB DISK.A
38
+.LIB INITOS.A
39
+.LIB SCREEN.A
40
+.LIB IRQ.A
41
+.LIB DISP.A
42
+.LIB TAB.A
43
+	*=$F000
44
+.LIB SYSMSG.A
45
+.LIB IEEE.A
46
+.LIB CIO.A
47
+.LIB CLOSE.A
48
+.LIB LOAD.A
49
+.LIB OPEN.A
50
+.LIB TAPE1.A
51
+.LIB SYS.A
52
+.LIB SAVE.A
53
+.LIB CLOCK.A
54
+.LIB IOCHN.A
55
+.LIB TAPE2.A
56
+.LIB TRW.A
57
+.LIB RESET.A
58
+	*=$FF93
59
+.LIB JMPVEC.A
60
+	*=$FFFA
61
+.LIB HWVEC.A
62
+.END

+ 382
- 382
DOS_4040/block View File

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

+ 50
- 50
DOS_4040/chksum View File

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

+ 223
- 223
DOS_4040/close View File

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

+ 84
- 84
DOS_4040/copyall View File

@@ -2,99 +2,99 @@
2 2
 ;
3 3
 ; COPY DISK TO DISK ROUTINES
4 4
 ;
5
-CPYDTD LDA FILTBL+1 ;SAVE IN TEMP
6
- STA TEMP
7
- LDY #40 ;40 CHAR BUFFER
8
- LDX CMDSIZ ;PREP TO MOVE
9
- STY CMDSIZ ;END OF FILENAME2
10
-MOVLP1 DEY
11
- DEX
12
- LDA CMDBUF,X ;MOV FN LIFO
13
- STA CMDBUF,Y
14
- CPX TEMP ;ACTUAL F2 VAL
15
- BNE MOVLP1
16
- STY FILTBL+1 ;POINTER TO F2
17
-MOVLP2 JSR OPTSCH
18
- JSR PUPS1 ;SETUP FIRST PASS
19
- JSR FFST ;FIRST MATCH
20
- BPL FIXIT ;ENTRY FOUND?
21
- BMI ENDIT ;NO
5
+CPYDTD	LDA FILTBL+1    ;SAVE IN TEMP
6
+	STA TEMP
7
+	LDY #40         ;40 CHAR BUFFER
8
+	LDX CMDSIZ      ;PREP TO MOVE
9
+	STY CMDSIZ      ;END OF FILENAME2
10
+MOVLP1	DEY
11
+	DEX
12
+	LDA CMDBUF,X    ;MOV FN LIFO
13
+	STA CMDBUF,Y
14
+	CPX TEMP        ;ACTUAL F2 VAL
15
+	BNE MOVLP1
16
+	STY FILTBL+1    ;POINTER TO F2
17
+MOVLP2	JSR OPTSCH
18
+	JSR PUPS1       ;SETUP FIRST PASS
19
+	JSR FFST        ;FIRST MATCH
20
+	BPL FIXIT       ;ENTRY FOUND?
21
+	BMI ENDIT       ;NO
22 22
 ;
23
-EXLP0 PLA ;PULL NEEDED VARS
24
- STA DIRSEC
25
- PLA
26
- STA FILTBL+1
27
- PLA
28
- STA LSTBUF
29
- PLA
30
- STA FILCNT
31
- PLA
32
- STA INDEX
33
- PLA
34
- STA FOUND
35
- PLA
36
- STA DELIND
37
- PLA
38
- STA DRVFLG
23
+EXLP0	PLA             ;PULL NEEDED VARS
24
+	STA DIRSEC
25
+	PLA
26
+	STA FILTBL+1
27
+	PLA
28
+	STA LSTBUF
29
+	PLA
30
+	STA FILCNT
31
+	PLA
32
+	STA INDEX
33
+	PLA
34
+	STA FOUND
35
+	PLA
36
+	STA DELIND
37
+	PLA
38
+	STA DRVFLG
39 39
 ;
40
-EXLP1 JSR PUPS1 ;SET UP VARS
41
- JSR FFRE ;NEXT MATCH
42
- BPL FIXIT ;FOUND ONE?
43
-ENDIT JMP ENDCMD ;NO! SO BYE
40
+EXLP1	JSR PUPS1       ;SET UP VARS
41
+	JSR FFRE        ;NEXT MATCH
42
+	BPL FIXIT       ;FOUND ONE?
43
+ENDIT	JMP ENDCMD      ;NO! SO BYE
44 44
 ;
45
-FIXIT LDA DRVFLG ;PUSH NEEDED VARS
46
- PHA
47
- LDA DELIND
48
- PHA
49
- LDA FOUND
50
- PHA
51
- LDA INDEX
52
- PHA
53
- LDA FILCNT
54
- PHA
55
- LDA LSTBUF
56
- PHA
57
- LDA FILTBL+1
58
- PHA
59
- LDA DIRSEC
60
- PHA
45
+FIXIT	LDA DRVFLG      ;PUSH NEEDED VARS
46
+	PHA
47
+	LDA DELIND
48
+	PHA
49
+	LDA FOUND
50
+	PHA
51
+	LDA INDEX
52
+	PHA
53
+	LDA FILCNT
54
+	PHA
55
+	LDA LSTBUF
56
+	PHA
57
+	LDA FILTBL+1
58
+	PHA
59
+	LDA DIRSEC
60
+	PHA
61 61
 ;
62
-EXLP2 JSR TRFNME ;TRANSFER NAME
63
- LDA #1 ;FAKE OUT LOOKUP
64
- STA F1CNT
65
- STA F2CNT
66
- JSR LOOKUP
67
- LDA #1
68
- STA F1CNT
69
- LDA #2 ;REAL
70
- STA F2CNT
71
- JSR CY ;COPY IT
72
- JMP EXLP0 ;NEXT ONE FOLKS
62
+EXLP2	JSR TRFNME      ;TRANSFER NAME
63
+	LDA #1          ;FAKE OUT LOOKUP
64
+	STA F1CNT
65
+	STA F2CNT
66
+	JSR LOOKUP
67
+	LDA #1
68
+	STA F1CNT
69
+	LDA #2          ;REAL
70
+	STA F2CNT
71
+	JSR CY          ;COPY IT
72
+	JMP EXLP0       ;NEXT ONE FOLKS
73 73
 ;
74 74
 ; TRANSFER NAME (DIRBUF) TO CMDBUF
75 75
 ;
76
-TRFNME LDY #3 ;BOTH INDEXES
77
- STY FILTBL ;BEGINING OF FILENAME1
78
-TRF0 LDA (DIRBUF)Y ;MOVE IT
79
- STA CMDBUF,Y
80
- INY
81
- CPY #19 ;ALL 16 CHARS PASSED?
82
- BNE TRF0
83
- RTS
76
+TRFNME	LDY #3          ;BOTH INDEXES
77
+	STY FILTBL      ;BEGINING OF FILENAME1
78
+TRF0	LDA (DIRBUF)Y   ;MOVE IT
79
+	STA CMDBUF,Y
80
+	INY
81
+	CPY #19         ;ALL 16 CHARS PASSED?
82
+	BNE TRF0
83
+	RTS
84 84
 ;
85 85
 ; SET UP SUBROUTINE
86 86
 ;
87
-PUPS1 LDA #0
88
- STA DRVCNT
89
- STA FILTRK
90
- STA FILTRK+1
91
- LDA FILDAT+1 ;GET DRIVE NUMBER
92
- AND #1 ;ONLY
93
- STA DRVNUM
94
- ORA #1
95
- STA DELSEC ;NONZERO
96
- LDA FILTBL+1 ;FN1=FN2
97
- STA FILTBL
98
- RTS
87
+PUPS1	LDA #0
88
+	STA DRVCNT
89
+	STA FILTRK
90
+	STA FILTRK+1
91
+	LDA FILDAT+1    ;GET DRIVE NUMBER
92
+	AND #1          ;ONLY
93
+	STA DRVNUM
94
+	ORA #1
95
+	STA DELSEC      ;NONZERO
96
+	LDA FILTBL+1    ;FN1=FN2
97
+	STA FILTBL
98
+	RTS
99 99
 ;
100 100
 .END

+ 53
- 53
DOS_4040/copysetup View File

@@ -4,61 +4,61 @@
4 4
 ; AND PARSES SPECIAL CASE
5 5
 ;
6 6
 DSKCPY
7
- JSR PRSCLN ;FIND ":"
8
- BNE DX0000
7
+	JSR PRSCLN      ;FIND ":"
8
+	BNE DX0000
9 9
 ;
10
- JSR PRSEQ
10
+	JSR PRSEQ
11 11
 ;
12
- LDA #'* ;CPY ALL
13
- LDX #39 ;PUT AT BUFFER END
14
- STX FILTBL+1
15
- STA CMDBUF,X ;PLACE *
16
- INX
17
- STX CMDSIZ
18
- LDX #1 ;SET UP CNT'S
19
- STX F1CNT
20
- INX
21
- STX F2CNT
22
- JMP MOVLP2 ;ENTER ROUTINE
12
+	LDA #'*         ;CPY ALL
13
+	LDX #39         ;PUT AT BUFFER END
14
+	STX FILTBL+1
15
+	STA CMDBUF,X    ;PLACE *
16
+	INX
17
+	STX CMDSIZ
18
+	LDX #1          ;SET UP CNT'S
19
+	STX F1CNT
20
+	INX
21
+	STX F2CNT
22
+	JMP MOVLP2      ;ENTER ROUTINE
23 23
 ;
24
-DX0000 JSR TC30 ;NORMAL PARSE
25
-DX0005 JSR ALLDRS ;PUT DRV'S IN FILTBL
26
- LDA IMAGE ;GET PARSE IMAGE
27
- AND #%01010101 ;VAL FOR PATT COPY
28
- BNE DX0020 ;MUST BE CONCAT OR NORMAL
29
- LDX FILTBL ;CHK FOR *
30
- LDA CMDBUF,X
31
- CMP #'*
32
- BNE DX0020
33
- LDX #1 ;SET CNT'S
34
- STX F1CNT
35
- INX
36
- STX F2CNT
37
- JMP CPYDTD ;GO COPY
38
-DX0010 LDA #BADSYN ;SYNTAX ERROR
39
- JMP CMDERR
40
-DX0020 LDA IMAGE ;CHK FOR NORMAL
41
- AND #%11011001
42
- BNE DX0010
43
- JMP COPY
24
+DX0000	JSR TC30        ;NORMAL PARSE
25
+DX0005	JSR ALLDRS      ;PUT DRV'S IN FILTBL
26
+	LDA IMAGE       ;GET PARSE IMAGE
27
+	AND #%01010101  ;VAL FOR PATT COPY
28
+	BNE DX0020      ;MUST BE CONCAT OR NORMAL
29
+	LDX FILTBL      ;CHK FOR *
30
+	LDA CMDBUF,X
31
+	CMP #'*
32
+	BNE DX0020
33
+	LDX #1          ;SET CNT'S
34
+	STX F1CNT
35
+	INX
36
+	STX F2CNT
37
+	JMP CPYDTD      ;GO COPY
38
+DX0010	LDA #BADSYN     ;SYNTAX ERROR
39
+	JMP CMDERR
40
+DX0020	LDA IMAGE       ;CHK FOR NORMAL
41
+	AND #%11011001
42
+	BNE DX0010
43
+	JMP COPY
44 44
 ;
45 45
 PRSEQ
46
- LDA #'= ;SPECIAL CASE
47
- JSR PARSE
48
- BNE X0020
49
-X0015 LDA #BADSYN
50
- JMP CMDERR
51
-X0020 LDA CMDBUF,Y
52
- JSR TST0V1
53
- BMI X0015
54
- STA FILDAT+1 ;SRC DRV
55
- DEY
56
- DEY
57
- LDA CMDBUF,Y
58
- JSR TST0V1
59
- BMI X0015
60
- CMP FILDAT+1 ;CANNOT BE EQUAL
61
- BEQ X0015
62
- STA FILDAT ;DEST DRV
63
- RTS
64
- .END
46
+	LDA #'=         ;SPECIAL CASE
47
+	JSR PARSE
48
+	BNE X0020
49
+X0015	LDA #BADSYN
50
+	JMP CMDERR
51
+X0020	LDA CMDBUF,Y
52
+	JSR TST0V1
53
+	BMI X0015
54
+	STA FILDAT+1    ;SRC DRV
55
+	DEY
56
+	DEY
57
+	LDA CMDBUF,Y
58
+	JSR TST0V1
59
+	BMI X0015
60
+	CMP FILDAT+1    ;CANNOT BE EQUAL
61
+	BEQ X0015
62
+	STA FILDAT      ;DEST DRV
63
+	RTS
64
+.END

+ 3
- 3
DOS_4040/dos View File

@@ -1,4 +1,4 @@
1
- .SKI 3
1
+.SKI 3
2 2
 ;**************************************;
3 3
 ;*                                    *;
4 4
 ;*       2030/2040 DUAL FLOPPY        *;
@@ -14,5 +14,5 @@
14 14
 ;*                                    *;
15 15
 ;*                                    *;
16 16
 ;**************************************;
17
- .SKIP 5
18
- .END
17
+.SKIP 5
18
+.END

+ 245
- 245
DOS_4040/dskint View File

@@ -1,56 +1,56 @@
1
- .PAGE 'DSKINT'
1
+.PAGE 'DSKINT'
2 2
 ;
3 3
 ; ERROR DISPLAY ROUTINE
4 4
 ; BLINKS THE (ERROR #)+1 IN ALL THREE LEDS
5 5
 ;
6
-TABJMP SEI
7
- LDA #0
8
- STA $403
9
- JMP $FC04 ;JMP TO WAIT LOOP
10
-;
11
-PEZRO LDX #0 ;ERROR #1 FOR ZERO PAGE
12
- .BYTE $2C ;SKIP NEXT TWO BYTES
13
-PERR LDX TEMP ;GET ERROR #
14
- TXS ;USE STACK AS STORAGE REG.
15
-PE20 TSX ;RESTORE ERROR #
16
-PE30 LDA #ERRLED+LED0+LED1
17