Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/del.asm @ 831:27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
author | boisy |
---|---|
date | Tue, 14 Jan 2003 04:29:43 +0000 |
parents | e9ce43cc215e |
children | 94475d26192c |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Del - File deletion utility | |
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:
11
diff
changeset
|
8 * 5 From Tandy OS-9 Level One VR 02.00.00 |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
9 * 6 Now option can be anywhere on command line, BGP 03/01/13 |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
10 * and all files will be deleted. Made smaller |
0 | 11 |
12 nam Del | |
13 ttl File deletion utility | |
14 | |
15 * Disassembled 98/09/10 22:43:13 by Disasm v1.6 (C) 1988 by RML | |
16 | |
17 ifp1 | |
18 use defsfile | |
19 endc | |
20 | |
21 tylg set Prgrm+Objct | |
22 atrv set ReEnt+rev | |
23 rev set $01 | |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
24 edition set 6 |
0 | 25 |
26 mod eom,name,tylg,atrv,start,size | |
27 | |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
28 amode rmb 1 |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
29 rmb 250 |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
30 stack rmb 200 |
0 | 31 size equ . |
32 | |
33 name fcs /Del/ | |
34 fcb edition | |
35 | |
36 HelpMsg fcb C$LF | |
37 fcc "Use: Del [-x] <path> {<path>} [-x]" | |
38 fcb C$CR | |
39 | |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
40 start lda ,x get first char on command line |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
41 cmpa #C$CR carriage return? |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
42 beq ShowHelp if so, no params, show help |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
43 lda #READ. |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
44 sta <amode |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
45 pshs x save param pointer |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
46 bsr GetOpts get opts |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
47 puls x get param pointer |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
48 L0043 lda <amode |
0 | 49 os9 I$DeletX |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
50 bcs Exit |
0 | 51 lda ,x |
52 cmpa #C$CR | |
53 bne L0043 | |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
54 ExitOk clrb |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
55 Exit os9 F$Exit |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
56 |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
57 GetOpts ldd ,x+ |
0 | 58 cmpa #C$SPAC |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
59 beq GetOpts |
0 | 60 cmpa #C$COMA |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
61 beq GetOpts |
0 | 62 cmpa #C$CR |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
63 beq Return |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
64 cmpa #'- |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
65 bne SkipName |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
66 eorb #'X |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
67 andb #$DF |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
68 bne ShowHelp |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
69 lda #EXEC. |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
70 sta <amode |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
71 ldd #$2020 |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
72 std -1,x write over option |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
73 SkipName lda ,x+ |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
74 cmpa #C$SPAC |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
75 beq GetOpts |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
76 cmpa #C$COMA |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
77 beq GetOpts |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
78 CheckCR cmpa #C$CR |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
79 bne SkipName |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
80 Return rts |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
81 |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
82 ShowHelp leax >HelpMsg,pcr |
0 | 83 ldy #80 |
831
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
84 lda #2 stderr |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
85 os9 I$WritLn write help |
27f21cba6b30
Optimzed, now del deletes all files regardless of where -x is on command line
boisy
parents:
200
diff
changeset
|
86 bra ExitOk |
0 | 87 |
88 emod | |
89 eom equ * | |
90 end | |
91 |