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