Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/copy.asm @ 200:e9ce43cc215e
Made major changes to headers for consistency and identification
author | boisy |
---|---|
date | Mon, 15 Jul 2002 03:42:42 +0000 |
parents | fad2545d83fc |
children | 1810b051d07e |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
2 * Copy - Copy files |
0 | 3 * |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
8 * 9 From Tandy OS-9 Level Two VR 02.00.01 |
0 | 9 |
10 nam Copy | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
11 ttl Copy files |
0 | 12 |
188 | 13 * Disassembled 02/07/06 13:08:43 by Disasm v1.6 (C) 1988 by RML |
0 | 14 |
15 ifp1 | |
15 | 16 use defsfile |
0 | 17 endc |
15 | 18 |
0 | 19 tylg set Prgrm+Objct |
20 atrv set ReEnt+rev | |
21 rev set $01 | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
22 edition set 9 |
15 | 23 |
0 | 24 mod eom,name,tylg,atrv,start,size |
15 | 25 |
0 | 26 u0000 rmb 1 |
27 u0001 rmb 1 | |
28 u0002 rmb 1 | |
29 u0003 rmb 1 | |
30 u0004 rmb 2 | |
31 u0006 rmb 2 | |
32 u0008 rmb 2 | |
33 u000A rmb 2 | |
34 u000C rmb 2 | |
35 u000E rmb 1 | |
36 u000F rmb 1 | |
188 | 37 u0010 rmb 16 |
38 u0020 rmb 480 | |
0 | 39 u0200 rmb 256 |
40 u0300 rmb 4096 | |
41 size equ . | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
42 |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
43 name fcs /Copy/ |
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
188
diff
changeset
|
44 fcb edition |
15 | 45 |
46 L0012 fcc "Ready SOURCE, hit C to continue: " | |
47 L0033 fcc "Ready DESTINATION, hit C to continue: " | |
48 L0059 fcb C$CR | |
49 L005A fcc "Use: Copy <Path1> <Path2> [-s]" | |
50 fcb C$LF | |
51 fcc " -s = single drive copy (Path2 must be complete pathlist)" | |
52 fcb C$CR | |
53 L00B4 fcb C$BELL | |
54 fcc "Error - write verification failed." | |
55 fcb C$CR | |
56 | |
57 start leas >u0200,u | |
0 | 58 pshs u |
188 | 59 leau <u0020,u |
0 | 60 L00E1 clr ,-u |
61 cmpu ,s | |
62 bhi L00E1 | |
63 tfr y,d | |
64 subd ,s++ | |
65 subd #$0300 | |
66 clrb | |
67 std <u0004 | |
68 pshs x | |
69 L00F4 lda ,x+ | |
188 | 70 cmpa #'- |
0 | 71 beq L0100 |
72 cmpa #$0D | |
73 bne L00F4 | |
74 bra L0113 | |
75 L0100 ldd ,x+ | |
188 | 76 eora #'S |
0 | 77 anda #$DF |
78 bne L0110 | |
79 cmpb #$30 | |
80 bcc L0110 | |
81 inc <u000E | |
82 bra L00F4 | |
188 | 83 L0110 lbra L0281 |
0 | 84 L0113 puls x |
188 | 85 lda #READ. |
0 | 86 os9 I$Open |
87 bcc L0125 | |
88 cmpb #$D7 | |
188 | 89 lbeq L0281 |
90 lbra L0288 | |
0 | 91 L0125 sta <u0000 |
188 | 92 pshs x |
93 leax <u0010,u | |
94 ldy #$0010 | |
95 ldb #SS.FD | |
96 os9 I$GetStt | |
97 puls x | |
98 bcs L0147 | |
0 | 99 tst <u000E |
188 | 100 beq L0147 |
0 | 101 lda ,x |
102 ldb #$D7 | |
188 | 103 cmpa #'/ |
104 lbne L0288 | |
105 L0147 pshs x | |
0 | 106 lda <u0000 |
188 | 107 leax <u0020,u |
108 ldb #SS.Opt | |
0 | 109 os9 I$GetStt |
188 | 110 lbcs L0288 |
0 | 111 lda ,x |
112 sta <u0002 | |
113 ldb #$0F | |
114 cmpa #$01 | |
188 | 115 bne L0177 |
0 | 116 pshs u,x |
117 lda <u0000 | |
188 | 118 ldb #SS.Size |
0 | 119 os9 I$GetStt |
188 | 120 lbcs L0288 |
0 | 121 stx <u0006 |
122 stu <u0008 | |
123 puls u,x | |
124 ldb <$13,x | |
188 | 125 L0177 stb <u000F |
126 ldx ,s | |
0 | 127 lda #$01 |
188 | 128 lbsr L0295 |
129 lda #UPDAT. | |
0 | 130 ldb <u000F |
131 os9 I$Create | |
188 | 132 puls x |
133 bcc L0198 | |
0 | 134 inc <u0003 |
188 | 135 lda #WRITE. |
0 | 136 ldb <u000F |
137 os9 I$Create | |
188 | 138 lbcs L0288 |
139 L0198 sta <u0001 | |
140 leax <u0020,u | |
141 ldb #SS.Opt | |
0 | 142 os9 I$GetStt |
188 | 143 lbcs L0288 |
0 | 144 ldb ,x |
145 cmpb #$01 | |
188 | 146 beq L01B0 |
0 | 147 inc <u0003 |
188 | 148 bra L01E8 |
149 L01B0 tst <u0003 | |
150 bne L01C1 | |
0 | 151 ldb #$01 |
152 stb $08,x | |
188 | 153 ldb #SS.Opt |
0 | 154 os9 I$SetStt |
188 | 155 lbcs L0288 |
156 L01C1 lda <u0002 | |
0 | 157 cmpa #$01 |
188 | 158 bne L01E8 |
0 | 159 pshs u |
160 lda <u0001 | |
161 ldb #$02 | |
162 ldx <u0006 | |
163 ldu <u0008 | |
164 os9 I$SetStt | |
188 | 165 lbcs L0288 |
0 | 166 puls u |
188 | 167 lda <u0001 |
0 | 168 leax <u0010,u |
169 ldy #$0010 | |
15 | 170 ldb #SS.FD |
0 | 171 os9 I$SetStt |
188 | 172 L01E8 leax >u0300,u |
0 | 173 clra |
188 | 174 lbsr L0295 |
0 | 175 lda <u0000 |
176 ldy <u0004 | |
177 os9 I$Read | |
188 | 178 bcs L0265 |
0 | 179 lda #$01 |
188 | 180 lbsr L0295 |
0 | 181 lda <u0001 |
182 os9 I$Write | |
188 | 183 lbcs L0288 |
0 | 184 tst <u0003 |
188 | 185 bne L0258 |
0 | 186 pshs u,y |
187 ldx <u000A | |
188 ldu <u000C | |
189 lda <u0001 | |
190 os9 I$Seek | |
188 | 191 bcs L0288 |
0 | 192 ldu $02,s |
193 leau >u0300,u | |
194 ldd ,s | |
195 addd <u000C | |
196 std <u000C | |
197 ldd ,s | |
188 | 198 bcc L022D |
0 | 199 leax $01,x |
200 stx <u000A | |
188 | 201 L022D ldy #$0100 |
0 | 202 std ,s |
203 tsta | |
188 | 204 bne L0238 |
0 | 205 tfr d,y |
188 | 206 L0238 ldx $02,s |
0 | 207 leax >$0200,x |
208 lda <u0001 | |
209 os9 I$Read | |
188 | 210 bcs L0288 |
211 L0245 lda ,u+ | |
0 | 212 cmpa ,x+ |
188 | 213 bne L0276 |
0 | 214 leay -$01,y |
188 | 215 bne L0245 |
0 | 216 ldd ,s |
217 subd #$0100 | |
188 | 218 bhi L022D |
0 | 219 puls u,y |
188 | 220 L0258 lda <u0000 |
15 | 221 ldb #SS.EOF |
0 | 222 os9 I$GetStt |
188 | 223 bcc L01E8 |
15 | 224 cmpb #E$EOF |
188 | 225 beq L026D |
226 L0265 cmpb #E$EOF | |
227 bne L0288 | |
0 | 228 lda #$01 |
188 | 229 bsr L0295 |
230 L026D lda <u0001 | |
0 | 231 os9 I$Close |
188 | 232 bcc L0287 |
233 bra L0288 | |
234 L0276 leax >L00B4,pcr | |
235 bsr L028B | |
0 | 236 comb |
237 ldb #$01 | |
188 | 238 bra L0288 |
239 L0281 leax >L005A,pcr | |
240 bsr L028B | |
241 L0287 clrb | |
242 L0288 os9 F$Exit | |
243 L028B ldy #256 | |
244 L028F lda #$01 | |
0 | 245 os9 I$WritLn |
246 rts | |
188 | 247 L0295 tst <u000E |
248 beq L02D2 | |
0 | 249 pshs y,x |
188 | 250 L029B pshs a |
0 | 251 tsta |
188 | 252 bne L02AA |
0 | 253 leax >L0012,pcr |
254 ldy #$0021 | |
188 | 255 bra L02B2 |
256 L02AA leax >L0033,pcr | |
0 | 257 ldy #$0026 |
188 | 258 L02B2 bsr L028F |
0 | 259 leax ,-s |
260 ldy #$0001 | |
261 clra | |
262 os9 I$Read | |
263 lda ,s+ | |
188 | 264 eora #'C |
0 | 265 anda #$DF |
188 | 266 beq L02CC |
267 bsr L02D3 | |
0 | 268 puls a |
188 | 269 bne L029B |
270 L02CC bsr L02D3 | |
0 | 271 puls a |
272 puls y,x | |
188 | 273 L02D2 rts |
274 L02D3 pshs y,x,a | |
0 | 275 lda #$01 |
276 leax >L0059,pcr | |
277 ldy #$0050 | |
278 os9 I$WritLn | |
279 puls pc,y,x,a | |
15 | 280 |
0 | 281 emod |
282 eom equ * | |
15 | 283 end |