annotate level1/cmds/backup.asm @ 556:28a203bbd2cc

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