annotate level1/cmds/rename.asm @ 185:3a84dad1f851

made further changes
author boisy
date Sat, 13 Jul 2002 20:22:10 +0000
parents 6641a883d6b0
children e9ce43cc215e
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 * Rename - Rename a file
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 * ------------------------------------------------------------------
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * 6 Original Tandy/Microware version
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 nam Rename
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl Rename a file
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Disassembled 98/09/11 01:35:46 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 edition set 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 u0000 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 u0001 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u0002 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0004 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u0005 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u0007 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0008 rmb 24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u0020 rmb 26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u003A rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u003C rmb 405
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 name fcs /Rename/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 start cmpd #$0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 lbcs L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 stx <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 lda #WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 bcc L0032
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 cmpb #E$FNA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 bne L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 ldx <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 lda #DIR.+WRITE.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 L0032 stx <u0005
185
3a84dad1f851 made further changes
boisy
parents: 0
diff changeset
54 ldb #SS.Opt
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 leax <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 os9 I$GetStt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 ldb <u0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 cmpb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 bne L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 bsr L00AE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 ldx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 lda #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 sta -1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 ldx <u0000
185
3a84dad1f851 made further changes
boisy
parents: 0
diff changeset
69 lda #READ.+WRITE.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 os9 I$ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 ldx <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 ldb <u0008
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 ora #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 sta b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 cmpb <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 bne L0075
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 leay ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 ldx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 os9 F$CmpNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 bcc L0082
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 L0075 ldx <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 lda #READ.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 bcc L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 cmpb #E$PNNF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 bne L00A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 L0082 leax <L00AC,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 lda #DIR.!UPDAT.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 os9 I$Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 ldx <u003A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 ldu <u003C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 ldx <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 ldy <u0007
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 os9 I$Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 os9 I$Close
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 bcs L00A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 L00A5 os9 F$Exit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 L00A8 ldb #E$BPNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 bra L00A5
185
3a84dad1f851 made further changes
boisy
parents: 0
diff changeset
109 L00AC fcc "."
3a84dad1f851 made further changes
boisy
parents: 0
diff changeset
110 fcb C$CR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 L00AE ldx <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 bsr L00F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 ldu <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 lda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 beq L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 lda ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 beq L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 leau <L00AC,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 stu <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 bra L00CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 L00C7 leax ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 bsr L00F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 bcs L00F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 L00CD stx <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 stb <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 leax ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 bsr L00F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 bcc L00CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 ldb <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 beq L00F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 ldx <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 bcs L00F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 lda ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 beq L00F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 cmpb #$1E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 bcc L00F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 stx <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 std <u0007
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 L00F2 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 ldb #E$BPNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 L00F6 os9 F$PrsNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 bcc L0119
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 leau ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 L00FE lda ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 bpl L0107
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 cmpa #$AE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 bne L010C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 L0107 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 cmpa #C$PERD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 beq L00FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 L010C decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 beq L0118
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 leay -u0001,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 cmpb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 bcc L0118
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 bra L0119
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 L0118 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 L0119 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173