Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/ident.asm @ 1748:949d4df97cca
Fixed some comments, made better use of symbolics
author | boisy |
---|---|
date | Thu, 03 Mar 2005 23:19:49 +0000 |
parents | 84ea83668304 |
children | e6ad517c5ad3 |
rev | line source |
---|---|
0 | 1 ******************************************************************** |
2 * Ident - Show module information | |
3 * | |
4 * $Id$ | |
5 * | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1110
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:
1110
diff
changeset
|
7 * Comment |
0 | 8 * ------------------------------------------------------------------ |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1110
diff
changeset
|
9 * 7 ????/??/?? |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1110
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:
1110
diff
changeset
|
11 * |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1110
diff
changeset
|
12 * 8 2003/04/11 Boisy G. Pitre |
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1110
diff
changeset
|
13 * Now reports modules with a lang of Obj6309. |
0 | 14 |
15 nam Ident | |
16 ttl Show module information | |
17 | |
18 * Disassembled 98/09/20 15:54:44 by Disasm v1.6 (C) 1988 by RML | |
19 | |
20 ifp1 | |
21 use defsfile | |
22 endc | |
23 | |
921
617c1b90e623
Added DOHELP conditionals, set all to zero to eliminate help from commands
boisy
parents:
845
diff
changeset
|
24 DOHELP set 0 |
845 | 25 |
0 | 26 tylg set Prgrm+Objct |
27 atrv set ReEnt+rev | |
1325
84ea83668304
Redid comments, reset all rev nibbles that weren't explictly set to 0
boisy
parents:
1110
diff
changeset
|
28 rev set $00 |
1110
a0381320f4b1
Ident now reports modules with a language byte of Obj6309
boisy
parents:
924
diff
changeset
|
29 edition set 8 |
0 | 30 |
31 mod eom,name,tylg,atrv,start,size | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
28
diff
changeset
|
32 |
924 | 33 org 0 |
0 | 34 u0000 rmb 1 |
35 u0001 rmb 1 | |
36 u0002 rmb 1 | |
37 u0003 rmb 1 | |
38 u0004 rmb 2 | |
39 u0006 rmb 2 | |
40 u0008 rmb 2 | |
41 u000A rmb 1 | |
42 u000B rmb 1 | |
43 u000C rmb 1 | |
44 u000D rmb 1 | |
45 u000E rmb 2 | |
46 u0010 rmb 2 | |
47 u0012 rmb 1 | |
48 u0013 rmb 1 | |
49 u0014 rmb 1 | |
50 u0015 rmb 1 | |
51 u0016 rmb 1 | |
52 u0017 rmb 1 | |
53 u0018 rmb 1 | |
28 | 54 path rmb 1 |
0 | 55 u001A rmb 1 |
56 u001B rmb 1 | |
57 u001C rmb 2 | |
58 u001E rmb 2 | |
59 u0020 rmb 2 | |
60 u0022 rmb 66 | |
61 u0064 rmb 14 | |
62 u0072 rmb 14 | |
63 u0080 rmb 33 | |
64 u00A1 rmb 71 | |
65 u00E8 rmb 180 | |
66 u019C rmb 2048 | |
67 size equ . | |
68 | |
69 name fcs /Ident/ | |
70 fcb edition | |
71 | |
845 | 72 IFNE DOHELP |
73 HelpMsg fcb C$LF | |
74 fcc "Use: Ident [-opts] <path> [-opts]" | |
28 | 75 fcb C$LF |
845 | 76 fcc " -m = module in memory" |
28 | 77 fcb C$LF |
845 | 78 fcc " -s = short form" |
79 fcb C$LF | |
80 fcc " -v = don't verify CRC" | |
28 | 81 fcb C$LF |
845 | 82 fcc " -x = file in exec dir" |
28 | 83 fcb C$CR |
845 | 84 ENDC |
28 | 85 L00CD fcs "Module header is incorrect!" |
86 L00E8 fcs "Header for: " | |
87 L00F4 fcs "Module size:" | |
88 L0100 fcs "Module CRC: " | |
89 L010C fcs "Hdr parity: " | |
90 L0118 fcs "Exec. off: " | |
91 L0124 fcs "Data Size: " | |
92 L0130 fcs "Ty/La At/Rv:" | |
93 L013C fcs "Edition: " | |
94 L0148 fcs "mod," | |
95 L014C fcs "re-en," | |
96 L0152 fcs "non-shr," | |
97 L015A fcs "R/O" | |
98 L015D fcs "R/W" | |
99 L0160 fcs "(Good)" | |
100 L0166 fcc "(Bad)" | |
101 fcb $80+C$BELL | |
0 | 102 L016C fcb $10 |
103 fcb $1C | |
104 fcb $20 | |
105 fcb $24 $ | |
106 fcb $29 ) | |
107 fcb $2D - | |
108 fcb $32 2 | |
109 fcb $37 7 | |
110 fcb $3C < | |
111 fcb $41 A | |
112 fcb $46 F | |
113 fcb $4B K | |
114 fcb $50 P | |
115 fcb $56 V | |
116 fcb $5E ^ | |
117 fcb $65 e | |
28 | 118 fcs "bad type for" |
119 fcs "Prog" | |
120 fcs "Subr" | |
121 fcs "Multi" | |
122 fcs "Data" | |
123 fcs "Usr 5" | |
124 fcs "Usr 6" | |
125 fcs "Usr 7" | |
126 fcs "Usr 8" | |
127 fcs "Usr 9" | |
128 fcs "Usr A" | |
129 fcs "Usr B" | |
130 fcs "System" | |
131 fcs "File Man" | |
132 fcs "Dev Dvr" | |
133 fcs "Dev Dsc" | |
0 | 134 L01D8 fcb $10 |
135 fcb $15 | |
136 fcb $1E | |
137 fcb $2D - | |
138 fcb $3B ; | |
139 fcb $44 D | |
140 fcb $51 Q | |
141 fcb $60 ` | |
142 fcb $60 ` | |
143 fcb $60 ` | |
144 fcb $60 ` | |
145 fcb $60 ` | |
146 fcb $60 ` | |
147 fcb $60 ` | |
148 fcb $60 ` | |
149 fcb $60 ` | |
28 | 150 fcs "Data," |
151 fcs "6809 obj," | |
152 fcs "BASIC09 I-code," | |
153 fcs "PASCAL P-code," | |
154 fcs "C I-code," | |
155 fcs "COBOL I-code," | |
156 fcs "FORTRAN I-code," | |
1110
a0381320f4b1
Ident now reports modules with a language byte of Obj6309
boisy
parents:
924
diff
changeset
|
157 fcs "6309 obj," |
28 | 158 |
159 start leas >u019C,u | |
0 | 160 sts <u0006 |
161 tfr y,d | |
162 subd <u0006 | |
163 std <u0008 | |
164 leay <u0022,u | |
165 sty <u0000 | |
166 clr <u000A | |
167 clr <u000B | |
168 clr <u000C | |
169 clr <u0018 | |
28 | 170 lda #READ. |
0 | 171 sta <u000D |
172 ldd #$0000 | |
173 std <u0002 | |
174 std <u0004 | |
175 L0263 lda ,x+ | |
28 | 176 L0265 cmpa #C$SPAC |
0 | 177 beq L0263 |
28 | 178 cmpa #C$COMA |
0 | 179 beq L0263 |
28 | 180 cmpa #C$CR |
0 | 181 beq L02BB |
28 | 182 cmpa #'- |
0 | 183 beq L027E |
184 ldy <u0002 | |
185 bne L0263 | |
186 stx <u0002 | |
187 bra L0263 | |
188 L027E lda ,x+ | |
28 | 189 cmpa #'- |
0 | 190 beq L027E |
28 | 191 cmpa #'0 |
0 | 192 bcs L0265 |
28 | 193 eora #'M |
0 | 194 anda #$DF |
195 bne L0292 | |
196 inc <u000A | |
197 bra L027E | |
198 L0292 lda -$01,x | |
28 | 199 eora #'S |
0 | 200 anda #$DF |
201 bne L029E | |
202 inc <u000B | |
203 bra L027E | |
204 L029E lda -$01,x | |
28 | 205 eora #'V |
0 | 206 anda #$DF |
207 bne L02AA | |
208 inc <u000C | |
209 bra L027E | |
210 L02AA lda -$01,x | |
28 | 211 eora #'X |
0 | 212 anda #$DF |
213 bne L02B8 | |
28 | 214 lda #EXEC.+READ. |
0 | 215 sta <u000D |
216 bra L027E | |
845 | 217 L02B8 lbra ShowHelp |
0 | 218 L02BB ldx <u0002 |
845 | 219 lbeq ShowHelp |
0 | 220 leax -$01,x |
221 tst <u000A | |
222 beq L0314 | |
223 pshs u | |
224 clra | |
225 os9 F$Link | |
226 lbcs L03D2 | |
227 stu <u000E | |
228 ldd ,u | |
28 | 229 cmpd #M$ID12 |
0 | 230 beq L02EB |
231 puls u | |
232 L02DD leay >L00CD,pcr | |
233 lbsr L05FC | |
234 lbsr L0612 | |
235 clrb | |
236 lbra L03D2 | |
237 L02EB ldd u0002,u | |
238 subd #$0003 | |
239 leax d,u | |
240 puls u | |
241 leay <u0010,u | |
242 pshs u | |
243 lda #$03 | |
244 L02FB ldb ,x+ | |
245 stb ,y+ | |
246 deca | |
247 bne L02FB | |
248 puls u | |
249 lbsr L03D5 | |
250 ldu <u000E | |
251 os9 F$UnLink | |
252 lbcs L03D2 | |
253 clrb | |
254 lbra L03D2 | |
255 L0314 lda #$80 | |
256 sta <u00A1 | |
257 lda <u000D | |
258 os9 I$Open | |
259 lbcs L03D2 | |
28 | 260 sta <path |
0 | 261 ldd #$0000 |
262 std <u001E | |
263 std <u0020 | |
264 std <u001C | |
265 L032C ldd <u0020 | |
266 addd <u001C | |
267 std <u0020 | |
268 bcc L033B | |
269 ldd <u001E | |
270 addd #$0001 | |
271 std <u001E | |
272 L033B pshs u | |
273 ldx <u001E | |
274 ldu <u0020 | |
28 | 275 lda <path |
0 | 276 os9 I$Seek |
277 lbcs L03D2 | |
278 puls u | |
279 leax <u0072,u | |
280 stx <u000E | |
281 ldy #$000E | |
282 os9 I$Read | |
283 bcc L0360 | |
28 | 284 cmpb #E$EOF |
0 | 285 bne L03D2 |
286 bra L03C1 | |
287 L0360 ldd ,x | |
28 | 288 cmpd #M$ID12 |
0 | 289 lbne L02DD |
290 pshs u,x | |
291 ldd $02,x | |
292 std <u001C | |
293 addd <u0020 | |
294 tfr d,u | |
295 leau -u0003,u | |
296 ldx <u001E | |
297 bcc L037C | |
298 leax $01,x | |
28 | 299 L037C lda <path |
0 | 300 os9 I$Seek |
301 bcs L03D2 | |
302 puls u,x | |
303 leax <u0010,u | |
304 ldy #$0003 | |
28 | 305 lda <path |
0 | 306 os9 I$Read |
307 bcs L03D2 | |
308 pshs u,x | |
309 ldy <u000E | |
310 ldd $04,y | |
311 addd <u0020 | |
312 tfr d,u | |
313 ldx <u001E | |
314 bcc L03A4 | |
315 leax $01,x | |
28 | 316 L03A4 lda <path |
0 | 317 os9 I$Seek |
318 bcs L03D2 | |
319 puls u,x | |
320 leax >u0080,u | |
321 ldy #$0021 | |
28 | 322 lda <path |
0 | 323 os9 I$Read |
324 bcs L03D2 | |
325 bsr L03D5 | |
326 lbra L032C | |
327 L03C1 clrb | |
328 bra L03D2 | |
845 | 329 ShowHelp equ * |
330 IFNE DOHELP | |
331 lda #$01 | |
332 leax >HelpMsg,pcr | |
0 | 333 ldy #$00BA |
334 os9 I$WritLn | |
845 | 335 ENDC |
0 | 336 clrb |
337 L03D2 os9 F$Exit | |
338 L03D5 tst <u000B | |
339 lbne L0502 | |
340 lbsr L0612 | |
341 leay >L00E8,pcr | |
342 lbsr L05FC | |
343 lbsr L04E9 | |
344 lbsr L0612 | |
345 leay >L00F4,pcr | |
346 lbsr L05FC | |
347 ldy <u000E | |
348 ldd $02,y | |
349 lbsr L05D2 | |
350 leay >L0100,pcr | |
351 lbsr L05FC | |
352 lbsr L0543 | |
353 tst <u000C | |
354 bne L041E | |
355 lbsr L0553 | |
356 tsta | |
357 beq L0417 | |
358 leay >L0166,pcr | |
359 lbsr L05FC | |
360 bra L041E | |
361 L0417 leay >L0160,pcr | |
362 lbsr L05FC | |
363 L041E lbsr L0612 | |
364 leay >L010C,pcr | |
365 lbsr L05FC | |
366 ldy <u000E | |
367 ldb $08,y | |
368 lbsr L0633 | |
369 lbsr L0612 | |
370 ldy <u000E | |
371 ldb $06,y | |
372 stb <u001A | |
373 andb #$F0 | |
374 cmpb #$E0 | |
375 beq L0444 | |
376 cmpb #$10 | |
377 bne L0462 | |
378 L0444 leay >L0118,pcr | |
379 lbsr L05FC | |
380 ldy <u000E | |
381 ldd $09,y | |
382 lbsr L05D2 | |
383 leay >L0124,pcr | |
384 lbsr L05FC | |
385 ldy <u000E | |
386 ldd $0B,y | |
387 lbsr L05D2 | |
388 L0462 leay >L013C,pcr | |
389 lbsr L05FC | |
390 ldb <u0016 | |
391 pshs b | |
392 lbsr L0633 | |
393 ldb #$05 | |
394 lbsr L0654 | |
395 puls b | |
396 clra | |
397 lbsr L0649 | |
398 lbsr L0612 | |
399 leay >L0130,pcr | |
400 lbsr L05FC | |
401 ldb <u001A | |
402 lbsr L0633 | |
403 ldy <u000E | |
404 ldb $07,y | |
405 stb <u001B | |
406 lbsr L0633 | |
407 lbsr L0612 | |
408 ldb <u001A | |
409 lsrb | |
410 lsrb | |
411 lsrb | |
412 lsrb | |
413 leax >L016C,pcr | |
414 lda b,x | |
415 leay a,x | |
416 lbsr L05FC | |
417 leay >L0148,pcr | |
418 lbsr L05FC | |
419 ldb <u001A | |
420 andb #$0F | |
421 leax >L01D8,pcr | |
422 lda b,x | |
423 leay a,x | |
424 lbsr L05FC | |
425 ldb <u001B | |
426 bitb #$80 | |
427 beq L04CD | |
428 leay >L014C,pcr | |
429 lbsr L05FC | |
430 bra L04D4 | |
431 L04CD leay >L0152,pcr | |
432 lbsr L05FC | |
433 L04D4 bitb #$40 | |
434 beq L04DE | |
435 leay >L015D,pcr | |
436 bra L04E2 | |
437 L04DE leay >L015A,pcr | |
438 L04E2 lbsr L05FC | |
439 lbsr L0612 | |
440 rts | |
441 L04E9 tst <u000A | |
442 beq L04F6 | |
443 ldy <u000E | |
444 ldd $04,y | |
445 leay d,y | |
446 bra L04FA | |
447 L04F6 leay >u0080,u | |
448 L04FA lbsr L05FC | |
449 lda ,y | |
450 sta <u0016 | |
451 rts | |
452 L0502 ldb #$06 | |
453 lbsr L0654 | |
454 ldy <u000E | |
455 ldb $06,y | |
456 lbsr L0633 | |
457 bsr L0543 | |
458 tst <u000C | |
459 beq L0519 | |
460 lda #$20 | |
461 bra L0520 | |
462 L0519 bsr L0553 | |
463 tsta | |
464 bne L0520 | |
28 | 465 lda #C$PERD |
0 | 466 L0520 lbsr L0608 |
467 lbsr L0666 | |
468 bsr L04E9 | |
469 ldx <u0000 | |
470 pshs x | |
471 leax <u0022,u | |
472 stx <u0000 | |
473 ldb <u0016 | |
474 inc <u0018 | |
475 clra | |
476 lbsr L0692 | |
477 clr <u0018 | |
478 puls x | |
479 stx <u0000 | |
480 lbsr L0612 | |
481 rts | |
28 | 482 L0543 lda #'$ |
0 | 483 lbsr L0608 |
484 ldd <u0010 | |
485 lbsr L066E | |
486 ldb <u0012 | |
487 lbsr L0664 | |
488 rts | |
489 L0553 ldd #$FFFF | |
490 std <u0013 | |
491 stb <u0015 | |
492 pshs u,y,x | |
493 leau <u0013,u | |
494 tst <u000A | |
495 beq L0571 | |
496 ldx <u000E | |
497 ldy $02,x | |
498 os9 F$CRC | |
499 lbcs L03D2 | |
500 bra L058C | |
501 L0571 pshs u,x | |
502 ldx <u001E | |
503 ldu <u0020 | |
28 | 504 lda <path |
0 | 505 os9 I$Seek |
506 puls u,x | |
507 lbcs L03D2 | |
508 ldd <u001C | |
509 pshs b,a | |
510 bsr L05BF | |
511 puls b,a | |
512 std <u001C | |
513 L058C puls u,y,x | |
514 lda <u0013 | |
515 cmpa #$80 | |
516 bne L059E | |
517 ldd <u0014 | |
518 cmpd #$0FE3 | |
519 bne L059E | |
520 bra L05A1 | |
521 L059E lda #$3F | |
522 rts | |
523 L05A1 clra | |
524 rts | |
28 | 525 L05A3 lda <path |
0 | 526 ldx <u0006 |
527 ldy <u0008 | |
528 cmpy <u001C | |
529 bls L05B2 | |
530 ldy <u001C | |
531 L05B2 os9 I$Read | |
532 sty <u0004 | |
533 rts | |
534 L05B9 bsr L05A3 | |
535 lbcs L03D2 | |
536 L05BF ldy <u0004 | |
537 beq L05B9 | |
538 os9 F$CRC | |
539 ldd <u001C | |
540 subd <u0004 | |
541 std <u001C | |
542 bne L05B9 | |
543 std <u0004 | |
544 rts | |
545 L05D2 pshs b,a | |
546 bsr L0628 | |
547 ldb #$03 | |
548 bsr L0654 | |
549 puls b,a | |
550 bsr L0649 | |
551 bsr L0612 | |
552 rts | |
553 pshs b,a | |
554 andb #$F0 | |
555 lsrb | |
556 lsrb | |
557 lsrb | |
558 lsrb | |
28 | 559 L05E9 lda #'$ |
0 | 560 bsr L0608 |
561 lbsr L0682 | |
562 ldb #$02 | |
563 bsr L0654 | |
564 puls pc,b,a | |
565 pshs b,a | |
566 andb #$0F | |
567 bra L05E9 | |
568 L05FC lda ,y | |
569 anda #$7F | |
570 bsr L0608 | |
571 lda ,y+ | |
572 bpl L05FC | |
28 | 573 L0606 lda #C$SPAC |
0 | 574 L0608 pshs x |
575 ldx <u0000 | |
576 sta ,x+ | |
577 stx <u0000 | |
578 puls pc,x | |
579 L0612 pshs y,x,a | |
28 | 580 lda #C$CR |
0 | 581 bsr L0608 |
582 leax <u0022,u | |
583 stx <u0000 | |
28 | 584 ldy #80 |
0 | 585 lda #$01 |
586 os9 I$WritLn | |
587 puls pc,y,x,a | |
588 L0628 pshs a | |
28 | 589 lda #'$ |
0 | 590 bsr L0608 |
591 puls a | |
592 bsr L0660 | |
593 rts | |
594 L0633 pshs a | |
28 | 595 lda #'$ |
0 | 596 bsr L0608 |
597 puls a | |
598 bsr L0664 | |
599 rts | |
600 pshs a | |
28 | 601 lda #'$ |
0 | 602 bsr L0608 |
603 puls a | |
604 bsr L0682 | |
605 rts | |
606 L0649 pshs a | |
28 | 607 lda #'# |
0 | 608 bsr L0608 |
609 puls a | |
610 bsr L0692 | |
611 rts | |
612 L0654 pshs b,a | |
613 L0656 tstb | |
614 ble L065E | |
615 bsr L0606 | |
616 decb | |
617 bra L0656 | |
618 L065E puls pc,b,a | |
619 L0660 bsr L066E | |
620 bra L0666 | |
621 L0664 bsr L0674 | |
622 L0666 pshs a | |
28 | 623 lda #C$SPAC |
0 | 624 bsr L0608 |
625 puls pc,a | |
626 L066E exg a,b | |
627 bsr L0674 | |
628 tfr a,b | |
629 L0674 pshs b | |
630 andb #$F0 | |
631 lsrb | |
632 lsrb | |
633 lsrb | |
634 lsrb | |
635 bsr L0682 | |
636 puls b | |
637 andb #$0F | |
638 L0682 cmpb #$09 | |
639 bls L0688 | |
640 addb #$07 | |
641 L0688 addb #$30 | |
642 exg a,b | |
643 lbsr L0608 | |
644 exg a,b | |
645 rts | |
646 L0692 pshs u,y,b | |
647 leau <L06C3,pcr | |
648 clr <u0017 | |
649 ldy #$0005 | |
650 L069D clr ,s | |
651 L069F subd ,u | |
652 bcs L06A7 | |
653 inc ,s | |
654 bra L069F | |
655 L06A7 addd ,u++ | |
656 pshs b | |
657 ldb $01,s | |
658 exg a,b | |
659 bsr L06CD | |
660 exg a,b | |
661 puls b | |
662 cmpy #$0002 | |
663 bgt L06BD | |
664 inc <u0017 | |
665 L06BD leay -$01,y | |
666 bne L069D | |
667 puls pc,u,y,b | |
668 L06C3 fdb $2710,$03e8,$0064,$000a,$0001 | |
669 L06CD tsta | |
670 beq L06D2 | |
671 sta <u0017 | |
672 L06D2 tst <u0017 | |
673 bne L06DF | |
674 tst <u0018 | |
675 beq L06DE | |
676 lda #$20 | |
677 bra L06E1 | |
678 L06DE rts | |
679 L06DF adda #$30 | |
680 L06E1 lbra L0608 | |
681 | |
682 emod | |
683 eom equ * | |
684 end |