0
|
1 ********************************************************************
|
|
2 * Dir - Show directory
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * This dir initially started from the dir command that came with
|
|
7 * the OS-9 Level Two package, then incorporated Glenside's Y2K
|
|
8 * fix.
|
|
9 *
|
|
10 * Ed. Comments Who YY/MM/DD
|
|
11 * ------------------------------------------------------------------
|
|
12 * 10 Incorporated Glenside Y2K fixes BGP 99/05/11
|
|
13
|
|
14 nam Dir
|
|
15 ttl Show directory
|
|
16
|
|
17 ttl program module
|
|
18
|
|
19 * Disassembled 99/04/11 16:36:40 by Disasm v1.6 (C) 1988 by RML
|
|
20
|
|
21 ifp1
|
|
22 use defsfile
|
|
23 endc
|
|
24
|
|
25 tylg set Prgrm+Objct
|
|
26 atrv set ReEnt+rev
|
|
27 rev set $00
|
|
28 edition set 10
|
|
29
|
|
30 mod eom,name,tylg,atrv,start,size
|
|
31
|
|
32 u0000 rmb 2
|
|
33 u0002 rmb 1
|
|
34 u0003 rmb 1
|
|
35 u0004 rmb 1
|
|
36 u0005 rmb 1
|
|
37 u0006 rmb 2
|
|
38 u0008 rmb 1
|
|
39 u0009 rmb 1
|
|
40 u000A rmb 1
|
|
41 u000B rmb 1
|
|
42 u000C rmb 1
|
|
43 u000D rmb 3
|
|
44 u0010 rmb 3
|
|
45 u0013 rmb 29
|
|
46 u0030 rmb 1
|
|
47 u0031 rmb 1
|
|
48 u0032 rmb 1
|
|
49 u0033 rmb 1
|
|
50 u0034 rmb 2
|
|
51 u0036 rmb 6
|
|
52 u003C rmb 2
|
|
53 u003E rmb 2
|
|
54 u0040 rmb 530
|
|
55 size equ .
|
|
56
|
|
57 name fcs /Dir/
|
|
58 fcb edition
|
|
59
|
|
60 L0011 fcb C$LF
|
|
61 fcs " Directory of "
|
|
62 L0020 fcc "."
|
|
63 fcb C$CR
|
|
64 L0022 fcc "@"
|
|
65 fcb C$CR
|
|
66 L0024 fcb C$CR,C$LF
|
|
67 fcc "Owner Last modified Attributes Sector Bytecount Name"
|
|
68 fcb C$CR,C$LF
|
|
69 fcc "----- ---------------- ---------- ------ --------- ----------"
|
|
70 fcb C$CR,C$LF
|
|
71 L00A0 fcb C$CR,C$LF
|
|
72 fcc "Modified on Owner Name"
|
|
73 fcb C$CR,C$LF
|
|
74 fcc " Attr Sector Size"
|
|
75 fcb C$CR,C$LF
|
|
76 fcc "==============================="
|
|
77 fcb C$CR
|
|
78 fcb C$LF
|
|
79
|
|
80 start leay <u0040,u
|
|
81 sty <u000B
|
|
82 clr <u0004
|
|
83 clr <u0003
|
|
84 clr <u000A
|
|
85 lda #$10
|
|
86 ldb #$30
|
|
87 std <u0008
|
|
88 pshs y,x,b,a
|
|
89 lda #$01
|
|
90 ldb #$26
|
|
91 os9 I$GetStt
|
|
92 bcc L0120
|
|
93 cmpb #$D0
|
|
94 beq L012D
|
|
95 puls y,x,b,a
|
|
96 lbra L0268
|
|
97 L0120 cmpx #$0040
|
|
98 bge L012D
|
|
99 inc <u000A
|
|
100 lda #$0A
|
|
101 ldb #$14
|
|
102 std <u0008
|
|
103 L012D puls y,x,b,a
|
|
104 lbsr L0370
|
|
105 lda ,-x
|
|
106 cmpa #$0D
|
|
107 bne L013C
|
|
108 leax >L0020,pcr
|
|
109 L013C stx <u0000
|
|
110 lda #$81
|
|
111 ora <u0004
|
|
112 pshs x,a
|
|
113 os9 I$Open
|
|
114 sta <u0002
|
|
115 puls x,a
|
|
116 lbcs L0268
|
|
117 os9 I$ChgDir
|
|
118 lbcs L0268
|
|
119 pshs x
|
|
120 leay >L0011,pcr
|
|
121 lbsr L02E6
|
|
122 ldx <u0000
|
|
123 L0161 lda ,x+
|
|
124 lbsr L02B7
|
|
125 cmpx ,s
|
|
126 bcs L0161
|
|
127 leas $02,s
|
|
128 lbsr L0370
|
|
129 lbsr L02B5
|
|
130 lbsr L02B5
|
|
131 leax u000D,u
|
|
132 os9 F$Time
|
|
133 leax <u0010,u
|
|
134 lbsr L0328
|
|
135 lbsr L02F5
|
|
136 tst <u0003
|
|
137 beq L01B3
|
|
138 lda #$01
|
|
139 ora <u0004
|
|
140 leax >L0022,pcr
|
|
141 os9 I$Open
|
|
142 lbcs L0268
|
|
143 sta <u0005
|
|
144 tst <u000A
|
|
145 bne L01A6
|
|
146 leax >L0024,pcr
|
|
147 ldy #$007C
|
|
148 bra L01AE
|
|
149 L01A6 leax >L00A0,pcr
|
|
150 ldy #$005A
|
|
151 L01AE lda #$01
|
|
152 os9 I$Write
|
|
153 L01B3 lda <u0002
|
|
154 ldx #$0000
|
|
155 pshs u
|
|
156 ldu #$0040
|
|
157 os9 I$Seek
|
|
158 puls u
|
|
159 lbra L0253
|
|
160 L01C5 tst <u0013
|
|
161 lbeq L0253
|
|
162 tst <u0003
|
|
163 bne L01E8
|
|
164 leay <u0013,u
|
|
165 lbsr L02E6
|
|
166 L01D5 lbsr L02B5
|
|
167 ldb <u000C
|
|
168 subb #$40
|
|
169 cmpb <u0009
|
|
170 bhi L022C
|
|
171 L01E0 subb <u0008
|
|
172 bhi L01E0
|
|
173 bne L01D5
|
|
174 bra L0253
|
|
175 L01E8 pshs u
|
|
176 lda <u0032
|
|
177 clrb
|
|
178 tfr d,u
|
|
179 ldx <u0030
|
|
180 lda <u0005
|
|
181 os9 I$Seek
|
|
182 puls u
|
|
183 bcs L0268
|
|
184 leax <u0033,u
|
|
185 ldy #$000D
|
|
186 os9 I$Read
|
|
187 bcs L0268
|
|
188 tst <u000A
|
|
189 bne L0231
|
|
190 ldd <u0034
|
|
191 clr <u0006
|
|
192 bsr L0274
|
|
193 lbsr L02B5
|
|
194 lbsr L030B
|
|
195 lbsr L02B5
|
|
196 lbsr L02D3
|
|
197 lbsr L02B5
|
|
198 lbsr L02B5
|
|
199 bsr L026E
|
|
200 bsr L0280
|
|
201 leay <u0013,u
|
|
202 lbsr L02E6
|
|
203 L022C lbsr L02F5
|
|
204 bra L0253
|
|
205 L0231 lbsr L030B
|
|
206 ldd <u0034
|
|
207 clr <u0006
|
|
208 bsr L0274
|
|
209 bsr L02B5
|
|
210 leay <u0013,u
|
|
211 lbsr L02E6
|
|
212 lbsr L02F5
|
|
213 lbsr L02D3
|
|
214 bsr L02B5
|
|
215 bsr L02B5
|
|
216 bsr L026E
|
|
217 bsr L0280
|
|
218 lbsr L02F5
|
|
219 L0253 leax <u0013,u
|
|
220 ldy #$0020
|
|
221 lda <u0002
|
|
222 os9 I$Read
|
|
223 lbcc L01C5
|
|
224 cmpb #$D3
|
|
225 bne L0268
|
|
226 clrb
|
|
227 L0268 lbsr L02F5
|
|
228 os9 F$Exit
|
|
229 L026E lda <u0030
|
|
230 bsr L0298
|
|
231 ldd <u0031
|
|
232 L0274 bsr L029A
|
|
233 tfr b,a
|
|
234 bsr L028E
|
|
235 inc <u0006
|
|
236 bsr L029C
|
|
237 bra L02B5
|
|
238 L0280 ldd <u003C
|
|
239 bsr L0298
|
|
240 tfr b,a
|
|
241 bsr L029A
|
|
242 bsr L02B5
|
|
243 ldd <u003E
|
|
244 bra L0274
|
|
245 L028E pshs a
|
|
246 lsra
|
|
247 lsra
|
|
248 lsra
|
|
249 lsra
|
|
250 bsr L029E
|
|
251 puls pc,a
|
|
252 L0298 clr <u0006
|
|
253 L029A bsr L028E
|
|
254 L029C anda #$0F
|
|
255 L029E tsta
|
|
256 beq L02A3
|
|
257 sta <u0006
|
|
258 L02A3 tst <u0006
|
|
259 bne L02AB
|
|
260 lda #$20
|
|
261 bra L02B7
|
|
262 L02AB adda #$30
|
|
263 cmpa #$39
|
|
264 bls L02B7
|
|
265 adda #$07
|
|
266 bra L02B7
|
|
267 L02B5 lda #$20
|
|
268 L02B7 pshs x
|
|
269 ldx <u000B
|
|
270 cmpx #$0090
|
|
271 bcs L02C4
|
|
272 bsr L02F1
|
|
273 ldx <u000B
|
|
274 L02C4 sta ,x+
|
|
275 stx <u000B
|
|
276 puls pc,x
|
|
277 L02CA fcc "dsewrewr"
|
|
278 fcb $FF
|
|
279 L02D3 fcb $D6,$33,$30,$8C,$F2
|
|
280 lda ,x+
|
|
281 L02DA lslb
|
|
282 bcs L02DF
|
|
283 lda #$2D
|
|
284 L02DF bsr L02B7
|
|
285 lda ,x+
|
|
286 bpl L02DA
|
|
287 rts
|
|
288 L02E6 lda ,y
|
|
289 anda #$7F
|
|
290 bsr L02B7
|
|
291 lda ,y+
|
|
292 bpl L02E6
|
|
293 rts
|
|
294 L02F1 pshs y,x,b,a
|
|
295 bra L02FB
|
|
296 L02F5 pshs y,x,b,a
|
|
297 lda #$0D
|
|
298 bsr L02B7
|
|
299 L02FB leax <u0040,u
|
|
300 stx <u000B
|
|
301 ldy #$0050
|
|
302 lda #$01
|
|
303 os9 I$WritLn
|
|
304 puls pc,y,x,b,a
|
|
305 L030B leax <u0036,u
|
|
306 L030E bsr L0338
|
|
307 bsr L0324
|
|
308 bsr L0324
|
|
309 bsr L02B5
|
|
310 bsr L034F
|
|
311 tst <u000A
|
|
312 beq L0320
|
|
313 bsr L034F
|
|
314 bra L02B5
|
|
315 L0320 bsr L0332
|
|
316 bra L02B5
|
|
317 L0324 lda #$2F
|
|
318 bra L0334
|
|
319 L0328 tst <u000A
|
|
320 bne L0330
|
|
321 leax u000D,u
|
|
322 bra L030E
|
|
323 L0330 bsr L034F
|
|
324 L0332 lda #$3A
|
|
325 L0334 bsr L02B7
|
|
326 bra L034F
|
|
327 L0338 lda #$AE
|
|
328 ldb ,x
|
|
329 L033C inca
|
|
330 subb #$64
|
|
331 bcc L033C
|
|
332 stb ,x
|
|
333 tfr a,b
|
|
334 tst <u000A
|
|
335 bne L034B
|
|
336 bsr L035F
|
|
337 L034B ldb ,x+
|
|
338 bra L035F
|
|
339 L034F ldb ,x+
|
|
340 lda #$2F
|
|
341 L0353 inca
|
|
342 subb #$64
|
|
343 bcc L0353
|
|
344 cmpa #$30
|
|
345 beq L035F
|
|
346 lbsr L02B7
|
|
347 L035F lda #$3A
|
|
348 L0361 deca
|
|
349 addb #$0A
|
|
350 bcc L0361
|
|
351 lbsr L02B7
|
|
352 tfr b,a
|
|
353 adda #$30
|
|
354 lbra L02B7
|
|
355 L0370 ldd ,x+
|
|
356 cmpa #$20
|
|
357 beq L0370
|
|
358 cmpa #$2C
|
|
359 beq L0370
|
|
360 eora #$45
|
|
361 anda #$DF
|
|
362 bne L0388
|
|
363 cmpb #$30
|
|
364 bcc L039A
|
|
365 inc <u0003
|
|
366 bra L0370
|
|
367 L0388 lda -$01,x
|
|
368 eora #$58
|
|
369 anda #$DF
|
|
370 bne L039A
|
|
371 cmpb #$30
|
|
372 bcc L039A
|
|
373 lda #$04
|
|
374 sta <u0004
|
|
375 bra L0370
|
|
376 L039A rts
|
|
377
|
|
378 emod
|
|
379 eom equ *
|
|
380 end
|