Mercurial > hg > Members > kono > nitros9-code
comparison level1/cmds/deldir.asm @ 0:6641a883d6b0
Initial revision
author | boisy |
---|---|
date | Thu, 04 Apr 2002 16:34:12 +0000 |
parents | |
children | e9ce43cc215e |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:6641a883d6b0 |
---|---|
1 ******************************************************************** | |
2 * Deldir - Delete a directory | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
8 * 3 Original Tandy distribution version BGP | |
9 | |
10 nam Deldir | |
11 ttl Delete a directory | |
12 | |
13 * Disassembled 98/09/10 23:18:11 by Disasm v1.6 (C) 1988 by RML | |
14 | |
15 ifp1 | |
16 use defsfile | |
17 endc | |
18 | |
19 tylg set Prgrm+Objct | |
20 atrv set ReEnt+rev | |
21 rev set $01 | |
22 edition set 3 | |
23 | |
24 mod eom,name,tylg,atrv,start,size | |
25 | |
26 u0000 rmb 2 | |
27 u0002 rmb 1 | |
28 u0003 rmb 1 | |
29 u0004 rmb 24 | |
30 u001C rmb 4 | |
31 u0020 rmb 4 | |
32 u0024 rmb 10 | |
33 u002E rmb 6 | |
34 u0034 rmb 15 | |
35 u0043 rmb 1 | |
36 u0044 rmb 1 | |
37 u0045 rmb 1 | |
38 u0046 rmb 2 | |
39 u0048 rmb 2 | |
40 u004A rmb 2 | |
41 u004C rmb 334 | |
42 size equ . | |
43 | |
44 name fcs /Deldir/ | |
45 fcb edition | |
46 | |
47 start bsr L0050 | |
48 bcs L0042 | |
49 bsr L0091 | |
50 bcc L002B | |
51 lbsr L010C | |
52 bcs L0042 | |
53 lbsr L01C3 | |
54 bcs L0042 | |
55 lbsr L0242 | |
56 bcs L0042 | |
57 L002B lda <u0002 | |
58 os9 I$Close | |
59 bcs L004D | |
60 ldx <u0000 | |
61 os9 I$Delete | |
62 bcs L004D | |
63 lda ,x | |
64 cmpa #C$CR | |
65 bne start | |
66 clrb | |
67 bra L004D | |
68 L0042 pshs b | |
69 lda <u0002 | |
70 os9 I$Close | |
71 puls b | |
72 orcc #Carry | |
73 L004D os9 F$Exit | |
74 L0050 stx <u0000 | |
75 lda #READ.+WRITE. | |
76 os9 I$Open | |
77 bcs L005D | |
78 sta <u0002 | |
79 bra L0089 | |
80 L005D ldx <u0000 | |
81 lda #DIR.+READ. | |
82 os9 I$Open | |
83 bcs L0090 | |
84 sta <u0002 | |
85 L0068 ldx <u0000 | |
86 os9 F$PrsNam | |
87 clra | |
88 incb | |
89 std <u0046 | |
90 lda ,y | |
91 cmpa #PDELIM | |
92 bne L0089 | |
93 lda #C$CR | |
94 sta ,y+ | |
95 lda #READ.+WRITE. | |
96 ldx <u0000 | |
97 os9 I$ChgDir | |
98 bcs L0090 | |
99 sty <u0000 | |
100 bra L0068 | |
101 L0089 leax <-u001C,u | |
102 stx <u0044 | |
103 clr <u0003 | |
104 L0090 rts | |
105 L0091 lda <u0002 | |
106 ldb #SS.OPT | |
107 leax u0004,u | |
108 os9 I$GetStt | |
109 bcs L00AB | |
110 ldx <u0044 | |
111 lda <$33,x | |
112 anda #$80 | |
113 beq L00AA | |
114 clrb | |
115 orcc #Carry | |
116 bra L00AB | |
117 L00AA clrb | |
118 L00AB rts | |
119 L00AC fcb C$LF | |
120 fcc "Deleting directory file. " | |
121 fcb C$LF | |
122 fcc "List directory, delete directory, or quit ? (l/d/q) " | |
123 L00FB fcb C$LF | |
124 fcc "Continue? (y/n) " | |
125 L010C tstb | |
126 bne L013E | |
127 lda #$01 | |
128 leax <L00AC,pcr | |
129 ldy #$004F | |
130 os9 I$WritLn | |
131 L011B bcs L013E | |
132 bsr L0179 | |
133 bcs L013E | |
134 ldb <u0003 | |
135 cmpb #$01 | |
136 bne L012A | |
137 clrb | |
138 bra L013E | |
139 L012A bsr L0145 | |
140 L012C bcs L013E | |
141 leax <L00FB,pcr | |
142 ldy #$0011 | |
143 lda #$01 | |
144 os9 I$WritLn | |
145 bcs L013E | |
146 bsr L0179 | |
147 L013E rts | |
148 L013F fcc "DIR" | |
149 fcb C$CR | |
150 L0143 fcc "E " | |
151 L0145 pshs u | |
152 leau <u004A,u | |
153 pshs u | |
154 ldb #$02 | |
155 leax <L0143,pcr | |
156 lbsr L0270 | |
157 ldx <u0000 | |
158 ldd <u0046 | |
159 decb | |
160 lbsr L0270 | |
161 lda #C$CR | |
162 L015E sta ,u+ | |
163 tfr u,d | |
164 subd ,s | |
165 tfr d,y | |
166 puls u | |
167 leax <L013F,pcr | |
168 lda #$11 | |
169 clrb | |
170 os9 F$Fork | |
171 puls u | |
172 bcs L013E | |
173 os9 F$Wait | |
174 L0178 rts | |
175 L0179 leax <u004A,u | |
176 ldy #80 | |
177 lda #$00 | |
178 os9 I$ReadLn | |
179 bcs L01B8 | |
180 L0187 lda ,x+ | |
181 cmpa #C$SPAC | |
182 beq L0187 | |
183 eora #$59 | |
184 anda #$DF | |
185 beq L01AD | |
186 lda ,-x | |
187 eora #$4C | |
188 anda #$DF | |
189 beq L01A9 | |
190 lda ,x | |
191 eora #$44 | |
192 anda #$DF | |
193 beq L01A5 | |
194 bra L01B4 | |
195 L01A5 ldb #$01 | |
196 bra L01AF | |
197 L01A9 ldb #$02 | |
198 bra L01AF | |
199 L01AD ldb #$04 | |
200 L01AF stb <u0003 | |
201 clrb | |
202 bra L01B8 | |
203 L01B4 ldb #$01 | |
204 orcc #Carry | |
205 L01B8 rts | |
206 L01B9 fcc "DELDIR" | |
207 fcb C$CR | |
208 L01C0 fcc ".." | |
209 fcb C$CR | |
210 L01C3 ldb <u0003 | |
211 bitb #$05 | |
212 beq L0210 | |
213 lda <u0002 | |
214 pshs u | |
215 ldu #$0040 | |
216 L01D0 ldx #$0000 | |
217 os9 I$Seek | |
218 puls u | |
219 L01D8 bsr L0215 | |
220 bcs L0209 | |
221 ldx <u0000 | |
222 lda #READ.+WRITE. | |
223 os9 I$ChgDir | |
224 bcs L0214 | |
225 ldy <u0048 | |
226 clrb | |
227 lda #$11 | |
228 pshs u | |
229 leau <u0024,u | |
230 leax <L01B9,pcr | |
231 os9 F$Fork | |
232 puls u | |
233 bcs L0214 | |
234 os9 F$Wait | |
235 bcs L0214 | |
236 leax <L01C0,pcr | |
237 lda #READ.+WRITE. | |
238 os9 I$ChgDir | |
239 bcc L01D8 | |
240 L0209 cmpb #E$EOF | |
241 bne L0214 | |
242 clrb | |
243 bra L0214 | |
244 L0210 ldb #$01 | |
245 orcc #Carry | |
246 L0214 rts | |
247 L0215 lda <u0002 | |
248 leax <u0024,u | |
249 ldy #$0020 | |
250 os9 I$Read | |
251 bcs L0238 | |
252 lda ,x | |
253 beq L0215 | |
254 os9 F$PrsNam | |
255 lda -$01,y | |
256 anda #$7F | |
257 sta -$01,y | |
258 lda #C$CR | |
259 sta ,y | |
260 clra | |
261 incb | |
262 std <u0048 | |
263 L0238 rts | |
264 L0239 fcc "ATTR" | |
265 fcb C$CR | |
266 L023E fcc " -d" | |
267 fcb C$CR | |
268 L0242 pshs u | |
269 leau <u004A,u | |
270 pshs u | |
271 ldd <u0046 | |
272 decb | |
273 ldx <u0000 | |
274 bsr L0270 | |
275 leax <L023E,pcr | |
276 ldb #$04 | |
277 bsr L0270 | |
278 tfr u,d | |
279 subd ,s | |
280 tfr d,y | |
281 puls u | |
282 leax <L0239,pcr | |
283 clrb | |
284 lda #$11 | |
285 os9 F$Fork | |
286 bcs L026D | |
287 os9 F$Wait | |
288 L026D puls u | |
289 rts | |
290 L0270 decb | |
291 lda ,x+ | |
292 sta ,u+ | |
293 tstb | |
294 bne L0270 | |
295 rts | |
296 | |
297 emod | |
298 eom equ * | |
299 end | |
300 |