annotate level1/cmds/free.asm @ 2668:07441dfebc27 lwtools-port

Make tocgen build with lwasm lwasm does not treat a trailing colon as part of the symbol name. Removed trailing colons on symbol references.
author William Astle <lost@l-w.ca>
date Sun, 10 Jun 2012 13:35:44 -0600
parents e4046f240257
children
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 * Free - Print disk free space
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 *
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1325
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
9 * 6 ????/??/??
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00.
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
11 *
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
12 * 7 ????/??/??
84ea83668304 Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents: 1166
diff changeset
13 * Y2K fixed.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 nam Free
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 ttl Print disk free space
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 * Disassembled 98/09/11 16:58:25 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 tylg set Prgrm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 rev set $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 edition set 7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30
924
c155aac72190 Made cosmetic changes
boisy
parents: 921
diff changeset
31 org 0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0000 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u0001 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u0002 rmb 1
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
35 devpath rmb 1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u0004 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u0005 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u0007 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u0008 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u0009 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 u000A rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 u000B rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 u000C rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 u000D rmb 26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u0027 rmb 54
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 u005D rmb 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 u0061 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 u0063 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 u0064 rmb 19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 u0077 rmb 5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 u007C rmb 26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 u0096 rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 u009C rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 u009E rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 u00A0 rmb 4544
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 name fcs /Free/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 fcb edition
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 919
diff changeset
60 IFNE DOHELP
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
61 HelpMsg fcb C$LF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 fcc "Use: free [/diskname]"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 fcb C$LF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 fcc " tells how many disk sectors are unused"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 fcb C$CR
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 919
diff changeset
66 ENDC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 L0052 fcs /" created on:/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 L005F fcs "Capacity:"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 L0068 fcs " sectors ("
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 L0072 fcs "-sector clusters)"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 L0083 fcs " free sectors, largest block"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 L009F fcs " sectors"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
74 start leay $0D,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 sty <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 cmpd #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 beq L00E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 cmpa #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 beq L00E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 cmpa #PDELIM
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 beq L00CC
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 919
diff changeset
83 L00BC equ *
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 919
diff changeset
84 IFNE DOHELP
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 919
diff changeset
85 leax >HelpMsg,pcr point to help message
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
86 ldy #64 max bytes
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
87 lda #$02 stderr
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
88 os9 I$WritLn write it
921
617c1b90e623 Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents: 919
diff changeset
89 ENDC
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
90 lbra ExitOk and branch
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 L00CC leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 pshs x
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
93 os9 F$PrsNam parse the device name on cmd line
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 puls x
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
95 bcs L00BC branch if error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 L00D7 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 lbsr L0218
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
98 * try decb here
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 subb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 bcc L00D7
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
101 L00E0 lda #PENTIR we want the entire device
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 lbsr L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 lbsr L0216
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 leax u000D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 stx <u0001
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
106 lda #READ. read mode
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
107 os9 I$Open open the device
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
108 sta <devpath save the path
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
109 bcs L00FF branch if error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 leax <u005D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 ldy #$003F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 os9 I$Read
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
113 L00FF lbcs Exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 lbsr L0222
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 lda #$22
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 lbsr L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 leay <u007C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 lbsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 dec <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 leay >L0052,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 lbsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 lbsr L0293
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 lbsr L0222
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 leay >L005F,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 lbsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 leax <u005D,u
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
127 lbsr Dec24
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 leay >L0068,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 lbsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 dec <u0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 ldd <u0063
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 leax ,s
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
135 lbsr Dec24
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 leas $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 leay >L0072,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 lbsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 lbsr L0222
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 sta <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 std <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 sta <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 std <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 sta <u0007
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 std <u0008
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
148 lda <devpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 pshs u
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
151 ldu #256
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
152 os9 I$Seek seek to bitmap sector
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 L016A leax >u009E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 ldd #$1000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 cmpd <u0061
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 bls L0178
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 ldd <u0061
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 L0178 leay d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 sty <u009C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 tfr d,y
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
162 lda <devpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 os9 I$Read
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
164 bcs Exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 L0186 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 bsr L01D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 stb ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 beq L019C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 L018E ldd <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 addd <u0063
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 std <u0005
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 bcc L0198
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 inc <u0004
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 L0198 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 bne L018E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 L019C leas $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 cmpx <u009C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 bcs L0186
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 ldd <u0061
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 subd #$1000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 std <u0061
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 bhi L016A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 bsr L01ED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 leax u0004,u
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
185 lbsr Dec24
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 leay >L0083,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 bsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 leax u0007,u
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
189 lbsr Dec24
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 leay >L009F,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 bsr L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 bsr L0222
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
193 lda <devpath
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 os9 I$Close
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
195 bcs Exit
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
196 ExitOk clrb
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
197 Exit os9 F$Exit
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 L01D0 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 cmpa #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 beq L01ED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 bsr L01D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 L01D7 bsr L01D9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 L01D9 bsr L01DB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 L01DB lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 bcs L01ED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 ldd <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 addd <u0063
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 std <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 bcc L01EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 inc <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 L01EB puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 L01ED pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 ldd <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 cmpd <u0007
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 bhi L01FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 bne L0204
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 ldb <u000C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 cmpb <u0009
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 bls L0204
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 L01FE sta <u0007
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 ldd <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 std <u0008
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 L0204 clr <u000A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 clr <u000B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 clr <u000C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 L020C lda ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 anda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 bsr L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 lda ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 bpl L020C
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
234 L0216 lda #C$SPAC
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 L0218 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 ldx <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 stx <u0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 L0222 pshs y,x,a
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
241 lda #C$CR
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 bsr L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 leax u000D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 stx <u0001
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
245 ldy #80
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
246 lda #$01 standard output
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
247 os9 I$WritLn write the line
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 puls pc,y,x,a
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
249
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
250 Base fcb $98,$96,$80 10,000,000
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
251 fcb $0f,$42,$40 1,000,000
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
252 fcb $01,$86,$a0 100,000
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
253 fcb $00,$27,$10 10,000
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
254 fcb $00,$03,$e8 1,000
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
255 fcb $00,$00,$64 100
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
256 fcb $00,$00,$0a 10
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
257 fcb $00,$00,$01 1
1166
bb618bed0bdc Miscellaneous source improvements
boisy
parents: 924
diff changeset
258
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
259 * Show a 24 bit number as a decimal value with commas
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
260 Dec24 lda #10
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 pshs y,x,b,a
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
262 leay <Base,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 clr <u0000
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
264 ldb ,x get first byte
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
265 ldx $01,x get 2nd and 3rd bytes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 L025C lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 L025E inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 exg d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 subd $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 exg d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 sbcb ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 bcc L025E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 bsr L02B9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 exg d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 addd $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 exg d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 adcb ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 leay $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 beq L0291
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 cmpa #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 bne L0281
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 sta <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 L0281 bita #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 bne L025C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 tst <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 beq L025C
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
290 lda #',
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 bsr L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 bra L025C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 L0291 puls pc,y,x,b,a
919
35aaf7ec1c07 Added comments
boisy
parents: 200
diff changeset
294
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 L0293 leax <u0077,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 bsr L02C3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bsr L029A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 L029A lda #$2F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 lbsr L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 clr <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 ldb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 L02A5 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 subb #$64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 bcc L02A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 bsr L02B9
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
307 L02AC lda #10
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 sta <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 L02B0 deca
1665
e4046f240257 mild updates
boisy
parents: 1325
diff changeset
310 addb #10
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 bcc L02B0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 bsr L02B9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 tfr b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 L02B9 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 beq L02BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 sta <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 L02BE tst <u0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 bne L02D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 L02C3 ldb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 lda #$AE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 L02C7 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 subb #$64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 bcc L02C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 bsr L02AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 bra L02AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 L02D6 adda #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 lbra L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 end