annotate level1/cmds/dir_cb.asm @ 2265:581d99904cc5

makefiles updated
author boisy
date Mon, 28 Dec 2009 01:29:05 +0000
parents 3beb3d140cb5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1745
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
1 * DIR Edition #8 - Released Mar. 12/2000
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
2 * Added the '-c' option, which stands for case insensitive. This means that
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
3 * wildcard filename matches do not care as to whether the filenames are
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
4 * upper or lowercase, when compared to the wildcard filename search you
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
5 * specified. There still are some quirks to using the '*' wildcard in some
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
6 * cases... I am still tracking down why that is happening.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
7 *
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
8 * DIR Edition #7 - Released Jan. 16/2000
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
9 *
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
10 * This is a new version of the DIR command, based on the version Alan Dekok
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
11 * did with wildcarding. It fixes the year to work with modern clock drivers,
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
12 * allowing from 1900-2155. It also fixes the help message, and changes the
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
13 * edition # to 7. It should work with all version of OS9/NitrOS9/PowerBoost.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
14 *
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
15 * -Curtis-
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
16 *
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
17 * Edition #7: (L. Curtis Boyle)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
18 * 2000/01/15: Fixed help message bug.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
19 * 2000/01/16: Fixed year output to handle 1900-2155
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
20 *
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
21 * Edition #8 (Curtis)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
22 * 2000/03/11 Fixed Bad Filename error
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
23 * 2000/03/12 Added -c option (case insensitive filematching)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
24
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
25 * Need to do 1 things:
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
26 * Fix '*' wildcards (ex. DIR *.lzh returns completely different than
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
27 * DIR *lzh - 1st only does files with ONE '.' char, 2nd does mix of ONE
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
28 * and >1, but not all the same as first example???)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
29
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
30 nam dir
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
31 ttl program module
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
32
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
33 * Disassembled 94/11/18 12:51:39 by Alan DeKok
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
34
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
35 ifp1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
36 use defsfile
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
37 endc
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
38
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
39 tylg set Prgrm+Objct
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
40 atrv set ReEnt+rev
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
41 rev set $01
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
42 mod eom,name,tylg,atrv,start,size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
43
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
44 u0000 rmb 1 Path to current Directory
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
45 u0001 rmb 1 Path to RAW drive (current data or exec dir's drive)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
46 u0002 rmb 2 Pointer to directory we are DIRing
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
47 u0004 rmb 2 Ptr to end of current sub-parm (if more than 1)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
48 u0006 rmb 2 Pointer to filename match string we are DIRing
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
49 u0008 rmb 1 Case insensitive flag (0=NO)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
50 u0009 rmb 1 Wildcard matched flag (0=NO)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
51 u000A rmb 1 0=Filename not written yet, <>0 means is written out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
52 u000B rmb 1 Merge of directories/non-directories/ext. info flags
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
53 u000C rmb 1 Wildcards in effect flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
54 u000D rmb 1 Extended info flag (0=No)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
55 u000E rmb 1 Directories ONLY (0=No)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
56 u000F rmb 1 Non-directories ONLY (0=NO)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
57 u0010 rmb 1 One entry/line flag (0=Yes, else no)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
58 u0011 rmb 1 Screen width
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
59 u0012 rmb 1 # chars left on current output line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
60 u0013 rmb 2 Length of current filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
61 u0015 rmb 1 char from current directory entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
62 u0016 rmb 1 char from wild card string
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
63 u0017 rmb 1 Attributes for DIR open (Ex. EXEC)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
64 * File descriptor info - 1st 13 bytes - only used if certain options and/or
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
65 * extended directory listings are requested.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
66 u0018 rmb 1 File attributes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
67 u0019 rmb 2 File owner ID
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
68 u001B rmb 5 Date last modified
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
69 u0020 rmb 1 DIR path # (link count on FD read, but not used)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
70 u0021 rmb 4 File size (in bytes)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
71 * Start of WritLn buffer for each directory entry starts here
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
72 u0025 rmb 1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
73 * Information to be printed out goes here
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
74 * user-number, 4 bytes of hex, space space
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
75 u0026 rmb 6
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
76 * YY/MM/DD HHMM
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
77 u002C rmb 17
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
78 * file attributes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
79 u003B rmb 10
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
80 * starting sector number
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
81 u0045 rmb 8
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
82 * file size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
83 u004D rmb 8
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
84 * a space
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
85 u0055 rmb 1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
86 * file name
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
87 u0056 rmb 25
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
88 u006F rmb 1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
89 u0070 rmb 4
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
90 * starting sector of the file (3 bytes)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
91 u0074 rmb 2
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
92 u0076 rmb 1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
93 u0077 rmb 1 always 0
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
94 AllFlag rmb 1 $2E=don't print out .foo, $00=print out .foo
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
95 rmb 256 leave room for the stack
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
96 size equ .
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
97
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
98 name fcs /dir/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
99 fcb $08
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
100
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
101 start ldd #$0150 Default to multiple entries/line, 80 column width
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
102 std <u0010
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
103 lda #'. default to NOT printing files with this first char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
104 sta <AllFlag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
105 clra
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
106 clrb
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
107 std <u000E directories only/non-directories only flags
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
108 std <u000C Clear wildcard & extended info flags
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
109 sta <u0008 Set case sensitivity to ON
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
110 leay >L0449,pc point to '.'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
111 sty <u0002 Default to current data directory as DIR path
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
112 ldb #READ. directory attribute=READ.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
113 clr <u0077 Always 0
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
114 * Process parameter line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
115 L003F lda ,x get character
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
116 cmpa #$0D End of parms?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
117 beq L0071 yup, time to dir!
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
118 cmpa #$20 space?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
119 beq L006D yup, skip it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
120 pshs x save ptr to start of current sub-parm
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
121 L004B lda ,x+ get char, bump up ptr
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
122 cmpa #$20 if a space, skip it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
123 beq L0057
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
124 cmpa #$0D if not a CR, skip
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
125 bne L004B
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
126 leax -1,x save address of the CR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
127 L0057 stx <u0004 Save ptr to end of current sub-parm
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
128 puls x Restore start of current sub-parm
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
129 lda ,x Get 1st char of sub-parm
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
130 cmpa #'- option flag?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
131 bne L0066 no, must be dir/filename, go process
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
132 lbsr L023A Update flags based on hyphen options
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
133 bra L0069 Continue from end of current sub-parm block
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
134
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
135 L0066 lbsr L0286 Process dir and/or filenames
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
136 L0069 ldx <u0004 Continue from end of current sub-parm block
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
137 bra L003F Start working on next sub-parm
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
138
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
139 L006D leax 1,x skip this character
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
140 bra L003F and get another one
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
141
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
142 * Done processing parameter line - start doing actual DIR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
143 * Entry: A=13 (which looks to be width if SS.ScSiz fails).
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
144 L0071 stb <u0017 Save directory attributes byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
145 ldb <u000D Get extended info flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
146 orb <u000E Merge setting with Directories flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
147 orb <u000F Merge with non-directories flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
148 stb <u000B Save merged flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
149 tst <u0010 one line/entry?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
150 beq L00B3 if so, continue
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
151 pshs x,a
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
152 * Calculate dir table width
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
153 lda #1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
154 ldb #SS.ScSiz return screen size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
155 os9 I$GetStt
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
156 bcs L00A6 Check for unknown service error
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
157 tfr x,d Move screen width to D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
158 cmpb #80 >=80 characters/line?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
159 bhs L00AF Yes, continue
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
160 lda #60 go to 64
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
161 cmpb #60 64 to 79 chars?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
162 bhs L00AD Yes, set width to 64
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
163 lda #48 48 to 63 chars?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
164 cmpb #48 Yes, set width to 48
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
165 bhs L00AD
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
166 lda #32 32 to 47 chars?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
167 cmpb #32 Yes, set to 32 chars
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
168 bhs L00AD
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
169 clr <u0010 if <32, do 1 file/line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
170 bra L00AD
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
171
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
172 L00A6 cmpb #E$UnkSvc Unknown service code?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
173 beq L00AF Yes, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
174 lbra L0430 Check for EOF, or exit with error
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
175
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
176 L00AD sta <u0011 Save screen width we will use
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
177 L00AF andcc #$FE Clear error flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
178 puls x,a Restore regs
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
179 L00B3 lda <u0017 Get current attributes flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
180 ora #$80 Add DIR attribute
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
181 ldx <u0002 Get ptr to DIR directory path
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
182 os9 I$Open Open directory
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
183 lbcs L0430 Error, exit with it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
184 sta <u0000 Save DIR path
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
185 ldx <u0002 Get ptr to DIR pathname
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
186 lda <u0017 Get DIR attributes we used to OPEN
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
187 os9 I$ChgDir Change directory to DIR path
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
188 tst <u000B Get dir vs. nondir, extended info flags
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
189 beq L00ED None set, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
190 lda <u0017 Get DIR attributes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
191 leax >L044B,pc point to '@'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
192 os9 I$Open Open current drive RAW (to get file descriptors)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
193 lbcs L0430 Error, check for EOF, or exit with it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
194 sta <u0001 Save path to raw drive
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
195 L00ED lda <u0011 Get screen width
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
196 sta <u0012 Save it as # chars left on current output line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
197 lda <u000D Get extended info requested flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
198 ora <u0010 Merge with 1 line/entry flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
199 beq L0145 All clear, skip 'Directory of'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
200 leax >L044D,pc Print ' Directory of ' to screen
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
201 ldy #$000F
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
202 lda #$01
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
203 os9 I$Write
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
204 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
205 leay <u0025,u Point to directory entries buffer area
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
206 ldx <u0002 Get pathname to directory
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
207 L010D lda ,x+ Copy pathname up until CR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
208 sta ,y+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
209 cmpa #$0D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
210 bne L010D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
211 tst <u000C Separate filename?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
212 beq L0127 No, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
213 lda #'/ Yes, Add slash to end of buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
214 sta -1,y
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
215 ldx <u0006 Get pointer to user filename request
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
216 * Copy User filename to end of 'dir of' line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
217 L011F lda ,x+ Copy it over until CR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
218 * Force to uppercase if case insensitive flag set AND char is lowercase
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
219 * Will make for faster compares later.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
220 lbsr ForcUppr Do uppercase change if needed
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
221 sta -1,x Save over original char (in case changed)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
222 sta ,y+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
223 cmpa #$0D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
224 bne L011F
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
225 L0127 leax <u0025,u Point to full directory path/file requested
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
226 ldy #$00FF Max of 255 chars to print
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
227 lda #$01 Print directory name out (with 'directory of')
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
228 os9 I$WritLn
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
229 tst <u000D Extended info requested?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
230 beq L0145 No, skip extended info header
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
231 ldd #$0102 std out for output, 2 lines to print
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
232 leax >L045C,pc Write out extended info header lines
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
233 lbsr L0627
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
234 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
235
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
236 * Main dir entry reading loop
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
237 L0145 lda <u0000 get path number to current directory
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
238 ldy #$001D get the filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
239 leax <u0056,u where to put it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
240 os9 I$Read read it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
241 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
242 ldy #$0003 and the starting sector
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
243 leax <u0074,u
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
244 os9 I$Read
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
245 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
246 lda <u0056 get the first character of filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
247 beq L0145 if zero (deleted), skip it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
248 cmpa #$80 hi bit (deleted), ignore it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
249 beq AllCont continue
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
250 * Now A<>0, and AllFlag may be zero (=print out all files)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
251 anda #$7F
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
252 cmpa <AllFlag do all files?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
253 beq L0145 if the first character is '.', don't print it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
254 * Non '.' leading char filenames go here
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
255 AllCont clrb Filename size set to 0
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
256 leax <u0056,u Point to filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
257 L016D lda ,x+ Check char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
258 incb Bump up filename size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
259 cmpa #$80 End of filename marker?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
260 blo L016D No, keep getting size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
261 anda #$7F make it a real character
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
262 sta -1,x save it back
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
263 lda #$0D Add carriage return to filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
264 sta ,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
265 stb <u0013 Save filename size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
266 tst <u000C filename to match specified?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
267 beq L0191 No, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
268 leax <u0056,u Point to filename part of write buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
269 ldy <u0006 Get ptr to filename match string
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
270 lbsr L0324 Do wildcard compare
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
271 tst <u0009 Did we have a match?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
272 beq L0145 No, skip to next filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
273 L0191 tst <u000B Any files we have to weed out?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
274 beq L01CA No, just print
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
275 * we only want certain types of files - check
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
276 ldx <u0074 Get FD sector # - hi word
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
277 pshs u Preserve U
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
278 ldu <u0076 Get FD sector # - low word
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
279 lda <u0001 Get path to raw drive
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
280 os9 I$Seek seek to the file descriptor
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
281 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
282 puls u Restore U
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
283 leax <u0018,u Point to place to store FD info
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
284 ldy #13 We only need 1st 13 bytes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
285 os9 I$Read Read it in
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
286 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
287 lda <u0018 Get file attributes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
288 anda #$80 Ignore all but DIR attribute
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
289 tst <u000E Directories ONLY?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
290 beq L01C1 No, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
291 tsta This file a directory?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
292 lbeq L0145 No, skip to next filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
293 bra L01CA Yes, print dir name out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
294
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
295 L01C1 tst <u000F Non-directories ONLY?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
296 beq L01CA No, print filename out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
297 tsta This file a non-directory?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
298 lbne L0145 It is a DIR, skip to next filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
299 * Print current dir entry out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
300 L01CA tst <u0010 do one entry/line?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
301 beq L0221 yes, print it out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
302 clr <u000A Flag we have NOT printed filename yet.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
303 ldb <u0013 Get filename size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
304 cmpb <u0012 enough chars left in current output line to fit?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
305 bge L0205 No, Print CR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
306 inc <u000A Flag that we will have printed filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
307 L01D8 clra D=Current filename size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
308 tfr d,y Y=size of filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
309 inca Std Out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
310 leax <u0056,u Point to filename in output buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
311 os9 I$Write Write out filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
312 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
313 lda <u0012 Get # chars left on current output line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
314 * Add spaces between filenames - they are 'tabbed' at 16 or 32 chars,
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
315 * depending on filename size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
316 L01E8 suba #16 Subtract 16 from # chars left on output line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
317 ble L0205 Done line, print CR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
318 subb #16 Not done, subtract 16 chars from filename size
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
319 bge L01E8 filename was >16 chars, bump to next 'tab' stop
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
320 negb # spaces we have to print to pad to next 'tab'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
321 sta <u0012 Save # chars left on output line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
322 clra Y=# spaces to print to finish current tab field
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
323 tfr d,y
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
324 inca Std out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
325 leax >L04F2,pc Write spaces out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
326 os9 I$Write
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
327 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
328 lbra L0145 On to next filename entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
329
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
330 * Flush out current output line to screen, reset # chars left on output line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
331 * to screen width.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
332 L0205 lda #$01 Print CR by itself
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
333 ldy #$0001
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
334 leax >L044A,pc
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
335 os9 I$WritLn
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
336 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
337 lda <u0011 Get screen width
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
338 sta <u0012 Save as size available on current line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
339 tst <u000A Did we print filename out yet?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
340 beq L01D8 No, do it now
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
341 lbra L0145 Already printed, skip to next filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
342
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
343 L0221 tst <u000D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
344 lbne L036A if not zero, print out all the information
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
345 lda #$01
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
346 leax <u0056,u
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
347 ldy #$001E length of the filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
348 os9 I$WritLn dump out the filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
349 lbcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
350 lbra L0145
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
351
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
352 * parse the path options
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
353 * Entry: X=ptr to current char being checked in parameter line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
354 L023A leax 1,x Point to next char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
355 lda ,x Get it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
356 cmpa #$20 Space?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
357 beq L025E Yes, done current parm, return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
358 cmpa #$0D CR?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
359 beq L025E Yes, done parm line, return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
360 anda #$DF make it uppercase
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
361 cmpa #'E extended directory?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
362 beq L0274
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
363 cmpa #'S Single entry/line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
364 beq L0270
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
365 cmpa #'D Directories only
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
366 beq L027A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
367 cmpa #'F Non-Dirs only
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
368 beq L0280
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
369 cmpa #'X Execution directory
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
370 beq L026C
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
371 * Curt's additions here
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
372 cmpa #'C Case insensitve?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
373 beq CaseIns
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
374 *--- my additions here
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
375 cmpa #'L Extended dir
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
376 beq L0274
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
377 cmpa #'A do _all_ files (includes '.' and '..')
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
378 beq DoAll
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
379 bra L025F
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
380
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
381 L025E rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
382
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
383 CaseIns inc <u0008 Set case insensitivity ON
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
384 bra L023A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
385
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
386 L025F ldd #$010c 12 lines of text in help
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
387 leax >L0505,pc Point to help message
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
388 lbsr L0627 Print it out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
389 lbra L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
390
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
391 L026C addb #EXEC. add in exec attribute
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
392 bra L023A and get another character
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
393
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
394 L0270 clr <u0010 one line/entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
395 bra L023A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
396
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
397 L0274 inc <u000D print out all info
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
398 clr <u0010 one line/entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
399 bra L023A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
400
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
401 L027A inc <u000E Set directories only flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
402 clr <u000F Clear non-directories only flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
403 bra L023A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
404
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
405 L0280 inc <u000F Set non-directories only flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
406 clr <u000E Clear directories only flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
407 bra L023A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
408
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
409 DoAll clr <AllFlag do all files
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
410 bra L023A and get another character
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
411
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
412 * Process requested dir/file name from user
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
413 * Entry: X=ptr to start of wildcard matching filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
414 * Exit: u0002=ptr to start of dir name
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
415 * u0006=ptr to start of filename to match (if any)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
416 *
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
417 L0286 stx <u0002 save ptr to start of file/dir name
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
418 L0288 lda ,x+ Get char from file/dir name
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
419 cmpa #'_ underscore?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
420 beq L0288 skip it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
421 cmpa #'. period or under?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
422 blo L02A6 special checks, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
423 cmpa #'9 9?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
424 bls L0288 Below, skip to next char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
425 cmpa #'A Between ':' and '@', skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
426 blo L02A6
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
427 cmpa #'Z Uppercase letter, skip to next char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
428 bls L0288
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
429 cmpa #'a Between '[' and "'", skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
430 blo L02A6
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
431 cmpa #'z lowercase, skip to next char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
432 bls L0288
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
433 L02A6 cmpa #$0D cr?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
434 beq L02B2 exit if so
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
435 cmpa #$20 space?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
436 bne L02B3 no, go do more checks
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
437 lda #$0D replace space with CR (only 1 file/dirname allowed)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
438 sta ,-x save in the parameter area
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
439 L02B2 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
440
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
441 * Special char check
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
442 L02B3 cmpa #'* any sequence match wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
443 beq L02C1 yes, process it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
444 cmpa #'? one-character wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
445 beq L02C1 yes, process it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
446 ldb #E$BNam Exit with Bad filename error
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
447 orcc #1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
448 lbra L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
449
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
450 L02C1 stx <u0006 Save pointer to filename match string
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
451 L02C3 lda ,x+ grab another byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
452 cmpa #$0D CR?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
453 beq L02D1 yup, exit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
454 cmpa #$20 space?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
455 bne L02C3 no, skip it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
456 lda #$0D dump a CR at the end of the filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
457 sta ,-x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
458 L02D1 ldx <u0006 Get ptr to start of filename again
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
459 L02D3 lda ,-x get the previous character to filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
460 cmpx <u0002 was dirname ptr?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
461 bne L02E3 no, check for user specified dir separator
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
462 stx <u0006 save start of filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
463 leax >L0449,pc point to a '.' (current dir)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
464 stx <u0002 save dir pathname
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
465 bra L02ED
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
466
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
467 L02E3 cmpa #'/ slash (wildcard is start of filename after dir)?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
468 bne L02D3 no, keep searching back until '/' or start of entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
469 lda #$0D Found '/', Put CR over slash
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
470 sta ,x+ (separate dir name from filename)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
471 stx <u0006 Save new wildcard start
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
472 L02ED inc <u000C Set wildcards used flag
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
473 ldx <u0006 Get wildcard start
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
474 L02F1 lda #$0D Is current char of wildcard CR?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
475 cmpa ,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
476 beq L0323 Yes, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
477 lda #'* wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
478 cmpa ,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
479 beq L0301 yes, do it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
480 leax 1,x otherwise skip the character
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
481 bra L02F1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
482
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
483 L0301 leay 1,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
484 cmpa ,y
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
485 beq L0311
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
486 lda #'? one-character wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
487 cmpa ,y
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
488 beq L031B
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
489 leax $01,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
490 bra L02F1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
491
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
492 L0311 lda ,y+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
493 sta -$02,y
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
494 cmpa #$0D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
495 bne L0311
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
496 bra L02F1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
497
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
498 L031B sta ,x+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
499 lda #'* save a wildcard
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
500 sta ,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
501 bra L02F1
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
502
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
503 L0323 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
504
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
505 * Compare current dir entry filename to user specified match filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
506 * Entry: X=ptr to current filename from dir
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
507 * Y=ptr to wildcard match filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
508 * Exit: <u0009=0, no match
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
509 * <>1, match
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
510 L0324 lda ,x Get char from current dir entry filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
511
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
512 bsr ForcUppr Change case if needed
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
513
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
514 ldb ,y Get char from user match filename
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
515 std <u0015 Save both 1st chars
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
516 cmpb #$0D CR of wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
517 bne L0334 No, skip ahead
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
518 cmpa #$0D CR of current DIR entry filename?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
519 beq L0362 Yes, matched
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
520 bra L0367 No match
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
521
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
522 L0334 cmpb #'* any char match wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
523 beq L034A yes, do it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
524 cmpa #$0D End of filename from current dir entry?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
525 beq L0367 Yes, flag that filename did NOT match
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
526 cmpb #'? one-character wildcard?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
527 beq L0344 yes, simply skip over 1 char in both strings
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
528 cmpb <u0015 non-wildcard char from user match dir entry?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
529 bne L0367 No, flag no match & return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
530 L0344 leax 1,x next up in current dir entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
531 leay 1,y next up in wildcard
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
532 bra L0324 Continue comparing
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
533
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
534 L034A leay 1,y Bump up user filename char ptr
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
535 ldb ,y Get that char from user filename string
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
536 cmpb #$0D End of wildcard match string?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
537 beq L0362 Yes, set flag & return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
538 L0352 cmpb <u0015 Same as current char from current filename?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
539 beq L0344 Yes, bump both string pointers up and do next chars
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
540 leax 1,x Bump up dir entry char ptr
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
541 lda ,x Get char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
542 cmpa #$0D End of filename?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
543 beq L0367 Yes, clear flag and return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
544 sta <u0015 Save char from current dir entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
545 bra L0352 Try next
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
546
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
547 * Flag that wildcard compare has a match (so far)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
548 L0362 lda #$01
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
549 sta <u0009
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
550 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
551
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
552 * Flag that wildcard compare did NOT match
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
553 L0367 clr <u0009
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
554 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
555
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
556 * Change current char in A to uppercase, if <u0008 <>0
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
557 ForcUppr tst <u0008 Case insensitive?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
558 beq NoChange No, check char as is
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
559 cmpa #'a
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
560 blo NoChange Non-lowercase, check as is
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
561 cmpa #'z Lowercase?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
562 bhi NoChange No, check as is
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
563 anda #$DF Force uppercase
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
564 NoChange rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
565
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
566 * Copy default output line information to output line buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
567 L036A leax >L04D4,pc Point to default date/attributes string
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
568 leay <u0025,u Point to output line buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
569 L0371 lda ,x+ Copy until we hit LF
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
570 cmpa #$0A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
571 beq L037B
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
572 sta ,y+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
573 bra L0371
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
574
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
575 L037B leay <u0026,u Point to start of output line buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
576 leax <u0019,u Point to file creator's user #
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
577 ldb #$02 print out user number, in hex (2 bytes)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
578 L0383 lda ,x+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
579 lbsr L0409 dump hex ASCII number into 2 bytes @ y
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
580 decb Do 2nd byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
581 bne L0383
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
582 leax <u0026,u Point to start of user # in output buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
583 lbsr L0420 replace leading zeros with spaces
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
584 leay <u002C,u Where ASCII date/time info goes in write buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
585 leax <u001B,u Point to date/time last modified binary data
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
586 * Y2k - Treat century as separate #
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
587 ldb ,x Get year
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
588 clra Century offset starts @ 0
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
589 LoopCent cmpb #100 Calculate century offset (0-2) into A
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
590 blo DoCent
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
591 inca
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
592 subb #100
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
593 bra LoopCent
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
594
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
595 DoCent tfr a,b Save century offset
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
596 adda #19 actual century offset
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
597 bsr L03F8 Convert A to 2 digit century
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
598 lda #100
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
599 mul Calculate # of years already accounted for
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
600 pshs b Save it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
601 lda ,x+ Get original year back
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
602 suba ,s+ Calculate years left
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
603 bsr L03F8 Dump rest of year out
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
604 leay 1,y Skip slash
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
605 ldb #2 We are converting 3 #'s into 2 digit ASCII
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
606 L0399 lda ,x+ Get binary value
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
607 bsr L03F8 dump it out in ASCII
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
608 leay 1,y Skip over when '/'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
609 decb
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
610 bne L0399
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
611 lda ,x+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
612 bsr L03F8 HH
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
613 lda ,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
614 bsr L03F8 MM
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
615 * Attributes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
616 leay <u003B,u
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
617 leax <u0018,u
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
618 ldd #$2D08 hyphen, 8-times
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
619 L03B3 lsl ,x
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
620 bcs L03B9
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
621 sta ,y save hyphen if bit is not set
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
622 L03B9 leay $01,y go to the next byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
623 decb
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
624 bne L03B3 Do all 8 attribute bits
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
625 leay <u0045,u Point to part of output buffer for start sector #
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
626 leax <u0074,u Point to start sector # data
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
627 ldb #$03 3 bytes of data to do
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
628 L03C6 lda ,x+ Convert to hex
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
629 bsr L0409
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
630 decb
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
631 bne L03C6
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
632 leax <u0045,u
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
633 bsr L0420 replace leading 0's with spaces
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
634 leay <u004D,u Point to file size in output buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
635 leax <u0021,u Point to file size data
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
636 ldb #$04 4 bytes of data to do
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
637 L03DB lda ,x+ Convert to hex
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
638 bsr L0409
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
639 decb
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
640 bne L03DB
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
641 leax <u004D,u
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
642 bsr L0420 replace leading 0's with spaces
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
643 leax <u0025,u Point to output buffer
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
644 ldy #$0050 Print line (filename done earlier)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
645 lda #$01
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
646 os9 I$WritLn
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
647 bcs L0430
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
648 lbra L0145 Onto next dir entry
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
649
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
650 * Dump decimal ASCII out for contents of A (2 digit max)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
651 * ,y must contain a '0' for this to work.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
652 L03F8 cmpa #10 <10?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
653 blo L0402 Yes, just do one digit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
654 inc ,y Bump up 10's counter
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
655 suba #10 Subtract 10 from byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
656 bra L03F8 Do until 10's digit is done.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
657
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
658 L0402 leay 1,y Skip to 2nd byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
659 adda #'0 add in a zero (for bin to ASCII)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
660 sta ,y+ Save it & return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
661 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
662
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
663 * Convert binary to hex
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
664 * Entry: A=byte to convert to 2 digit hex
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
665 * Y=ptr to 2 byte buffer to hold ASCII HEX chars
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
666 L0409 pshs a Save byte
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
667 lsra A=high nibble (shifted down)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
668 lsra
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
669 lsra
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
670 lsra
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
671 bsr L0415 Make digit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
672 puls a Restore original
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
673 anda #$0F Mask out high nibble
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
674 L0415 adda #'0 Convert to ASCII char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
675 cmpa #'9
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
676 bls L041D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
677 adda #$07
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
678 L041D sta ,y+
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
679 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
680
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
681 * replace leading zeros with spaces from ASCII sequence, stopping at non-zero
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
682 * Entry: X=ptr to string
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
683 L0420 ldd #$3020 Zero & space chars
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
684 L0423 cmpa ,x is the first character a zero?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
685 bne L042F if not, return
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
686 cmpb 1,x is the 2nd character a space?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
687 beq L042F if '0 ', return without any changes
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
688 stb ,x+ otherwise save space over '0', go onto next char
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
689 bra L0423
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
690
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
691 L042F rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
692
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
693 L0430 cmpb #E$EOF
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
694 bne L0435
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
695 clrb ignore EOF errors
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
696 L0435 tst <u0010 one file/line?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
697 beq L0446 if so, exit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
698 leax >L044A,pcr output a CR
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
699 lda #$01
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
700 ldy #$0001
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
701 os9 I$WritLn and then exit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
702 L0446 os9 F$Exit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
703
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
704 L0449 fcc /./
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
705 L044A fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
706 L044B fcc /@/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
707 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
708 L044D fcb $0a
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
709 fcc / Directory of /
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
710 L045C fcb $0a
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
711 fcc /User # Last Modified Attributes Sector File Size File Name/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
712 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
713 fcc /------ --------------- ---------- ------ --------- ----------/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
714 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
715 L04D4 fcc ' 0000/00/00 0000 dsewrewr'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
716 L04F2 fcc / /
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
717 L0505 fcb $0a
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
718 fcc 'dir [-opts] [path/patt] [-opts]'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
719 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
720 fcc /opts: x - use current exec dir/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
721 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
722 fcc ' s - one entry/line'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
723 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
724 fcc ' e/l - extended directory'
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
725 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
726 fcc / a - show '.files', too/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
727 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
728 fcc / d - only directory files/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
729 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
730 fcc / f - only non-dir files/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
731 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
732 fcc / c - case insensitive filename match (BUT NOT DIR NAME)/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
733 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
734 fcc / ? - help message/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
735 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
736 fcc /pattern: may include wild cards/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
737 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
738 fcc / * - multiple character/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
739 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
740 fcc / ? - single character/
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
741 fcb $0d
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
742
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
743 * Print several lines of text up to 80 chars each
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
744 * Entry: X=Ptr to multi-line text string (CR terminates lines)
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
745 * B=# of lines to write.
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
746 L0627 decb Dec line counter
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
747 ldy #80
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
748 os9 I$WritLn
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
749 bcs L0642 Error writing, return with it
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
750 pshs d preserve path/line count
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
751 tfr y,d Move size actually written to D
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
752 leax d,x Bump source buffer ptr to next line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
753 puls d Restore path/line count
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
754 tstb Any lines left to print?
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
755 beq L0642 No, exit
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
756 bra L0627 Yes, print next line
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
757
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
758 L0642 rts
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
759
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
760 emod
3beb3d140cb5 Curtis Boyle's updated dir...
boisy
parents:
diff changeset
761 eom equ *