annotate level1/cmds/backup.asm @ 990:3c51c59f97c4

Small cosmetic changes
author boisy
date Fri, 21 Feb 2003 13:18:13 +0000
parents 617c1b90e623
children 84ea83668304
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * Backup - Make a backup copy of a disk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 0
diff changeset
8 * 8 From Tandy OS-9 Level One VR 02.00.00
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 nam Backup
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl Make a backup copy of a disk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Disassembled 02/04/03 23:08:04 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
19 DOHELP set 0
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
20
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 rev set $01
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 0
diff changeset
24 edition set $08
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u0000 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0001 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u0002 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u0004 rmb 5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0009 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u000A rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u000B rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u000C rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u000D rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u000E rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u000F rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u0010 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u0011 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 u0013 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 u0014 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 u0015 rmb 32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 u0035 rmb 32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u0055 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 u0057 rmb 424
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 u01FF rmb 81
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 u0250 rmb 256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 u0350 rmb 3840
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 name fcs /Backup/
200
e9ce43cc215e Made major changes to headers for consistency and identification
boisy
parents: 0
diff changeset
53 fcb edition
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 L0014 fcc "/d0 /d1"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 fcb C$CR
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
57 IFNE DOHELP
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
58 HelpMsg fcb C$LF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 fcc "Use: Backup [e] [s] [-v]"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 fcc " [/dev1 [/dev2]]"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 fcc " e - abort if read error"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 fcc " s - single drive prompts"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 fcc " -v - inhibit verify pass"
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
68 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 L00A0 fcb $8D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 L00A1 fcc "Ready to backup from"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 L00B5 fcb $A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 L00B6 fcc " to"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 fcb $A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 L00BA fcc "Ok"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 L00BC fcc " ?:"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 fcb $A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 L00C0 fcc "Ready Source, hit a key:"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 fcb $A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 L00D9 fcc "Ready Destination, hit a key:"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 fcb $A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 L00F7 fcs "Sector $"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 L00FF fcs "Sectors copied: $"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 L0112 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 fcc "Verify pass"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 fcb $8D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 L011F fcs "Sectors verified: $"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 L0132 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 fcc " is being scratched"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 fcb $8D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 L0147 fcc "Disks not formatted identically"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 L0167 fcc "Backup Aborted"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 fcb $8D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 start leas >u01FF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 tfr y,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 subd ,s++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 subd #$0250
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 sta <u0013
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 clr <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 clr <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 clr <u000C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 clr <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 leay <u0057,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 sty <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 ldd ,s++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 beq L01E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 L0199 ldd ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 cmpa #C$SPAC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 beq L0199
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 cmpa #C$COMA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 beq L0199
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 eora #'E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 bne L01B1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 cmpb #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 bcc L01B1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 inc <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 bra L0199
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 L01B1 lda -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 eora #'S
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 bne L01C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 cmpb #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 bcc L01C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 inc <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 bra L0199
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 L01C1 ldd -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 cmpa #'-
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 bne L01D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 eorb #'V
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 andb #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 bne L01D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 ldd ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 cmpb #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 bcc L01D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 inc <u000C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 bra L0199
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 L01D7 lda ,-x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 beq L01E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 cmpa #C$CR
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
145 lbne ShowHelp
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 L01E3 leax >L0014,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 L01E7 leay >L00A1,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 lbsr L044B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 ldy <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 sty <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 lbsr L043A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 L01F7 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 cmpa #C$SPAC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 beq L01F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 cmpa #C$COMA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 beq L01F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 cmpa #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 bne L020B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 inc <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 ldx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 L020B cmpa #PDELIM
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
163 lbne ShowHelp
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 leay >L00B6,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 lbsr L044B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 ldy <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 sty <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 lbsr L043A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 leay >L00BC,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 lbsr L0421
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 eora #'Y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 lbne L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 ldx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 ldd #$4020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 L0238 cmpb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 bne L0238
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 std -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 ldx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 lda #READ.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 bcs L027C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 leax >u0350,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 ldy #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 bcs L027C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 ldx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 lda #READ.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 bcs L027C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 sta <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 ldx <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 leay <u0015,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 L0267 ldb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 stb ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 cmpb #C$SPAC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 bne L0267
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 ldd #$4020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 std -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 leax <u0015,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 lda #READ.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 L027C lbcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 sta <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 clr <u000E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 clr <u000F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 clr <u0010
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 lbsr L0419
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 lda <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 leax >u0250,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 ldy #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 leau ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 puls u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 bcs L027C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 ldd >$0100,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 cmpd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 bne L02B7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 ldb >$0102,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 cmpb $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 beq L02BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 L02B7 leay >L0147,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 lbra L03B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 L02BE leax >u0250,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 lda #$BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 sta <$3F,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 leay <$1F,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 lbsr L044B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 leay >L0132,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 lbsr L0456
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 leay >L00BA,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 lbsr L0421
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 eora #'Y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 lbne L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 lda <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 leax >u0350,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 ldy #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 os9 I$Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 lbcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 leau ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 leax >u0350,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 lbcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 leax <u0015,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 lbcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 sta <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 leax <u0035,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 ldb #SS.OPT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 os9 I$GetStt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 stb $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 ldb #SS.OPT
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 os9 I$SetStt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 lbcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 L0332 leay >L00C0,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 lbsr L041D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 lda <u0013
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 sta <u0014
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 leax >u0250,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 lbsr L0403
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 lbsr L0419
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 ldd <u0011
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 leax >u0250,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 stx <u0011
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 subd <u0011
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 beq L035C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 lda <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 os9 I$Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 bcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 L035C lda <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 cmpa #E$EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 bne L0332
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 leay >L00FF,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 lbsr L0470
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 tst <u000C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 bne L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 leay >L0112,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 lbsr L0456
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 lda <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 lda <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 bcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 leax <u0015,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 lda #READ.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 bcs L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 sta <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 clr <u000E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 clr <u000F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 clr <u0010
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 clr <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L0396 lda <u0013
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 sta <u0014
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 leax >u0250,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 bsr L0403
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 lda <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 cmpa #E$EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 bne L0396
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 leay >L011F,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 lbsr L0470
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 bra L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 L03AF os9 F$PErr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 leay >L0167,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 L03B6 lbsr L0456
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 L03BA ldb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 os9 F$Exit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 L03BF ldy #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 lda <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 bcc L03DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 stb <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 cmpb #E$EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 beq L040D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 lbsr L046C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 ldb <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 tst <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 bne L03AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 os9 F$PErr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 L03DC ldd <u000F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 addd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 std <u000F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 bcc L03E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 inc <u000E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 L03E7 tst <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 beq L03FD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 ldx <u000E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 tfr b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 tfr d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 lda <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 clr <u000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 L03FD ldx <u0011
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 leax >$0100,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 L0403 stx <u0011
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 lda <u0014
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 suba #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 sta <u0014
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 bcc L03BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 L040D rts
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
362 ShowHelp equ *
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
363 IFNE DOHELP
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
364 leax <u0057,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 stx <u0055
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
366 leay >HelpMsg,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 bra L03B6
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
368 ELSE
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
369 bra L03BA
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
370 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 L0419 leay >L00D9,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 L041D tst <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 beq L0439
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 L0421 bsr L0456
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 leax ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 ldy #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 leay >L00A0,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 bsr L0456
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 puls y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 L0439 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 L043A pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 puls x
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 200
diff changeset
388 bcs ShowHelp
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 L0443 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 bsr L04A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 bpl L0443
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 L044B lda ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 bsr L04A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 lda ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 bpl L044B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 L0455 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 L0456 bsr L044B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 pshs y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 ldd <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 leax <u0057,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 stx <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 subd <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408 os9 I$WritLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 puls pc,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 L046C leay >L00F7,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 L0470 bsr L044B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 lda <u000E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 bsr L0486
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 inc <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 lda <u000F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 bsr L0488
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 lda <u0010
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 bsr L0488
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 leay >L00B5,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 bra L0456
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 L0486 clr <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 L0488 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 bsr L0494
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 anda #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 L0494 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 beq L0499
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 sta <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 L0499 tst <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 beq L0455
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 adda #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 cmpa #$39
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 bls L04A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 adda #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 L04A5 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 ldx <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 stx <u0055
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 end