Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/dir.asm @ 2898:28ed72477814 lwtools-port
Dummy merge of default branch into lwtools
hg -y merge --tool=internal:fail default
hg revert --all --no-backup --rev .
hg resolve -a -m
This dummy merge discards any changes from the default branch
so that the result is the same as what lwtools already had.
When merging back to default branch later, the discarded
changes will be discarded there also, so the result
will be that the default branch will contain what
the lwtools branch had before these merges.
Only scripts/burst was "rescued" from default branch.
author | Tormod Volden <debian.tormod@gmail.com> |
---|---|
date | Sat, 11 Jan 2014 18:40:44 +0100 |
parents | fc5761a685b6 |
children |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Dir - Show directory | |
3 * | |
4 * $Id$ | |
5 * | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
6 * This dir initially started from the dir command that came with |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
7 * the OS-9 Level Two package, then incorporated Glenside's Y2K |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
8 * fix. |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
9 * |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
10 * Edt/Rev YYYY/MM/DD Modified by |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
11 * Comment |
0 | 12 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
13 * 10 1999/05/11 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
14 * Incorporated Glenside Y2K fixes. |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
15 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
16 * 11 2003/01/14 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
17 * Made option handling more flexible, now they must be preceeded |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
935
diff
changeset
|
18 * by a dash. |
1809 | 19 * |
20 * 11 2003/01/14 Boisy G. Pitre | |
21 * Made option handling more flexible, now they must be preceeded | |
22 * by a dash. | |
23 * | |
24 * 11r1 2005/04/19 Boisy G. Pitre | |
25 * Made column width code more robust. | |
1916 | 26 * |
27 * 12 2005/11/22 Boisy G. Pitre | |
28 * -e option now uses SS.FDInf for portability to other file managers | |
0 | 29 |
30 nam Dir | |
31 ttl Show directory | |
32 | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
33 * Disassembled 99/04/11 16:36:40 by Disasm v1.6 (C) 1988 by RML |
0 | 34 |
35 ifp1 | |
36 use defsfile | |
37 endc | |
38 | |
39 tylg set Prgrm+Objct | |
40 atrv set ReEnt+rev | |
1916 | 41 rev set $00 |
42 edition set 12 | |
0 | 43 |
44 mod eom,name,tylg,atrv,start,size | |
45 | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
46 org 0 |
851 | 47 nextdir rmb 2 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
48 dircount rmb 1 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
49 dirpath rmb 1 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
50 extended rmb 1 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
51 addmode rmb 1 additional mode |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
52 u0006 rmb 2 |
1916 | 53 colwidth rmb 1 |
54 lastcol rmb 1 | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
55 narrow rmb 1 |
1916 | 56 bufptr rmb 2 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
57 date rmb 3 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
58 time rmb 3 |
1916 | 59 dent rmb DIR.SZ |
60 fdsect rmb FD.Creat-FD.ATT | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
61 linebuff rmb 530 |
0 | 62 size equ . |
63 | |
1809 | 64 colsize equ 16 |
65 | |
0 | 66 name fcs /Dir/ |
67 fcb edition | |
68 | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
69 DirOf fcb C$LF |
0 | 70 fcs " Directory of " |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
71 Dot fcc "." |
0 | 72 fcb C$CR |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
73 WHeader fcb C$CR,C$LF |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
74 fcc "Owner Last modified Attributes Sector Bytecount Name" |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
75 fcb C$CR,C$LF |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
76 fcc "----- ---------------- ---------- ------ --------- ----" |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
77 fcb C$CR,C$LF |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
78 WHeaderL equ *-WHeader |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
79 NHeader fcb C$CR,C$LF |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
80 fcc "Modified on Owner Name" |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
81 fcb C$CR,C$LF |
0 | 82 fcc " Attr Sector Size" |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
83 fcb C$CR,C$LF |
0 | 84 fcc "===============================" |
85 fcb C$CR | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
86 fcb C$LF |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
87 NHeaderL equ *-NHeader |
0 | 88 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
89 start leay <linebuff,u get ptr to line buffer |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
90 sty <bufptr and save it |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
91 clr <addmode |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
92 clr <extended |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
93 clr <narrow |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
94 clr <dircount |
0 | 95 pshs y,x,b,a |
1809 | 96 ldd #$01*256+SS.ScSiz standard output and screen size call |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
97 os9 I$GetStt get it |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
98 bcc L0120 branch if gotten |
1809 | 99 ldx #80 |
100 L0120 tfr x,d | |
101 cmpb #51 | |
102 bgt higher | |
103 inc <narrow | |
104 lda #10 | |
105 fcb $8C | |
106 higher lda #16 | |
107 pshs a | |
108 subb ,s+ | |
1916 | 109 std <colwidth save new column width and last column |
0 | 110 puls y,x,b,a |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
111 pshs x save start of command line |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
112 lbsr GetOpts parse for options |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
113 puls x get start of command line |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
114 lbsr SkipSpcs skip any spaces |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
115 cmpa #C$CR any dir names? |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
116 bne opendir branch if so |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
117 leax >Dot,pcr else assume dot |
851 | 118 opendir stx <nextdir |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
119 lda #DIR.+READ. |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
120 ora <addmode |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
121 pshs x,a preserve mode, dir name |
0 | 122 os9 I$Open |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
123 sta <dirpath |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
124 puls x,a get mode, dir name |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
125 lbcs L0268 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
126 os9 I$ChgDir change to dir |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
127 lbcs L0268 branch if error |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
128 pshs x X now points just past name |
851 | 129 leay >DirOf,pcr point to "Dir of..." |
130 lbsr PutStr put it in buffer | |
131 ldx <nextdir point to directory we are processing | |
132 L0161 lda ,x+ get char | |
133 lbsr PutNBuf put in buffer | |
134 cmpx ,s at end of char string? | |
135 bcs L0161 branch if not | |
136 leas $02,s else clean up stack | |
137 lbsr PutSpace and put a space | |
138 lbsr PutSpace and another one | |
139 leax date,u point to date buffer | |
140 os9 F$Time get current time | |
141 leax <time,u point to time | |
142 lbsr ShowDate show it | |
143 lbsr CRnWrite | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
144 tst <extended |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
145 beq L01B3 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
146 tst <narrow |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
147 bne L01A6 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
148 leax >WHeader,pcr |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
149 ldy #WHeaderL |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
150 bra L01AE |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
151 L01A6 leax >NHeader,pcr |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
152 ldy #NHeaderL |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
153 L01AE lda #$01 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
154 os9 I$Write |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
155 L01B3 lda <dirpath |
0 | 156 ldx #$0000 |
157 pshs u | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
158 ldu #DIR.SZ*2 |
0 | 159 os9 I$Seek |
160 puls u | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
161 lbra L0253 |
1916 | 162 L01C5 tst <dent |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
163 lbeq L0253 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
164 tst <extended |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
165 bne L01E8 |
1916 | 166 leay <dent,u |
851 | 167 lbsr PutStr |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
168 L01D5 lbsr PutSpace |
1916 | 169 ldb <bufptr+1 |
170 subb #64 | |
171 cmpb <lastcol | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
172 bhi L022C |
1916 | 173 L01E0 subb <colwidth |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
174 bhi L01E0 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
175 bne L01D5 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
176 bra L0253 |
1916 | 177 L01E8 |
178 * Use SS.FDInf to get the file descriptor sector | |
179 pshs u | |
180 lda <dent+DIR.FD | |
181 ldb #FD.Creat-FD.ATT | |
182 tfr d,y | |
183 leax <fdsect,u | |
184 lda <dirpath | |
185 ldb #SS.FDInf | |
186 ldu <dent+DIR.FD+1 | |
187 os9 I$GetStt | |
0 | 188 puls u |
1916 | 189 bcs L0268 branch if SS.FDInf fails |
190 tst <narrow are we on a narrow screen? | |
191 bne L0231 branch if so | |
192 | |
193 * Wide extended output | |
194 ldd <fdsect+FD.OWN | |
0 | 195 clr <u0006 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
196 bsr L0274 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
197 lbsr PutSpace |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
198 lbsr L030B |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
199 lbsr PutSpace |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
200 lbsr L02D3 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
201 lbsr PutSpace |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
202 lbsr PutSpace |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
203 bsr L026E |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
204 bsr L0280 |
1916 | 205 leay <dent,u |
851 | 206 lbsr PutStr |
207 L022C lbsr CRnWrite | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
208 bra L0253 |
1916 | 209 |
210 * Narrow extended output | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
211 L0231 lbsr L030B |
1916 | 212 ldd <fdsect+FD.OWN |
0 | 213 clr <u0006 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
214 bsr L0274 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
215 bsr PutSpace |
1916 | 216 leay <dent,u |
851 | 217 lbsr PutStr |
218 lbsr CRnWrite | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
219 lbsr L02D3 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
220 bsr PutSpace |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
221 bsr PutSpace |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
222 bsr L026E |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
223 bsr L0280 |
851 | 224 lbsr CRnWrite |
1916 | 225 L0253 leax <dent,u |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
226 ldy #DIR.SZ |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
227 lda <dirpath |
0 | 228 os9 I$Read |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
229 lbcc L01C5 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
230 cmpb #E$EOF |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
231 bne L0268 |
0 | 232 clrb |
851 | 233 L0268 lbsr CRnWrite |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
234 Exit os9 F$Exit |
1916 | 235 L026E lda <dent+DIR.FD |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
236 bsr L0298 |
1916 | 237 ldd <dent+DIR.FD+1 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
238 L0274 bsr L029A |
0 | 239 tfr b,a |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
240 bsr L028E |
0 | 241 inc <u0006 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
242 bsr L029C |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
243 bra PutSpace |
1916 | 244 L0280 ldd <fdsect+FD.SIZ |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
245 bsr L0298 |
0 | 246 tfr b,a |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
247 bsr L029A |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
248 bsr PutSpace |
1916 | 249 ldd <fdsect+FD.SIZ+2 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
250 bra L0274 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
251 L028E pshs a |
0 | 252 lsra |
253 lsra | |
254 lsra | |
255 lsra | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
256 bsr L029E |
0 | 257 puls pc,a |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
258 L0298 clr <u0006 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
259 L029A bsr L028E |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
260 L029C anda #$0F |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
261 L029E tsta |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
262 beq L02A3 |
0 | 263 sta <u0006 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
264 L02A3 tst <u0006 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
265 bne L02AB |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
266 lda #C$SPAC |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
267 bra PutNBuf |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
268 L02AB adda #'0 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
269 cmpa #'9 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
270 bls PutNBuf |
0 | 271 adda #$07 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
272 bra PutNBuf |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
273 PutSpace lda #C$SPAC |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
274 |
851 | 275 * Entry: A = char to put in buffer |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
276 PutNBuf pshs x save caller's X |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
277 ldx <bufptr get buffer next pointer |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
278 cmpx #$0090 past end? |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
279 bne PutOk branch if not |
851 | 280 bsr WriteBuf |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
281 ldx <bufptr get pointer |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
282 PutOk sta ,x+ save A |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
283 stx <bufptr and update pointer |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
284 puls pc,x return |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
285 |
851 | 286 PermMask fcc "dsewrewr" |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
287 fcb $FF |
851 | 288 |
1916 | 289 L02D3 ldb <fdsect+FD.ATT |
851 | 290 leax <PermMask,pcr |
0 | 291 lda ,x+ |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
292 L02DA lslb |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
293 bcs L02DF |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
294 lda #'- |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
295 L02DF bsr PutNBuf |
0 | 296 lda ,x+ |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
297 bpl L02DA |
0 | 298 rts |
851 | 299 |
300 * Put hi-bit terminated string at Y into line buffer | |
301 PutStr lda ,y get char in A from Y | |
302 anda #$7F strip off hi-bit | |
303 bsr PutNBuf put in buffer | |
304 lda ,y+ get char again | |
305 bpl PutStr if hi-bit not set, continue | |
0 | 306 rts |
851 | 307 |
308 WriteBuf pshs y,x,b,a | |
309 bra DoWrite | |
310 CRnWrite pshs y,x,b,a | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
311 lda #C$CR |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
312 bsr PutNBuf |
851 | 313 DoWrite leax <linebuff,u |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
314 stx <bufptr |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
315 ldy #80 |
0 | 316 lda #$01 |
317 os9 I$WritLn | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
318 puls pc,y,x,b,a |
1916 | 319 L030B leax <fdsect+FD.DAT,u |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
320 L030E bsr L0338 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
321 bsr L0324 |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
322 bsr L0324 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
323 bsr PutSpace |
851 | 324 bsr Byte2ASC |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
325 tst <narrow |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
326 beq L0320 |
851 | 327 bsr Byte2ASC |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
328 bra PutSpace |
851 | 329 L0320 bsr DoColon |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
330 bra PutSpace |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
331 L0324 lda #'/ |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
332 bra L0334 |
851 | 333 |
334 ShowDate tst <narrow are we on a narrow screen? | |
335 bne ShowTime branch if we are | |
336 leax date,u else point to date buffer | |
337 bra L030E and show date and time | |
338 ShowTime bsr Byte2ASC show hours | |
339 DoColon lda #': put up colon | |
340 L0334 bsr PutNBuf put in buffer | |
341 bra Byte2ASC show minutes | |
342 | |
1916 | 343 L0338 lda #'.+128 |
0 | 344 ldb ,x |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
345 L033C inca |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
346 subb #100 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
347 bcc L033C |
0 | 348 stb ,x |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
349 tfr a,b |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
350 tst <narrow |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
351 bne L034B |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
352 bsr L035F |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
353 L034B ldb ,x+ |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
354 bra L035F |
851 | 355 |
356 * Get byte at X and put ASCII value in buffer | |
357 Byte2ASC ldb ,x+ | |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
358 lda #$2F |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
359 L0353 inca |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
360 subb #100 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
361 bcc L0353 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
362 cmpa #'0 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
363 beq L035F |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
364 lbsr PutNBuf |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
365 L035F lda #$3A |
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
366 L0361 deca |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
367 addb #10 |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
368 bcc L0361 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
369 lbsr PutNBuf |
0 | 370 tfr b,a |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
371 adda #'0 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
372 lbra PutNBuf |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
373 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
374 * Entry: X = ptr to line to start parsing |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
375 GetOpts lda ,x+ get next char on cmd line |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
376 cmpa #C$CR CR? |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
377 beq L039A yep, return |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
378 cmpa #'- option? |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
379 beq GetDash branch if not |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
380 * Must be dir name, skip |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
381 inc <dircount |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
382 bsr SkipNSpc skip spaces |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
383 ChkDash bsr SkipSpcs skip spaces |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
384 bra GetOpts and resart parsing |
326
bdd31b961b6f
Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents:
200
diff
changeset
|
385 L039A rts |
0 | 386 |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
387 GetDash lda #C$SPAC |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
388 sta -1,x |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
389 GetDash2 ldd ,x+ |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
390 ora #$20 make lowercase |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
391 IsItE cmpa #'e extended dir? |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
392 bne IsItX |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
393 sta <extended |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
394 bra FixCmdLn |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
395 IsItX cmpa #'x |
935 | 396 beq ItIsX |
397 ldb #E$IllArg | |
398 lbra Exit bad option, just exit | |
399 ItIsX lda #EXEC. | |
848
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
400 sta <addmode |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
401 FixCmdLn lda #C$SPAC |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
402 sta -1,x |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
403 cmpb #'0 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
404 lblt ChkDash |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
405 bra GetDash |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
406 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
407 SkipSpcs lda ,x+ |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
408 cmpa #C$SPAC |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
409 beq SkipSpcs |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
410 leax -1,x |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
411 rts |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
412 |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
413 SkipNSpc lda ,x+ |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
414 cmpa #C$SPAC |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
415 beq SkipNRTS |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
416 cmpa #C$CR |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
417 bne SkipNSpc |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
418 SkipNRTS leax -1,x |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
419 rts |
c6ebca55eed3
Dir now uses -e and -x and deldir changed accordingly
boisy
parents:
364
diff
changeset
|
420 |
0 | 421 emod |
422 eom equ * | |
423 end |