annotate level1/cmds/deldir.asm @ 872:ad7443c6b53d

Fixed problem where dir wasn't being forked
author boisy
date Thu, 16 Jan 2003 21:18:13 +0000
parents c6ebca55eed3
children c155aac72190
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 * Deldir - Delete a directory
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 * 3 From Tandy OS-9 Level Two VR 02.00.01
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
9 * 4 Updated to add -e instead of e to dir BGP 03/01/14
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 nam Deldir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 ttl Delete a directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 * Disassembled 98/09/10 23:18:11 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 rev set $01
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
23 edition set 4
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
27 parmptr rmb 2
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
28 fpath rmb 1
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
29 what2do rmb 1
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
30 stats rmb 24
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u001C rmb 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0020 rmb 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u0024 rmb 10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u002E rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u0034 rmb 15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u0043 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u0044 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u0045 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u0046 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u0048 rmb 2
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
41 buffer rmb 336
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 name fcs /Deldir/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
47 start bsr OpenPath
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
48 bcs OpenErr
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
49 bsr GetOpts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 bcc L002B
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
51 lbsr PromptUser
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
52 bcs OpenErr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 lbsr L01C3
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
54 bcs OpenErr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 lbsr L0242
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
56 bcs OpenErr
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
57 L002B lda <fpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 bcs L004D
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
60 ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 os9 I$Delete
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 bcs L004D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 cmpa #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 bne start
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 bra L004D
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
68 OpenErr pshs b
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
69 lda <fpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 L004D os9 F$Exit
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
74
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
75
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
76 OpenPath stx <parmptr save parameter pointer
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 lda #READ.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 bcs L005D
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
80 sta <fpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 bra L0089
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
82 L005D ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 lda #DIR.+READ.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 bcs L0090
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
86 sta <fpath
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
87 L0068 ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 std <u0046
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 lda ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 bne L0089
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 lda #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 sta ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 lda #READ.+WRITE.
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
98 ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 os9 I$ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 bcs L0090
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
101 sty <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 bra L0068
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 L0089 leax <-u001C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 stx <u0044
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
105 clr <what2do
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 L0090 rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
107
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
108 GetOpts lda <fpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 ldb #SS.OPT
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
110 leax stats,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 os9 I$GetStt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 bcs L00AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 ldx <u0044
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 lda <$33,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 anda #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 beq L00AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 bra L00AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 L00AA clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 L00AB rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
122
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
123 Prompt fcb C$LF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 fcc "Deleting directory file. "
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 fcc "List directory, delete directory, or quit ? (l/d/q) "
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
127 PromptL equ *-Prompt
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
128 Cont fcb C$LF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 fcc "Continue? (y/n) "
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
130 ContL equ *-Cont
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
131
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
132 PromptUser
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
133 tstb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 bne L013E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 lda #$01
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
136 leax <Prompt,pcr
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
137 ldy #PromptL
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 os9 I$WritLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 L011B bcs L013E
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
140 bsr ReadKey
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 bcs L013E
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
142 ldb <what2do
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 cmpb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 bne L012A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 bra L013E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 L012A bsr L0145
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 L012C bcs L013E
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
149 leax <Cont,pcr
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
150 ldy #ContL
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 os9 I$WritLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 bcs L013E
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
154 bsr ReadKey
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 L013E rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
156 DIR fcc "DIR"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 fcb C$CR
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
158 DIROPTS fcc "-E "
872
ad7443c6b53d Fixed problem where dir wasn't being forked
boisy
parents: 848
diff changeset
159 DIROPTL equ *-DIROPTS
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 L0145 pshs u
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
161 leau <buffer,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 pshs u
872
ad7443c6b53d Fixed problem where dir wasn't being forked
boisy
parents: 848
diff changeset
163 ldb #DIROPTL
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
164 leax <DIROPTS,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 lbsr L0270
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
166 ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 ldd <u0046
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 lbsr L0270
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 lda #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 L015E sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 subd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 puls u
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
176 leax <DIR,pcr
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
177 lda #Prgrm+Objct
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 os9 F$Fork
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 bcs L013E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 os9 F$Wait
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 L0178 rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
184
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
185 ReadKey leax <buffer,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 ldy #80
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 686
diff changeset
187 clra
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 os9 I$ReadLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 bcs L01B8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 L0187 lda ,x+
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
191 cmpa #C$SPAC eat spaces
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 beq L0187
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
193 eora #'Y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 anda #$DF
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
195 beq L01AD branch if Y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 lda ,-x
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
197 eora #'L branch if L
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 beq L01A9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 lda ,x
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
201 eora #'D branch if D
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 anda #$DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 beq L01A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 bra L01B4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 L01A5 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 bra L01AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 L01A9 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 bra L01AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 L01AD ldb #$04
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
210 L01AF stb <what2do
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 bra L01B8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 L01B4 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 L01B8 rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
216 DelDir fcc "DELDIR"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 fcb C$CR
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
218 DotDot fcc ".."
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 fcb C$CR
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
220 L01C3 ldb <what2do
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 bitb #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 beq L0210
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
223 lda <fpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 pshs u
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
225 ldu #64
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 L01D0 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 L01D8 bsr L0215
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 bcs L0209
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
231 ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 lda #READ.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 os9 I$ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 bcs L0214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 ldy <u0048
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 clrb
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
237 lda #Prgrm+Objct
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 leau <u0024,u
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
240 leax <DelDir,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 os9 F$Fork
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 bcs L0214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 os9 F$Wait
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 bcs L0214
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
246 leax <DotDot,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 lda #READ.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 os9 I$ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 bcc L01D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 L0209 cmpb #E$EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 bne L0214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 bra L0214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 L0210 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 L0214 rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
257 L0215 lda <fpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 leax <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 ldy #$0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 os9 I$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 bcs L0238
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 beq L0215
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 lda -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 sta -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 lda #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 sta ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 std <u0048
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 L0238 rts
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
274 ATTR fcc "ATTR"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 fcb C$CR
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
276 ATTROPTS fcc " -d"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 fcb C$CR
872
ad7443c6b53d Fixed problem where dir wasn't being forked
boisy
parents: 848
diff changeset
278 ATTROPTL equ *-ATTROPTS
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 L0242 pshs u
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
280 leau <buffer,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 ldd <u0046
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 decb
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
284 ldx <parmptr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 bsr L0270
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
286 leax <ATTROPTS,pcr
872
ad7443c6b53d Fixed problem where dir wasn't being forked
boisy
parents: 848
diff changeset
287 ldb #ATTROPTL
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 bsr L0270
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 subd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 puls u
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
293 leax <ATTR,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 clrb
686
ed3ad5db6af4 Made source enhnacements
boisy
parents: 200
diff changeset
295 lda #Prgrm+Objct
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 os9 F$Fork
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bcs L026D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 os9 F$Wait
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 L026D puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 L0270 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 bne L0270
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311