0
|
1 ********************************************************************
|
|
2 * Dir - Show directory
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 7 Made compliant with 1900-2155 BGP 99/05/11
|
|
9
|
|
10 nam Dir
|
|
11 ttl Show directory
|
|
12
|
|
13 * Disassembled 99/04/11 17:39:33 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 7
|
|
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 1
|
|
30 u0005 rmb 1
|
|
31 u0006 rmb 1
|
|
32 u0007 rmb 1
|
|
33 u0008 rmb 1
|
|
34 u0009 rmb 1
|
|
35 u000A rmb 1
|
|
36 u000B rmb 1
|
|
37 u000C rmb 3
|
|
38 u000F rmb 3
|
|
39 u0012 rmb 29
|
|
40 u002F rmb 1
|
|
41 u0030 rmb 1
|
|
42 u0031 rmb 1
|
|
43 u0032 rmb 1
|
|
44 u0033 rmb 2
|
|
45 u0035 rmb 6
|
|
46 u003B rmb 2
|
|
47 u003D rmb 2
|
|
48 u003F rmb 530
|
|
49 size equ .
|
|
50
|
|
51 name fcs /Dir/
|
|
52 fcb edition
|
|
53
|
|
54 L0011 fcb C$LF
|
|
55 fcs " Directory of "
|
|
56 L0020 fcc "."
|
|
57 fcb C$CR
|
|
58 L0022 fcc "@"
|
|
59 fcb C$CR
|
|
60 WideDir fcb C$LF
|
|
61 fcc "Owner Last modified Attributes Sector Bytecount Name"
|
|
62 fcb C$LF
|
|
63 fcc "----- --------------- ---------- ------ --------- ----------"
|
|
64 fcb C$CR
|
|
65 WideDirL equ *-WideDir
|
|
66
|
|
67 NrrwDir fcb C$LF
|
|
68 fcc "Modified on Owner Name"
|
|
69 fcb C$LF
|
|
70 fcc " Attr Sector Size"
|
|
71 fcb C$LF
|
|
72 fcc "==============================="
|
|
73 fcb C$CR
|
|
74 NrrwDirL equ *-NrrwDir
|
|
75
|
|
76 start leay <u003F,u
|
|
77 sty <u000A
|
|
78 clr <u0004
|
|
79 clr <u0003
|
|
80 clr <u0009
|
|
81 lda #$10
|
|
82 ldb #$30
|
|
83 std <u0007
|
|
84 pshs y,x,b,a
|
|
85 lda #1
|
|
86 ldb #$26
|
|
87 os9 I$GetStt
|
|
88 bcc L0111
|
|
89 cmpb #$D0
|
|
90 beq L011E
|
|
91 puls y,x,b,a
|
|
92 lbra L0258
|
|
93 L0111 cmpx #80
|
|
94 beq L011E
|
|
95 inc <u0009
|
|
96 lda #$0A
|
|
97 ldb #$14
|
|
98 std <u0007
|
|
99 L011E puls y,x,b,a
|
|
100 lbsr L032F
|
|
101 lda ,-x
|
|
102 cmpa #$0D
|
|
103 bne L012D
|
|
104 leax >L0020,pcr
|
|
105 L012D stx <u0000
|
|
106 lda #$81
|
|
107 ora <u0004
|
|
108 pshs x,a
|
|
109 os9 I$Open
|
|
110 sta <u0002
|
|
111 puls x,a
|
|
112 lbcs L0258
|
|
113 os9 I$ChgDir
|
|
114 lbcs L0258
|
|
115 pshs x
|
|
116 leay >L0011,pcr
|
|
117 lbsr L02CC
|
|
118 ldx <u0000
|
|
119 L0152 lda ,x+
|
|
120 lbsr L02A6
|
|
121 cmpx ,s
|
|
122 bcs L0152
|
|
123 leas $02,s
|
|
124 lbsr L032F
|
|
125 lbsr L02A4
|
|
126 lbsr L02A4
|
|
127 leax u000C,u
|
|
128 os9 F$Time
|
|
129 leax u000F,u
|
|
130 lbsr L0302
|
|
131 lbsr L02D7
|
|
132 tst <u0003
|
|
133 beq L01A3
|
|
134 lda #$01
|
|
135 ora <u0004
|
|
136 leax >L0022,pcr
|
|
137 os9 I$Open
|
|
138 lbcs L0258
|
|
139 sta <u0005
|
|
140 tst <u0009
|
|
141 bne L0196
|
|
142 leax >WideDir,pcr
|
|
143 ldy #WideDirL
|
|
144 bra L019E
|
|
145 L0196 leax >NrrwDir,pcr
|
|
146 ldy #NrrwDirL
|
|
147 L019E lda #$01
|
|
148 os9 I$WritLn
|
|
149 L01A3 lda <u0002
|
|
150 ldx #$0000
|
|
151 pshs u
|
|
152 ldu #$0040
|
|
153 os9 I$Seek
|
|
154 puls u
|
|
155 lbra L0243
|
|
156 L01B5 tst <u0012
|
|
157 lbeq L0243
|
|
158 tst <u0003
|
|
159 bne L01D8
|
|
160 leay <u0012,u
|
|
161 lbsr L02CC
|
|
162 L01C5 lbsr L02A4
|
|
163 ldb <u000B
|
|
164 subb #$3F
|
|
165 cmpb <u0008
|
|
166 bhi L021C
|
|
167 L01D0 subb <u0007
|
|
168 bhi L01D0
|
|
169 bne L01C5
|
|
170 bra L0243
|
|
171 L01D8 pshs u
|
|
172 lda <u0031
|
|
173 clrb
|
|
174 tfr d,u
|
|
175 ldx <u002F
|
|
176 lda <u0005
|
|
177 os9 I$Seek
|
|
178 puls u
|
|
179 bcs L0258
|
|
180 leax <u0032,u
|
|
181 ldy #$000D
|
|
182 os9 I$Read
|
|
183 bcs L0258
|
|
184 tst <u0009
|
|
185 bne L0221
|
|
186 ldd <u0033
|
|
187 clr <u0006
|
|
188 bsr L0263
|
|
189 lbsr L02A4
|
|
190 lbsr L02ED
|
|
191 lbsr L02A4
|
|
192 lbsr L02B9
|
|
193 lbsr L02A4
|
|
194 lbsr L02A4
|
|
195 bsr L025D
|
|
196 bsr L026F
|
|
197 leay <u0012,u
|
|
198 lbsr L02CC
|
|
199 L021C lbsr L02D7
|
|
200 bra L0243
|
|
201 L0221 lbsr L02ED
|
|
202 ldd <u0033
|
|
203 clr <u0006
|
|
204 bsr L0263
|
|
205 bsr L02A4
|
|
206 leay <u0012,u
|
|
207 lbsr L02CC
|
|
208 lbsr L02D7
|
|
209 lbsr L02B9
|
|
210 bsr L02A4
|
|
211 bsr L02A4
|
|
212 bsr L025D
|
|
213 bsr L026F
|
|
214 lbsr L02D7
|
|
215 L0243 leax <u0012,u
|
|
216 ldy #$0020
|
|
217 lda <u0002
|
|
218 os9 I$Read
|
|
219 lbcc L01B5
|
|
220 cmpb #$D3
|
|
221 bne L0258
|
|
222 clrb
|
|
223 L0258 bsr L02D7
|
|
224 os9 F$Exit
|
|
225 L025D lda <u002F
|
|
226 bsr L0287
|
|
227 ldd <u0030
|
|
228 L0263 bsr L0289
|
|
229 tfr b,a
|
|
230 bsr L027D
|
|
231 inc <u0006
|
|
232 bsr L028B
|
|
233 bra L02A4
|
|
234 L026F ldd <u003B
|
|
235 bsr L0287
|
|
236 tfr b,a
|
|
237 bsr L0289
|
|
238 bsr L02A4
|
|
239 ldd <u003D
|
|
240 bra L0263
|
|
241 L027D pshs a
|
|
242 lsra
|
|
243 lsra
|
|
244 lsra
|
|
245 lsra
|
|
246 bsr L028D
|
|
247 puls pc,a
|
|
248 L0287 clr <u0006
|
|
249 L0289 bsr L027D
|
|
250 L028B anda #$0F
|
|
251 L028D tsta
|
|
252 beq L0292
|
|
253 sta <u0006
|
|
254 L0292 tst <u0006
|
|
255 bne L029A
|
|
256 lda #$20
|
|
257 bra L02A6
|
|
258 L029A adda #$30
|
|
259 cmpa #$39
|
|
260 bls L02A6
|
|
261 adda #$07
|
|
262 bra L02A6
|
|
263 L02A4 lda #$20
|
|
264 L02A6 pshs x
|
|
265 ldx <u000A
|
|
266 sta ,x+
|
|
267 stx <u000A
|
|
268 puls pc,x
|
|
269 L02B0 fcc "dsewrewr"
|
|
270 fcb $FF
|
|
271 L02B9 fcb $D6,$32
|
|
272 leax <L02B0,pcr
|
|
273 lda ,x+
|
|
274 L02C0 lslb
|
|
275 bcs L02C5
|
|
276 lda #$2D
|
|
277 L02C5 bsr L02A6
|
|
278 lda ,x+
|
|
279 bpl L02C0
|
|
280 rts
|
|
281 L02CC lda ,y
|
|
282 anda #$7F
|
|
283 bsr L02A6
|
|
284 lda ,y+
|
|
285 bpl L02CC
|
|
286 rts
|
|
287 L02D7 pshs y,x,a
|
|
288 lda #$0D
|
|
289 bsr L02A6
|
|
290 leax <u003F,u
|
|
291 stx <u000A
|
|
292 ldy #$0050
|
|
293 lda #$01
|
|
294 os9 I$WritLn
|
|
295 puls pc,y,x,a
|
|
296 L02ED leax <u0035,u
|
|
297 ldb ,x
|
|
298 cmpb #100
|
|
299 blo L1900
|
|
300 subb #100
|
|
301 cmpb #100
|
|
302 blo L2000
|
|
303 L2100 subb #100
|
|
304 stb ,x
|
|
305 ldb #21
|
|
306 bra PrCnty
|
|
307 L1900 stb ,x
|
|
308 ldb #19
|
|
309 bra PrCnty
|
|
310 L2000 stb ,x
|
|
311 ldb #20
|
|
312 PrCnty bsr L030C
|
|
313 bsr L030A
|
|
314 bsr L02FE
|
|
315 bsr L02FE
|
|
316 bsr L02A4
|
|
317 bsr L030A
|
|
318 bsr L030A
|
|
319 bra L02A4
|
|
320 L02FE lda #$2F
|
|
321 bra L0308
|
|
322 L0302 bsr L030A
|
|
323 bsr L0306
|
|
324 L0306 lda #$3A
|
|
325 L0308 lbsr L02A6
|
|
326 L030A ldb ,x+
|
|
327 L030C lda #$2F
|
|
328 cmpb #$64
|
|
329 bcs L0313
|
|
330 clrb
|
|
331 L0313 inca
|
|
332 subb #$64
|
|
333 bcc L0313
|
|
334 cmpa #$30
|
|
335 beq L031E
|
|
336 lbsr L02A6
|
|
337 L031E lda #$3A
|
|
338 L0320 deca
|
|
339 addb #$0A
|
|
340 bcc L0320
|
|
341 lbsr L02A6
|
|
342 tfr b,a
|
|
343 adda #$30
|
|
344 lbra L02A6
|
|
345 L032F ldd ,x+
|
|
346 cmpa #$20
|
|
347 beq L032F
|
|
348 cmpa #$2C
|
|
349 beq L032F
|
|
350 eora #$45
|
|
351 anda #$DF
|
|
352 bne L0347
|
|
353 cmpb #$30
|
|
354 bcc L0347
|
|
355 inc <u0003
|
|
356 bra L032F
|
|
357 L0347 lda -$01,x
|
|
358 eora #$58
|
|
359 anda #$DF
|
|
360 bne L0359
|
|
361 cmpb #$30
|
|
362 bcc L0359
|
|
363 lda #$04
|
|
364 sta <u0004
|
|
365 bra L032F
|
|
366 L0359 rts
|
|
367
|
|
368 emod
|
|
369 eom equ *
|
|
370 end
|