0
|
1 ********************************************************************
|
|
2 * MDir - Show module information
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 7 Original Tandy/Microware version
|
839
|
9 * 8 Changed option to -e, optimized slightly BGP 03/01/14
|
|
10 * Could use greater optimization
|
0
|
11
|
|
12 nam MDir
|
|
13 ttl Show module information
|
|
14
|
|
15 * Disassembled 98/09/11 11:57:27 by Disasm v1.6 (C) 1988 by RML
|
|
16
|
|
17 ifp1
|
|
18 use defsfile
|
|
19 endc
|
|
20
|
|
21 tylg set Prgrm+Objct
|
|
22 atrv set ReEnt+rev
|
|
23 rev set $01
|
839
|
24 edition set 8
|
0
|
25
|
|
26 mod eom,name,tylg,atrv,start,size
|
|
27
|
|
28 u0000 rmb 2
|
|
29 u0002 rmb 1
|
|
30 u0003 rmb 1
|
|
31 u0004 rmb 1
|
|
32 u0005 rmb 3
|
|
33 u0008 rmb 3
|
839
|
34 narrow rmb 1
|
0
|
35 u000C rmb 1
|
|
36 u000D rmb 1
|
|
37 u000E rmb 80
|
|
38 u005E rmb 2
|
|
39 u0060 rmb 2
|
|
40 u0062 rmb 4096
|
|
41 u1062 rmb 64
|
|
42 u10A2 rmb 269
|
|
43 size equ .
|
|
44
|
|
45 name fcs /MDir/
|
|
46 fcb edition
|
|
47
|
839
|
48 header fcs " Module Directory at "
|
|
49 header2 fcs "Block Offset Size Typ Rev Attr Use Module Name"
|
|
50 header3 fcs "----- ------ ---- --- --- ---- ---- ------------"
|
|
51 sheader1 fcs "Blk Ofst Size Ty Rv At Uc Name"
|
|
52 sheader2 fcs "___ ____ ____ __ __ __ __ ______"
|
|
53 lock fcs "Lock "
|
|
54 slock fcs "Lk"
|
0
|
55
|
|
56 start pshs u
|
|
57 leau >u1062,u
|
|
58 L00D4 clr ,-u
|
|
59 cmpu ,s
|
|
60 bhi L00D4
|
|
61 puls u
|
839
|
62 clr <narrow
|
|
63 ldd #$0C30
|
0
|
64 std <u000C
|
|
65 stx <u0000
|
|
66 leax u000E,u
|
|
67 stx <u0003
|
|
68 lbsr L02A3
|
839
|
69 lda #$01 standard output
|
|
70 ldb #SS.ScSiz get size of screen
|
|
71 os9 I$GetStt get it!
|
|
72 bcc L00FF branch if ok
|
|
73 cmpb #E$UnkSvc unknown service?
|
|
74 lbne L0241 branch if not
|
|
75 bra L010C else ignore screen width test
|
|
76 L00FF cmpx #50 compare against 50
|
|
77 bge L010C if greater or equal, go on
|
|
78 inc <narrow else set narrow flag
|
|
79 ldd #$0A15
|
0
|
80 std <u000C
|
839
|
81 L010C leay >header,pcr point to header
|
0
|
82 lbsr L0298
|
|
83 leax u0005,u
|
|
84 os9 F$Time
|
|
85 leax u0008,u
|
|
86 lbsr L02B8
|
|
87 lbsr L02A3
|
|
88 leax <u0062,u
|
|
89 pshs u
|
|
90 os9 F$GModDr
|
|
91 sty <u005E
|
|
92 stu <u0060
|
|
93 puls u
|
|
94 leax -$08,x
|
|
95 ldy <u0000
|
839
|
96 ldd ,y+
|
|
97 andb #$DF
|
|
98 cmpd #$2D45 -e option?
|
0
|
99 bne L018E
|
|
100 lbsr L02A3
|
839
|
101 tst <narrow
|
0
|
102 beq L0149
|
839
|
103 leay >sheader1,pcr
|
0
|
104 bra L014D
|
839
|
105 L0149 leay >header2,pcr
|
0
|
106 L014D lbsr L0298
|
|
107 lbsr L02A3
|
839
|
108 tst <narrow
|
0
|
109 beq L015D
|
839
|
110 leay >sheader2,pcr
|
0
|
111 bra L0161
|
839
|
112 L015D leay >header3,pcr
|
0
|
113 L0161 lbsr L0298
|
|
114 lbsr L02A3
|
|
115 leax <u0062,u
|
|
116 lbra L023A
|
|
117 L016D lbsr L0308
|
|
118 beq L018E
|
|
119 lbsr L02DE
|
|
120 lbsr L0298
|
|
121 L0178 lbsr L0285
|
|
122 ldb <u0004
|
|
123 subb #$0E
|
|
124 cmpb <u000D
|
|
125 bhi L018B
|
|
126 L0183 subb <u000C
|
|
127 bhi L0183
|
|
128 bne L0178
|
|
129 bra L018E
|
|
130 L018B lbsr L02A3
|
|
131 L018E leax $08,x
|
|
132 cmpx <u005E
|
|
133 bcs L016D
|
|
134 lbsr L02A3
|
|
135 lbra L0240
|
|
136 L019A lbsr L0308
|
|
137 lbeq L0238
|
|
138 tfr d,y
|
|
139 ldd ,y
|
839
|
140 tst <narrow
|
0
|
141 beq L01B1
|
|
142 lbsr L0285
|
|
143 lbsr L024C
|
|
144 bra L01B4
|
|
145 L01B1 lbsr L0244
|
839
|
146 L01B4 tst <narrow
|
0
|
147 bne L01BE
|
|
148 lbsr L0285
|
|
149 lbsr L0285
|
|
150 L01BE ldd $04,x
|
|
151 lbsr L0244
|
839
|
152 tst <narrow
|
0
|
153 bne L01CA
|
|
154 lbsr L0285
|
|
155 L01CA lbsr L02DE
|
|
156 leay >u10A2,u
|
|
157 ldd $02,y
|
|
158 bsr L0244
|
839
|
159 tst <narrow
|
0
|
160 bne L01DC
|
|
161 lbsr L0285
|
|
162 L01DC lda $06,y
|
|
163 bsr L0252
|
839
|
164 tst <narrow
|
0
|
165 bne L01E7
|
|
166 lbsr L0285
|
|
167 L01E7 lda $07,y
|
|
168 anda #$0F
|
|
169 bsr L0252
|
|
170 ldb $07,y
|
|
171 lda #$72
|
|
172 lbsr L0291
|
839
|
173 tst <narrow
|
0
|
174 bne L0207
|
|
175 lda #$3F
|
|
176 lbsr L0291
|
|
177 lda #$3F
|
|
178 lbsr L0291
|
|
179 lda #$3F
|
|
180 lbsr L0291
|
|
181 L0207 bsr L0285
|
|
182 ldd $06,x
|
|
183 cmpd #$FFFF
|
|
184 bne L0223
|
839
|
185 tst <narrow
|
0
|
186 beq L021B
|
839
|
187 leay >slock,pcr
|
0
|
188 bra L021F
|
839
|
189 L021B leay >lock,pcr
|
0
|
190 L021F bsr L0298
|
|
191 bra L0230
|
839
|
192 L0223 tst <narrow
|
0
|
193 beq L022E
|
|
194 lbsr L0285
|
|
195 bsr L024C
|
|
196 bra L0230
|
|
197 L022E bsr L0244
|
|
198 L0230 leay >u1062,u
|
|
199 bsr L0298
|
|
200 bsr L02A3
|
|
201 L0238 leax $08,x
|
|
202 L023A cmpx <u005E
|
|
203 lbcs L019A
|
|
204 L0240 clrb
|
|
205 L0241 os9 F$Exit
|
|
206 L0244 bsr L0256
|
|
207 tst <u0002
|
|
208 bne L024C
|
|
209 dec <u0002
|
|
210 L024C tfr b,a
|
|
211 bsr L0258
|
|
212 bra L0285
|
|
213 L0252 bsr L0256
|
|
214 bra L0285
|
|
215 L0256 clr <u0002
|
|
216 L0258 pshs a
|
|
217 lsra
|
|
218 lsra
|
|
219 lsra
|
|
220 lsra
|
|
221 bsr L026C
|
|
222 tst <u0002
|
|
223 bpl L0268
|
|
224 lda #$01
|
|
225 sta <u0002
|
|
226 L0268 lda ,s+
|
|
227 anda #$0F
|
|
228 L026C tsta
|
|
229 beq L0271
|
|
230 sta <u0002
|
|
231 L0271 tst <u0002
|
|
232 bmi L0277
|
|
233 bne L027B
|
839
|
234 L0277 lda #C$SPAC
|
0
|
235 bra L0287
|
839
|
236 L027B adda #'0
|
|
237 cmpa #'9
|
0
|
238 bls L0287
|
|
239 adda #$07
|
|
240 bra L0287
|
839
|
241 L0285 lda #C$SPAC
|
0
|
242 L0287 pshs x
|
|
243 ldx <u0003
|
|
244 sta ,x+
|
|
245 stx <u0003
|
|
246 puls pc,x
|
839
|
247
|
0
|
248 L0291 rolb
|
|
249 bcs L0287
|
839
|
250 lda #'.
|
0
|
251 bra L0287
|
839
|
252
|
0
|
253 L0298 lda ,y
|
|
254 anda #$7F
|
|
255 bsr L0287
|
|
256 lda ,y+
|
|
257 bpl L0298
|
|
258 rts
|
839
|
259
|
0
|
260 L02A3 pshs y,x,a
|
839
|
261 lda #C$CR
|
0
|
262 bsr L0287
|
|
263 leax u000E,u
|
|
264 stx <u0003
|
839
|
265 ldy #80
|
0
|
266 lda #$01
|
|
267 os9 I$WritLn
|
|
268 puls pc,y,x,a
|
|
269 L02B8 bsr L02C0
|
|
270 bsr L02BC
|
839
|
271 L02BC lda #':
|
0
|
272 bsr L0287
|
|
273 L02C0 ldb ,x+
|
|
274 lda #$2F
|
|
275 L02C4 inca
|
839
|
276 subb #100
|
0
|
277 bcc L02C4
|
839
|
278 cmpa #'0
|
0
|
279 beq L02CF
|
|
280 bsr L0287
|
|
281 L02CF lda #$3A
|
|
282 L02D1 deca
|
839
|
283 addb #10
|
0
|
284 bcc L02D1
|
|
285 bsr L0287
|
|
286 tfr b,a
|
839
|
287 adda #'0
|
0
|
288 bra L0287
|
|
289 L02DE pshs u,x
|
|
290 bsr L0308
|
|
291 ldx $04,x
|
|
292 ldy #$000D
|
|
293 leau >u10A2,u
|
|
294 os9 F$CpyMem
|
|
295 pshs b,a
|
|
296 ldd u0004,u
|
|
297 leax d,x
|
|
298 puls b,a
|
|
299 ldu $02,s
|
|
300 leau >u1062,u
|
839
|
301 ldy #64
|
0
|
302 os9 F$CpyMem
|
|
303 tfr u,y
|
|
304 puls pc,u,x
|
|
305 L0308 ldd ,x
|
|
306 beq L0319
|
|
307 pshs y
|
|
308 leay <u0062,u
|
|
309 pshs y
|
|
310 subd <u0060
|
|
311 addd ,s++
|
|
312 puls y
|
|
313 L0319 rts
|
|
314
|
|
315 emod
|
|
316 eom equ *
|
|
317 end
|