annotate 3rdparty/utils/sleuth3/cssshowc3.asm @ 3222:c086a5d69b78

Corrected ,pc should have been ,pcr in KRNP3.asm
author David Ladd <drencor-xeen@users.sourceforge.net>
date Wed, 20 Dec 2017 23:28:18 -0600
parents afd0f7d9b514
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3149
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
1 ***************************************
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
2 **
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
3 showaa ldx faddr,u show object program
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
4 stx saddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
5 leax $01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
6 bne showab
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
7 rts
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
8 showab lbsr stopin clear aux input
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
9 clr saddr+1,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
10 lda #$04
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
11 sta inst1+scrnwd,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
12 sta flisw,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
13 showac lbsr csctty set tty parameters
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
14 showad lbsr wlftty change function code
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
15 lbsr xcrlf print heading
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
16 leax oarea-1,u init pointers
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
17 stx iaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
18 leax harea-1,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
19 stx gaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
20 leax clrscn,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
21 lbsr outcur clear screen
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
22 ldb #scrwid format screen
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
23 cmpb #$08
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
24 blt showa2
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
25 leax shotab,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
26 lbsr xpdat
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
27 cmpb #$08
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
28 beq showa1
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
29 lbsr xpdat
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
30 showa1 leax shota1,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
31 lbsr xpdat
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
32 cmpb #$08
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
33 beq showa2
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
34 lbsr xpdat
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
35 showa2 leax shota2,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
36 stx eaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
37 showae ldx eaddr,u get next byte
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
38 lda ,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
39 bne showaf
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
40 lbsr wtftty change function code
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
41 lbra showba null=end
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
42 showaf leax $01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
43 stx eaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
44 cmpa #$2f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
45 beq showaj /=line
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
46 cmpa #$3c
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
47 bne showag <=start
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
48 leax faddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
49 bra showah
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
50 showag cmpa #$3e
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
51 bne showai >=end
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
52 leax taddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
53 showah lbsr xot4h xxxx
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
54 bra showae
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
55 showai lbsr xoute
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
56 bra showae
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
57 showaj leax shota2+1,pcr print data line
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
58 cmpx eaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
59 bne showja
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
60 ldb #scrwid
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
61 cmpb #$04
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
62 beq showjj
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
63 showja lbsr xcrlf
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
64 showjj leax saddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
65 lbsr xot4s
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
66 leax inst1,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
67 stx raddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
68 ldb #scrwid loop scrwid times
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
69 showak pshs b print hex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
70 lbsr getin
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
71 ldx gaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
72 leax $01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
73 sta ,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
74 stx gaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
75 leax instr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
76 lbsr xot2h
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
77 lda insty,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
78 ora #$40
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
79 suba #$20
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
80 cmpa #$32 chk for rmb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
81 bne showal
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
82 lda #$22 change to "
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
83 showal lbsr xoute
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
84 lda instr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
85 anda #$7f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
86 ldx raddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
87 cmpa #$1f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
88 bls showam
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
89 cmpa #maxprn
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
90 bls showao
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
91 showam lda #$2e .
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
92 showao sta ,x+
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
93 stx raddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
94 puls b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
95 decb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
96 bne showak
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
97 lbsr xouts
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
98 leax inst1,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
99 lbsr xpdat print alpha
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
100 lbsr xouts
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
101 lbra showae
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
102 showba lbsr xinee get command
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
103 cmpa #$5f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
104 bls showby
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
105 anda #$5f fix case
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
106 showby cmpa #$51
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
107 bne showbc q=quit
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
108 showbz clr flisw,u clear switch
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
109 lbra inrtty reset paras and exit
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
110 showbc cmpa #$50
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
111 bne showbd p=prev
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
112 ldd saddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
113 subd #(scrbyt*2)
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
114 bra showbq
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
115 showbd cmpa #$53
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
116 bne showbg s=screen
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
117 ldd saddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
118 subd #scrbyt
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
119 std saddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
120 leax toblok,u force output
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
121 lbsr fob
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
122 lbsr fulscr full screen edit
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
123 lbra showac
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
124 showbg cmpa #$2f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
125 bhi showbj space=next
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
126 showbi ldd saddr,u chk for end
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
127 cmpd taddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
128 bhi showbz
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
129 lbra showad back for more
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
130 showbj cmpa #$3a
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
131 blo showbl num
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
132 cmpa #$41
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
133 blo showbi :-@
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
134 cmpa #$47
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
135 blo showbl alpha
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
136 showbk bra showbi rest
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
137 showbl lbsr xnhe9 addr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
138 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
139 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
140 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
141 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
142 tfr a,b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
143 lbsr xnhex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
144 pshs b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
145 adda ,s+
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
146 showbq cmpa faddr,u chk addr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
147 bcs showbi
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
148 cmpa taddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
149 bhi showbi
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
150 sta saddr,u change addr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
151 lbra showad back for more
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
152 **
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
153 * output cursor control string (1-3 chars)
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
154 outcur pshs b,x save b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
155 ldb #$03 set counter
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
156 outcr1 lda ,x+ get char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
157 lbsr xoutet output char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
158 decb dec the count
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
159 bne outcr1 loop til done
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
160 leax clrscn,pcr chk clr screen
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
161 cmpx $01,s
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
162 bne outcr2
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
163 lda ,x chk for adm-3
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
164 cmpa #$1a
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
165 bne outcr2
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
166 lda #$80 delay
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
167 lbsr xoutet
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
168 lbsr xoutet
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
169 lbsr xoutet
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
170 lbsr xoutet
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
171 outcr2 leax toblok,u force output
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
172 lbsr fob
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
173 puls b,x,pc restore and return
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
174 **
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
175 * find start of cursor control string
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
176 cmpcur pshs b save b-reg
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
177 leax clrscn+leadin,pcr point into table
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
178 cmp1 cmpa ,x correct entry?
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
179 beq cmp2 yes
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
180 leax $03,x no, bump to next entry
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
181 bra cmp1 and try again
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
182 cmp2 ldb #leadin
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
183 beq cmp4
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
184 cmp3 leax -$01,x backup to 1st byte
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
185 decb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
186 bne cmp3
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
187 cmp4 puls b,pc restore and return
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
188 **
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
189 fulscr lbsr scstty full screen edit
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
190 fulsc1 clr horptr,u reset parameters
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
191 clr vrtptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
192 leax harea,u init screen
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
193 stx adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
194 leax homeup,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
195 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
196 leax rtcur,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
197 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
198 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
199 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
200 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
201 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
202 ldb #scrwid
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
203 cmpb #$04
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
204 beq fulsrc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
205 leax dncur,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
206 bsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
207 fulsrc leax curson,pcr turn on cursor if off
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
208 lbsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
209 fulbel lda beeps,pcr bell
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
210 fulout lbsr xoutet
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
211 fulgnx clrb use b as flag register
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
212 fulg1 lbsr inchrt get a character
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
213 sta cchar,u save it
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
214 cmpa #lead1 is it leadin char #1
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
215 bne fulg2 no, see if it's 2nd or 3rd char in sequence
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
216 incb count as first char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
217 bra fulg1 and go get another
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
218 fulg2 tstb is this the 1st char?
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
219 beq fulg4 yes, then it's not an escape sequence
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
220 cmpa #lead2 no, then is it 2nd leadin char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
221 bne fulctl no, then it must bea 2-char control sequence
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
222 incb count as 2nd char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
223 bra fulg1 and go geta 3rd char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
224 fulg4 cmpa #$80 is it an 8-bit control character?
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
225 bls fulg5 no, check for 7-bit control char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
226 bra fulctl go process
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
227 fulg5 cmpa #$1f is it a 7-bit control char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
228 bls fulctl yes, go process
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
229 lbra fulnct no, then process as alpha
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
230 fulctl cmpa homeup+leadin,pcr check home
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
231 beq fulsc1
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
232 fulnhm cmpa clrscn+leadin,pcr check clear
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
233 beq fulsc1
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
234 fulncl ldb vrtptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
235 cmpa upcur+leadin,pcr check up-cursor
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
236 bne fulnup
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
237 tstb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
238 beq fulbel
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
239 dec vrtptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
240 ldd adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
241 subd #scrwid
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
242 std adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
243 leax upcur,pcr point to cursor string
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
244 bra fulecc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
245 fulnup cmpa dncur+leadin,pcr check down-cursor
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
246 bne fulndn
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
247 cmpb #$0e
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
248 bhi fulbeb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
249 inc vrtptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
250 ldd adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
251 addd #scrwid
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
252 std adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
253 leax dncur,pcr point to string
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
254 fulecc lbsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
255 bra fulgnx
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
256 fulbeb bra fulbel bell
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
257 fulndn ldb horptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
258 cmpa lfcur+leadin,pcr check left-cursor
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
259 bne fulnlf
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
260 fullf1 tstb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
261 beq fulbeb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
262 decb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
263 pshs b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
264 stb horptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
265 cmpb #scrhex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
266 bne fullf3
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
267 ldd adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
268 addd #scrwid
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
269 fullf2 std adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
270 fullf3 puls b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
271 cmpb #scrhex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
272 bhi fulinx
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
273 bitb #$01
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
274 bne fulecb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
275 lbsr cmpcur get start of cursor string to x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
276 bra fulecc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
277 fulecb lda cchar,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
278 lbsr cmpcur find table entry
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
279 lbsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
280 cmpb #scrhex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
281 bne fulinx
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
282 lbsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
283 fulinx ldx adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
284 lda cchar,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
285 cmpa rtcur+leadin,pcr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
286 bne fuldex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
287 leax $01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
288 bra fulxix
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
289 fuldex leax -$01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
290 fulxix stx adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
291 lbsr cmpcur get start of cursor string to x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
292 fulech bra fulecc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
293 fulnlf cmpa rtcur+leadin,pcr check right-cursor
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
294 bne fulnrt
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
295 fulrt1 cmpb #scrale
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
296 bhi fulbeb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
297 pshs b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
298 incb
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
299 stb horptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
300 cmpb #scrals
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
301 bne fullf3
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
302 ldd adrptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
303 subd #scrwid
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
304 bra fullf2
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
305 fulnrt cmpa #$0d
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
306 beq fulcre chk cr
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
307 fulbec lbra fulbel bell
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
308 fulcre ldx saddr,u chk for changes
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
309 stx eaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
310 ldx #scrbyt
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
311 stx savew,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
312 leax harea,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
313 stx daddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
314 leax oarea-1,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
315 stx iaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
316 fulnxc ldx daddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
317 lda ,x+
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
318 stx daddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
319 ldx iaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
320 leax $01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
321 stx iaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
322 cmpa ,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
323 beq fulnxn
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
324 ldx typee,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
325 ldb #$5a z
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
326 stb ,x+
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
327 ldy eaddr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
328 sty ,x++ xxxx
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
329 sty ,x++ xxxx
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
330 sta ,x+ cc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
331 ldd #$0000
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
332 std ,x++
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
333 stx typee,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
334 fulnxn inc eaddr+1,u next byte
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
335 ldx savew,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
336 leax -$01,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
337 stx savew,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
338 bne fulnxc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
339 leax toblok,u force output
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
340 lbra fob and exit
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
341 fulbed lbra fulbel bell
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
342 fulnct ldx adrptr,u non-controls
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
343 anda #$7f remove parity
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
344 ldb horptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
345 cmpb #scrhex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
346 bhi fulalp
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
347 cmpa #$5f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
348 bls fullow
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
349 anda #$5f change case
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
350 fullow suba #$30 chk hex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
351 blo fulbed
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
352 cmpa #$09
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
353 bls fulhex
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
354 cmpa #$11
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
355 blo fulbed
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
356 cmpa #$16
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
357 bgt fulbed
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
358 suba #$07
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
359 fulhex andb #$01
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
360 beq fulhev
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
361 ldb ,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
362 andb #$f0
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
363 bra fulhez
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
364 fulhev ldb ,x
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
365 andb #$0f
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
366 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
367 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
368 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
369 asla
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
370 fulhez pshs b
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
371 adda ,s+
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
372 fulalp sta ,x store char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
373 lda cchar,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
374 lbsr xoutet echo it
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
375 leax lfcur,pcr cursor left
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
376 lbsr outcur
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
377 lda rtcur+leadin,pcr correct cursor
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
378 sta cchar,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
379 ldb horptr,u
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
380 lbra fulrt1
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
381 **
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
382 inchrt pshs x input routine
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
383 leax toblok,u force output
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
384 lbsr fob
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
385 leax tiblok,u get a char
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
386 lbsr gnc
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
387 bcc inchr1
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
388 lda #$0d cr if error
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
389 inchr1 equ *
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
390 **** delete next line if terminal requires 8 bit ascii
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
391 anda #$7f masks parity
afd0f7d9b514 Add the Sleuth multipass disassembler from Bud Pass
Bill Pierce <merlinious999@gmail.com>
parents:
diff changeset
392 puls x,pc