annotate level1/cmds/dir.asm @ 1325:84ea83668304

Redid comments, reset all rev nibbles that weren't explictly set to 0
author boisy
date Thu, 04 Sep 2003 23:06:16 +0000
parents 6a26cab206d2
children 20841f236e32
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 * Dir - Show directory
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 *
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
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
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.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 nam Dir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 ttl Show directory
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22
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
23 * Disassembled 99/04/11 16:36:40 by Disasm v1.6 (C) 1988 by RML
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 use defsfile
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
27 use rbfdefs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 atrv set ReEnt+rev
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
32 rev set $00
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
33 edition set 11
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
37 org 0
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
38 nextdir rmb 2
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
39 dircount rmb 1
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
40 dirpath rmb 1
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
41 extended rmb 1
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
42 addmode rmb 1 additional mode
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
43 rawpath rmb 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
44 u0006 rmb 2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u0008 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 u0009 rmb 1
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
47 narrow rmb 1
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
48 bufptr rmb 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
49 u000C rmb 1
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
50 date rmb 3
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
51 time rmb 3
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 u0013 rmb 29
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 u0030 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 u0031 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 u0032 rmb 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
56 u0033 rmb 1
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
57 u0034 rmb 2
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
58 u0036 rmb 6
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
59 u003C rmb 2
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
60 u003E rmb 2
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
61 linebuff rmb 530
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 name fcs /Dir/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
67 DirOf fcb C$LF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 fcs " Directory of "
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
69 Dot fcc "."
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 fcb C$CR
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
71 Raw fcc "@"
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
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
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
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
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 fcc "==============================="
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
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
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
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
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
95 ldd #$1030
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
96 std <u0008
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 pshs y,x,b,a
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
98 lda #$01 standard output
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
99 ldb #SS.ScSiz we want screen size
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
100 os9 I$GetStt get it
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
101 bcc L0120 branch if gotten
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
102 cmpb #E$UnkSvc unknown service error?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
103 beq NoScSiz branch if so
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 puls y,x,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
105 lbra L0268
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
106 L0120 cmpx #64 at least this wide?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
107 bge NoScSiz branch if so
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
108 inc <narrow else we're going narrow
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
109 ldd #$0A14
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
110 std <u0008
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
111 NoScSiz puls y,x,b,a
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
112 pshs x save start of command line
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
113 lbsr GetOpts parse for options
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
114 puls x get start of command line
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
115 lbsr SkipSpcs skip any spaces
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
116 cmpa #C$CR any dir names?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
117 bne opendir branch if so
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
118 leax >Dot,pcr else assume dot
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
119 opendir stx <nextdir
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
120 lda #DIR.+READ.
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
121 ora <addmode
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
122 pshs x,a preserve mode, dir name
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 os9 I$Open
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
124 sta <dirpath
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
125 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
126 lbcs L0268
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
127 os9 I$ChgDir change to dir
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
128 lbcs L0268 branch if error
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
129 pshs x X now points just past name
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
130 leay >DirOf,pcr point to "Dir of..."
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
131 lbsr PutStr put it in buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
132 ldx <nextdir point to directory we are processing
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
133 L0161 lda ,x+ get char
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
134 lbsr PutNBuf put in buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
135 cmpx ,s at end of char string?
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
136 bcs L0161 branch if not
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
137 leas $02,s else clean up stack
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
138 lbsr PutSpace and put a space
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
139 lbsr PutSpace and another one
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
140 leax date,u point to date buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
141 os9 F$Time get current time
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
142 leax <time,u point to time
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
143 lbsr ShowDate show it
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
144 lbsr CRnWrite
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
145 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
146 beq L01B3
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
147 lda #READ.
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
148 ora <addmode
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
149 leax >Raw,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 os9 I$Open
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
151 lbcs L0268
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
152 sta <rawpath
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
153 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
154 bne L01A6
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
155 leax >WHeader,pcr
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
156 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
157 bra L01AE
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
158 L01A6 leax >NHeader,pcr
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
159 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
160 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
161 os9 I$Write
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
162 L01B3 lda <dirpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 pshs u
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
165 ldu #DIR.SZ*2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 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
168 lbra L0253
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
169 L01C5 tst <u0013
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
170 lbeq L0253
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
171 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
172 bne L01E8
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
173 leay <u0013,u
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
174 lbsr PutStr
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
175 L01D5 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
176 ldb <u000C
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
177 subb #$40
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
178 cmpb <u0009
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
179 bhi L022C
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
180 L01E0 subb <u0008
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
181 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
182 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
183 bra L0253
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
184 L01E8 pshs u
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
185 lda <u0032
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 tfr d,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
188 ldx <u0030
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
189 lda <rawpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 os9 I$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 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
192 bcs L0268
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
193 leax <u0033,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 ldy #$000D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 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
196 bcs L0268
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
197 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
198 bne L0231
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
199 ldd <u0034
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 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
201 bsr L0274
848
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 lbsr L030B
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
204 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
205 lbsr L02D3
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
206 lbsr PutSpace
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
207 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
208 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
209 bsr L0280
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
210 leay <u0013,u
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
211 lbsr PutStr
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
212 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
213 bra L0253
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 L0231 lbsr L030B
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
215 ldd <u0034
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 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
217 bsr L0274
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
218 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
219 leay <u0013,u
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
220 lbsr PutStr
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
221 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
222 lbsr L02D3
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
223 bsr PutSpace
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
224 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
225 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
226 bsr L0280
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
227 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
228 L0253 leax <u0013,u
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
229 ldy #DIR.SZ
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
230 lda <dirpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 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
232 lbcc L01C5
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
233 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
234 bne L0268
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 clrb
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
236 L0268 lbsr CRnWrite
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
237 Exit os9 F$Exit
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 L026E lda <u0030
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
239 bsr L0298
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 ldd <u0031
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
241 L0274 bsr L029A
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 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
243 bsr L028E
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 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
245 bsr L029C
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
246 bra 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
247 L0280 ldd <u003C
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
248 bsr L0298
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 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
250 bsr L029A
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
251 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
252 ldd <u003E
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
253 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
254 L028E pshs a
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 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
259 bsr L029E
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 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
261 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
262 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
263 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
264 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
265 beq L02A3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 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
267 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
268 bne L02AB
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
269 lda #C$SPAC
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
270 bra PutNBuf
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
271 L02AB adda #'0
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
272 cmpa #'9
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
273 bls PutNBuf
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 adda #$07
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
275 bra PutNBuf
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
276 PutSpace lda #C$SPAC
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
277
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
278 * Entry: A = char to put in buffer
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
279 PutNBuf pshs x save caller's X
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
280 ldx <bufptr get buffer next pointer
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
281 cmpx #$0090 past end?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
282 bne PutOk branch if not
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
283 bsr WriteBuf
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
284 ldx <bufptr get pointer
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
285 PutOk sta ,x+ save A
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
286 stx <bufptr and update pointer
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
287 puls pc,x return
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
288
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
289 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
290 fcb $FF
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
291
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
292 L02D3 ldb <u0033
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
293 leax <PermMask,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 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
295 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
296 bcs L02DF
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
297 lda #'-
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
298 L02DF bsr PutNBuf
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 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
300 bpl L02DA
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 rts
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
302
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
303 * Put hi-bit terminated string at Y into line buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
304 PutStr lda ,y get char in A from Y
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
305 anda #$7F strip off hi-bit
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
306 bsr PutNBuf put in buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
307 lda ,y+ get char again
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
308 bpl PutStr if hi-bit not set, continue
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 rts
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
310
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
311 WriteBuf pshs y,x,b,a
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
312 bra DoWrite
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
313 CRnWrite pshs y,x,b,a
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
314 lda #C$CR
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
315 bsr PutNBuf
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
316 DoWrite leax <linebuff,u
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
317 stx <bufptr
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
318 ldy #80
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 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
321 puls pc,y,x,b,a
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 L030B leax <u0036,u
bdd31b961b6f Moved from OS-9 Level Two V3 -- this dir is the Tandy OS-9 Level Two dir with
boisy
parents: 200
diff changeset
323 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
324 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
325 bsr L0324
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
326 bsr PutSpace
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
327 bsr Byte2ASC
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
328 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
329 beq L0320
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
330 bsr Byte2ASC
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
331 bra PutSpace
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
332 L0320 bsr DoColon
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
333 bra PutSpace
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
334 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
335 bra L0334
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
336
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
337 ShowDate tst <narrow are we on a narrow screen?
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
338 bne ShowTime branch if we are
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
339 leax date,u else point to date buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
340 bra L030E and show date and time
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
341 ShowTime bsr Byte2ASC show hours
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
342 DoColon lda #': put up colon
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
343 L0334 bsr PutNBuf put in buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
344 bra Byte2ASC show minutes
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
345
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
346 L0338 lda #$AE
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 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
348 L033C inca
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
349 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
350 bcc L033C
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 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
352 tfr a,b
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
353 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
354 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
355 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
356 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
357 bra L035F
851
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
358
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
359 * Get byte at X and put ASCII value in buffer
16b8c7dc0082 Made source comment improvements
boisy
parents: 848
diff changeset
360 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
361 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
362 L0353 inca
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
363 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
364 bcc L0353
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
365 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
366 beq L035F
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
367 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
368 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
369 L0361 deca
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
370 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
371 bcc L0361
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
372 lbsr PutNBuf
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 tfr b,a
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
374 adda #'0
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
375 lbra PutNBuf
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
376
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
377 * Entry: X = ptr to line to start parsing
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
378 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
379 cmpa #C$CR CR?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
380 beq L039A yep, return
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
381 cmpa #'- option?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
382 beq GetDash branch if not
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
383 * Must be dir name, skip
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
384 inc <dircount
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
385 bsr SkipNSpc skip spaces
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
386 ChkDash bsr SkipSpcs skip spaces
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
387 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
388 L039A rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
390 GetDash lda #C$SPAC
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
391 sta -1,x
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
392 GetDash2 ldd ,x+
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
393 ora #$20 make lowercase
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
394 IsItE cmpa #'e extended dir?
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
395 bne IsItX
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
396 sta <extended
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
397 bra FixCmdLn
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
398 IsItX cmpa #'x
935
6a26cab206d2 E$IllArg is returned if bad option used
boisy
parents: 851
diff changeset
399 beq ItIsX
6a26cab206d2 E$IllArg is returned if bad option used
boisy
parents: 851
diff changeset
400 ldb #E$IllArg
6a26cab206d2 E$IllArg is returned if bad option used
boisy
parents: 851
diff changeset
401 lbra Exit bad option, just exit
6a26cab206d2 E$IllArg is returned if bad option used
boisy
parents: 851
diff changeset
402 ItIsX lda #EXEC.
848
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
403 sta <addmode
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
404 FixCmdLn lda #C$SPAC
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
405 sta -1,x
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
406 cmpb #'0
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
407 lblt ChkDash
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
408 bra GetDash
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
409
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
410 SkipSpcs lda ,x+
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
411 cmpa #C$SPAC
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
412 beq SkipSpcs
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
413 leax -1,x
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
414 rts
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
415
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
416 SkipNSpc lda ,x+
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
417 cmpa #C$SPAC
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
418 beq SkipNRTS
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
419 cmpa #C$CR
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
420 bne SkipNSpc
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
421 SkipNRTS leax -1,x
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
422 rts
c6ebca55eed3 Dir now uses -e and -x and deldir changed accordingly
boisy
parents: 364
diff changeset
423
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 end