0
|
1 ********************************************************************
|
|
2 * Copy - Copy data from one path to another
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 7 Original Microware distribution version
|
|
9
|
|
10 nam Copy
|
|
11 ttl Copy data from one path to another
|
|
12
|
|
13 * Disassembled 02/04/03 23:12:01 by Disasm v1.6 (C) 1988 by RML
|
|
14
|
|
15 ifp1
|
|
16 use os9defs
|
|
17 endc
|
|
18 tylg set Prgrm+Objct
|
|
19 atrv set ReEnt+rev
|
|
20 rev set $01
|
|
21 mod eom,name,tylg,atrv,start,size
|
|
22 u0000 rmb 1
|
|
23 u0001 rmb 1
|
|
24 u0002 rmb 1
|
|
25 u0003 rmb 1
|
|
26 u0004 rmb 2
|
|
27 u0006 rmb 2
|
|
28 u0008 rmb 2
|
|
29 u000A rmb 2
|
|
30 u000C rmb 2
|
|
31 u000E rmb 1
|
|
32 u000F rmb 1
|
|
33 u0010 rmb 496
|
|
34 u0200 rmb 256
|
|
35 u0300 rmb 4096
|
|
36 size equ .
|
|
37 name equ *
|
|
38 fcs /Copy/
|
|
39 fcb $07
|
|
40 L0012 fcb $52 R
|
|
41 fcb $65 e
|
|
42 fcb $61 a
|
|
43 fcb $64 d
|
|
44 fcb $79 y
|
|
45 fcb $20
|
|
46 fcb $53 S
|
|
47 fcb $4F O
|
|
48 fcb $55 U
|
|
49 fcb $52 R
|
|
50 fcb $43 C
|
|
51 fcb $45 E
|
|
52 fcb $2C ,
|
|
53 fcb $20
|
|
54 fcb $68 h
|
|
55 fcb $69 i
|
|
56 fcb $74 t
|
|
57 fcb $20
|
|
58 fcb $43 C
|
|
59 fcb $20
|
|
60 fcb $74 t
|
|
61 fcb $6F o
|
|
62 fcb $20
|
|
63 fcb $63 c
|
|
64 fcb $6F o
|
|
65 fcb $6E n
|
|
66 fcb $74 t
|
|
67 fcb $69 i
|
|
68 fcb $6E n
|
|
69 fcb $75 u
|
|
70 fcb $65 e
|
|
71 fcb $3A :
|
|
72 fcb $20
|
|
73 L0033 fcb $52 R
|
|
74 fcb $65 e
|
|
75 fcb $61 a
|
|
76 fcb $64 d
|
|
77 fcb $79 y
|
|
78 fcb $20
|
|
79 fcb $44 D
|
|
80 fcb $45 E
|
|
81 fcb $53 S
|
|
82 fcb $54 T
|
|
83 fcb $49 I
|
|
84 fcb $4E N
|
|
85 fcb $41 A
|
|
86 fcb $54 T
|
|
87 fcb $49 I
|
|
88 fcb $4F O
|
|
89 fcb $4E N
|
|
90 fcb $2C ,
|
|
91 fcb $20
|
|
92 fcb $68 h
|
|
93 fcb $69 i
|
|
94 fcb $74 t
|
|
95 fcb $20
|
|
96 fcb $43 C
|
|
97 fcb $20
|
|
98 fcb $74 t
|
|
99 fcb $6F o
|
|
100 fcb $20
|
|
101 fcb $63 c
|
|
102 fcb $6F o
|
|
103 fcb $6E n
|
|
104 fcb $74 t
|
|
105 fcb $69 i
|
|
106 fcb $6E n
|
|
107 fcb $75 u
|
|
108 fcb $65 e
|
|
109 fcb $3A :
|
|
110 fcb $20
|
|
111 L0059 fcb $0D
|
|
112 L005A fcb $55 U
|
|
113 fcb $73 s
|
|
114 fcb $65 e
|
|
115 fcb $3A :
|
|
116 fcb $20
|
|
117 fcb $43 C
|
|
118 fcb $6F o
|
|
119 fcb $70 p
|
|
120 fcb $79 y
|
|
121 fcb $20
|
|
122 fcb $3C <
|
|
123 fcb $50 P
|
|
124 fcb $61 a
|
|
125 fcb $74 t
|
|
126 fcb $68 h
|
|
127 fcb $31 1
|
|
128 fcb $3E >
|
|
129 fcb $20
|
|
130 fcb $3C <
|
|
131 fcb $50 P
|
|
132 fcb $61 a
|
|
133 fcb $74 t
|
|
134 fcb $68 h
|
|
135 fcb $32 2
|
|
136 fcb $3E >
|
|
137 fcb $20
|
|
138 fcb $5B [
|
|
139 fcb $2D -
|
|
140 fcb $73 s
|
|
141 fcb $5D ]
|
|
142 fcb $0A
|
|
143 fcb $20
|
|
144 fcb $20
|
|
145 fcb $2D -
|
|
146 fcb $73 s
|
|
147 fcb $20
|
|
148 fcb $3D =
|
|
149 fcb $20
|
|
150 fcb $73 s
|
|
151 fcb $69 i
|
|
152 fcb $6E n
|
|
153 fcb $67 g
|
|
154 fcb $6C l
|
|
155 fcb $65 e
|
|
156 fcb $20
|
|
157 fcb $64 d
|
|
158 fcb $72 r
|
|
159 fcb $69 i
|
|
160 fcb $76 v
|
|
161 fcb $65 e
|
|
162 fcb $20
|
|
163 fcb $63 c
|
|
164 fcb $6F o
|
|
165 fcb $70 p
|
|
166 fcb $79 y
|
|
167 fcb $20
|
|
168 fcb $28 (
|
|
169 fcb $50 P
|
|
170 fcb $61 a
|
|
171 fcb $74 t
|
|
172 fcb $68 h
|
|
173 fcb $32 2
|
|
174 fcb $20
|
|
175 fcb $6D m
|
|
176 fcb $75 u
|
|
177 fcb $73 s
|
|
178 fcb $74 t
|
|
179 fcb $20
|
|
180 fcb $62 b
|
|
181 fcb $65 e
|
|
182 fcb $20
|
|
183 fcb $63 c
|
|
184 fcb $6F o
|
|
185 fcb $6D m
|
|
186 fcb $70 p
|
|
187 fcb $6C l
|
|
188 fcb $65 e
|
|
189 fcb $74 t
|
|
190 fcb $65 e
|
|
191 fcb $20
|
|
192 fcb $70 p
|
|
193 fcb $61 a
|
|
194 fcb $74 t
|
|
195 fcb $68 h
|
|
196 fcb $6C l
|
|
197 fcb $69 i
|
|
198 fcb $73 s
|
|
199 fcb $74 t
|
|
200 fcb $29 )
|
|
201 fcb $0D
|
|
202 L00B4 fcb $07
|
|
203 fcb $45 E
|
|
204 fcb $72 r
|
|
205 fcb $72 r
|
|
206 fcb $6F o
|
|
207 fcb $72 r
|
|
208 fcb $20
|
|
209 fcb $2D -
|
|
210 fcb $20
|
|
211 fcb $77 w
|
|
212 fcb $72 r
|
|
213 fcb $69 i
|
|
214 fcb $74 t
|
|
215 fcb $65 e
|
|
216 fcb $20
|
|
217 fcb $76 v
|
|
218 fcb $65 e
|
|
219 fcb $72 r
|
|
220 fcb $69 i
|
|
221 fcb $66 f
|
|
222 fcb $69 i
|
|
223 fcb $63 c
|
|
224 fcb $61 a
|
|
225 fcb $74 t
|
|
226 fcb $69 i
|
|
227 fcb $6F o
|
|
228 fcb $6E n
|
|
229 fcb $20
|
|
230 fcb $66 f
|
|
231 fcb $61 a
|
|
232 fcb $69 i
|
|
233 fcb $6C l
|
|
234 fcb $65 e
|
|
235 fcb $64 d
|
|
236 fcb $2E .
|
|
237 fcb $0D
|
|
238 start equ *
|
|
239 leas >u0200,u
|
|
240 pshs u
|
|
241 leau <u0010,u
|
|
242 L00E1 clr ,-u
|
|
243 cmpu ,s
|
|
244 bhi L00E1
|
|
245 tfr y,d
|
|
246 subd ,s++
|
|
247 subd #$0300
|
|
248 clrb
|
|
249 std <u0004
|
|
250 pshs x
|
|
251 L00F4 lda ,x+
|
|
252 cmpa #$2D
|
|
253 beq L0100
|
|
254 cmpa #$0D
|
|
255 bne L00F4
|
|
256 bra L0113
|
|
257 L0100 ldd ,x+
|
|
258 eora #$53
|
|
259 anda #$DF
|
|
260 bne L0110
|
|
261 cmpb #$30
|
|
262 bcc L0110
|
|
263 inc <u000E
|
|
264 bra L00F4
|
|
265 L0110 lbra L0276
|
|
266 L0113 puls x
|
|
267 lda #$01
|
|
268 os9 I$Open
|
|
269 bcc L0125
|
|
270 cmpb #$D7
|
|
271 lbeq L0276
|
|
272 lbra L027D
|
|
273 L0125 sta <u0000
|
|
274 tst <u000E
|
|
275 beq L0135
|
|
276 lda ,x
|
|
277 ldb #$D7
|
|
278 cmpa #$2F
|
|
279 lbne L027D
|
|
280 L0135 pshs x
|
|
281 lda <u0000
|
|
282 leax <u0010,u
|
|
283 ldb #$00
|
|
284 os9 I$GetStt
|
|
285 lbcs L027D
|
|
286 lda ,x
|
|
287 sta <u0002
|
|
288 ldb #$0F
|
|
289 cmpa #$01
|
|
290 bne L0165
|
|
291 pshs u,x
|
|
292 lda <u0000
|
|
293 ldb #$02
|
|
294 os9 I$GetStt
|
|
295 lbcs L027D
|
|
296 stx <u0006
|
|
297 stu <u0008
|
|
298 puls u,x
|
|
299 ldb <$13,x
|
|
300 L0165 stb <u000F
|
|
301 puls x
|
|
302 lda #$01
|
|
303 lbsr L028A
|
|
304 lda #$03
|
|
305 ldb <u000F
|
|
306 os9 I$Create
|
|
307 bcc L0184
|
|
308 inc <u0003
|
|
309 lda #$02
|
|
310 ldb <u000F
|
|
311 os9 I$Create
|
|
312 lbcs L027D
|
|
313 L0184 sta <u0001
|
|
314 leax <u0010,u
|
|
315 ldb #$00
|
|
316 os9 I$GetStt
|
|
317 lbcs L027D
|
|
318 ldb ,x
|
|
319 cmpb #$01
|
|
320 beq L019C
|
|
321 inc <u0003
|
|
322 bra L01DD
|
|
323 L019C tst <u0003
|
|
324 bne L01AD
|
|
325 ldb #$01
|
|
326 stb $08,x
|
|
327 ldb #$00
|
|
328 os9 I$SetStt
|
|
329 lbcs L027D
|
|
330 L01AD lda <u0002
|
|
331 cmpa #$01
|
|
332 bne L01DD
|
|
333 pshs u
|
|
334 lda <u0001
|
|
335 ldb #$02
|
|
336 ldx <u0006
|
|
337 ldu <u0008
|
|
338 os9 I$SetStt
|
|
339 lbcs L027D
|
|
340 puls u
|
|
341 leax <u0010,u
|
|
342 ldy #$0010
|
|
343 lda <u0000
|
|
344 ldb #$0F
|
|
345 os9 I$GetStt
|
|
346 bcs L01DD
|
|
347 lda <u0001
|
|
348 ldb #$0F
|
|
349 os9 I$SetStt
|
|
350 L01DD leax >u0300,u
|
|
351 clra
|
|
352 lbsr L028A
|
|
353 lda <u0000
|
|
354 ldy <u0004
|
|
355 os9 I$Read
|
|
356 bcs L025A
|
|
357 lda #$01
|
|
358 lbsr L028A
|
|
359 lda <u0001
|
|
360 os9 I$Write
|
|
361 lbcs L027D
|
|
362 tst <u0003
|
|
363 bne L024D
|
|
364 pshs u,y
|
|
365 ldx <u000A
|
|
366 ldu <u000C
|
|
367 lda <u0001
|
|
368 os9 I$Seek
|
|
369 bcs L027D
|
|
370 ldu $02,s
|
|
371 leau >u0300,u
|
|
372 ldd ,s
|
|
373 addd <u000C
|
|
374 std <u000C
|
|
375 ldd ,s
|
|
376 bcc L0222
|
|
377 leax $01,x
|
|
378 stx <u000A
|
|
379 L0222 ldy #$0100
|
|
380 std ,s
|
|
381 tsta
|
|
382 bne L022D
|
|
383 tfr d,y
|
|
384 L022D ldx $02,s
|
|
385 leax >$0200,x
|
|
386 lda <u0001
|
|
387 os9 I$Read
|
|
388 bcs L027D
|
|
389 L023A lda ,u+
|
|
390 cmpa ,x+
|
|
391 bne L026B
|
|
392 leay -$01,y
|
|
393 bne L023A
|
|
394 ldd ,s
|
|
395 subd #$0100
|
|
396 bhi L0222
|
|
397 puls u,y
|
|
398 L024D lda <u0000
|
|
399 ldb #$06
|
|
400 os9 I$GetStt
|
|
401 bcc L01DD
|
|
402 cmpb #$D3
|
|
403 beq L0262
|
|
404 L025A cmpb #$D3
|
|
405 bne L027D
|
|
406 lda #$01
|
|
407 bsr L028A
|
|
408 L0262 lda <u0001
|
|
409 os9 I$Close
|
|
410 bcc L027C
|
|
411 bra L027D
|
|
412 L026B leax >L00B4,pcr
|
|
413 bsr L0280
|
|
414 comb
|
|
415 ldb #$01
|
|
416 bra L027D
|
|
417 L0276 leax >L005A,pcr
|
|
418 bsr L0280
|
|
419 L027C clrb
|
|
420 L027D os9 F$Exit
|
|
421 L0280 ldy #$0100
|
|
422 L0284 lda #$01
|
|
423 os9 I$WritLn
|
|
424 rts
|
|
425 L028A tst <u000E
|
|
426 beq L02C7
|
|
427 pshs y,x
|
|
428 L0290 pshs a
|
|
429 tsta
|
|
430 bne L029F
|
|
431 leax >L0012,pcr
|
|
432 ldy #$0021
|
|
433 bra L02A7
|
|
434 L029F leax >L0033,pcr
|
|
435 ldy #$0026
|
|
436 L02A7 bsr L0284
|
|
437 leax ,-s
|
|
438 ldy #$0001
|
|
439 clra
|
|
440 os9 I$Read
|
|
441 lda ,s+
|
|
442 eora #$43
|
|
443 anda #$DF
|
|
444 beq L02C1
|
|
445 bsr L02C8
|
|
446 puls a
|
|
447 bne L0290
|
|
448 L02C1 bsr L02C8
|
|
449 puls a
|
|
450 puls y,x
|
|
451 L02C7 rts
|
|
452 L02C8 pshs y,x,a
|
|
453 lda #$01
|
|
454 leax >L0059,pcr
|
|
455 ldy #$0050
|
|
456 os9 I$WritLn
|
|
457 puls pc,y,x,a
|
|
458 emod
|
|
459 eom equ *
|