annotate 3rdparty/drivers/sdisk/sdisk.asm @ 0:6641a883d6b0

Initial revision
author boisy
date Thu, 04 Apr 2002 16:34:12 +0000
parents
children c27957a6a705
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 * SDisk - D.P. Johnson floppy driver for CoCo
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 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * 18 D.P. Johnson original version
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 nam SDisk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl D.P. Johnson floppy driver for CoCo
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 tylg set Drivr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 rev set $02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 edition set $12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 rmb DRVBEG+(DRVMEM*3)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 u0081 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 u0083 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 u0084 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u0085 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0086 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u0087 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u0088 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u008A rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u008C rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u008D rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u008E rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 fcb $FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 name fcs /SDisk/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 fcc "Copyright 1984 D.P.Johnson"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 fcb $0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 fcc "ALL RIGHTS RESERVED"
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 start lbra Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 lbra Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 Init clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 sta >D.DskTmr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 sta >u0086,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lda #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 sta >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 lbsr L0419
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 lda >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 ldb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 leax DRVBEG,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 L006D sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 sta <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 leax <$26,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 bne L006D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 leax >L0235,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 stx >$010A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 lda #$7E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 sta >$0109
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 tfr u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 bcs L0097
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 stx >u0088,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 L0097 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 Term ldu >u0088,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 L00A2 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 Read lbsr L0150
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 cmpx #$0000 LSN0?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 bne L00D5 branch if not
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 bsr L00D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 bcs L00A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 tst >u0086,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 bne L00A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 ldy >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 ldb #$14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 L00C2 lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 sta b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 bpl L00C2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 L00CC bcc L00D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 lbsr L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 L00D5 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 bsr L00E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 bcc L00A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 bne L00CC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 L00E0 lbsr L02A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 bcs L00A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 pshs y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 ldy #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 ldb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 ldb #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 ldb #$88
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 lbsr L041C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 tst >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 beq L012F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 L010E bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 bne L0125
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 bne L010E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 L0117 lda >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 ora #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 puls y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 lbra L026A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 L0125 lda >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 bra L0125
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 L012F ldb >u008D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 L0133 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 bne L0145
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 bne L0133
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 bra L0117
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 L013E lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 beq L013E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 L0145 lda >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 bne L013E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 lbra L0237
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 L0150 clr >u008D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 clr >u008C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 Write bsr L0150
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 L015B lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 L015D pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 bsr L017F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 bcs L0171
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 tst <$28,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 bne L016F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 lbsr L026E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 bcs L0171
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 L016F clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 L0170 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 L0171 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 beq L01C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 bcc L015D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 lbsr L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 bra L015D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 L017F lbsr L02A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 bcs L0170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 ldb #$A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 pshs y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 ldy #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 ldb #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 ldb #$88
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 lbsr L041C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 tst >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 beq L01CE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 L01AD bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 bne L01C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 bne L01AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 L01B6 lda >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 ora #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 puls y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 L01C1 lbra L0266
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 L01C4 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 bra L01C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 L01CE ldb >u008D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 L01D2 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 bne L01E4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 bne L01D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 bra L01B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 L01DD lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 L01DF bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 beq L01DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 L01E4 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 bne L01DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 bra L0237
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 L01EE pshs y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 ldy #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 ldb #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 ldb #$88
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 lbsr L041C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 tst >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 bne L01AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 L0215 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 bne L022E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 bne L0215
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 bra L01B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 L0220 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 L0222 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 bne L022E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 bitb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 bne L0222
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 bra L0237
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 L022E lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 bra L0220
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 L0235 leas $0C,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 L0237 puls y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 bitb #$FC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 beq L0260
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 bitb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 bne L026A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 lda #$F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 bitb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 bne L0262
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 lda #$F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 bitb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 bne L0262
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 bitb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 bne L0266
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 lda #$F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 bitb #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 bne L0262
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 lda #$F3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 bitb #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 bne L0262
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 L0260 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 L0262 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 L0266 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 ldb #$F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 L026A comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 ldb #$F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 L026E pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 ldx >u0088,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 stx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 ldx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 lbsr L00E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 stx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 bcs L02A3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 pshs u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 ldy >u0088,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 tfr x,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 L0290 ldx ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 cmpx ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 bne L02A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 leau 8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 leay $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 bne L0290
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 bra L02A1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 L02A0 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L02A1 puls u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 L02A3 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 L02A5 clr >u0087,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 lbsr L03C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 tst >u008C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 beq L02D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 ldd $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 beq L02BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 com >u0083,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 L02BE bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 beq L02C8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 sta >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 L02C8 ldd $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 stb >$FF4A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 ldx >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 bra L034E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 L02D3 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 bne L02E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 ldx >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 cmpd #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 beq L0329
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 cmpd $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 bcs L02EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 L02E7 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 ldb #$F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 L02EB subd <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 bcc L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 addd <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 bra L0329
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 L02F5 clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 ldb <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 bcc L0310
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 L0301 com >u0083,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 bne L0309
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 L0309 subd <$11,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 bcc L0301
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 bra L0317
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 L0310 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 subd <$11,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 bcc L0310
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 L0317 lda <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 beq L0324
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 sta >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 L0324 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 addb <$12,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 L0329 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 bita #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 beq L0342
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 sta >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 lda #$15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 cmpa ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 bcc L0342
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 lbsr L04BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 L0342 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 stb >$FF4A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 L0347 ldb <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 stb >u008E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 L034E pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 ldb <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 ldb >u008E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 beq L036B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 eorb <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 beq L0375
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 ldb #$F9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 L036B eorb <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 beq L0375
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 lsl ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 L0375 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 stb >$FF49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 tst >u0087,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 bne L0387
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 cmpb <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 beq L03A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 L0387 sta <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 ldb #$1B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 eorb <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 bsr L03FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 lda #$1E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 L0398 ldb #$B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 L039A decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 bne L039A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 bne L0398
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 L03A2 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 sta <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 sta >$FF49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 ldb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 andb >u0083,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 orb >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 orb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 stb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 L03BE fcb $01,$02,$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 L03C1 lbsr L04F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 lda <$21,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 cmpa #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 bcs L03CF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 ldb #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 L03CF pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 leax >L03BE,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 ldb a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 stb >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 leax DRVBEG,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 ldb #$26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 cmpx >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 beq L03F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 stx >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 com >u0087,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 L03F0 clr >u0083,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 clr >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453 L03FA bsr L0417
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 L03FC ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 beq L041F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 lda #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 sta >$006F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 bra L03FC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 L040A lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 ora >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 L0417 bsr L040A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 L0419 lbsr L041C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 L041C lbsr L041F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 L041F rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 GetStat ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 ldb $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 cmpb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 bne L046F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 bsr L0439
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 lbsr L00D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 L042F pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 ldd >u008A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 std $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 L0439 ldd $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 std >u008A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 sta >u008C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 ldd $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 std $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 ldd $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 sta >u008D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 stb >u008E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 SetStat ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 ldb $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 cmpb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 beq L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 cmpb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 beq L0482
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 cmpb #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 beq L0473
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 cmpb #$81
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 beq L0475
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 cmpb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 beq L047B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 L046F comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 ldb #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 L0472 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 L0473 lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 L0475 sta >u0086,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 L047A rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 L047B bsr L0439
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 lbsr L015B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 bra L042F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 L0482 lbsr L03C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 bcs L0472
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 lda $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 ldb <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 bitb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 beq L0496
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 cmpa #$15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 bls L0496
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 bsr L04BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 L0496 ldb $07,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 ldx >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 stb <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 beq L04A7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 com >u0083,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 L04A7 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 beq L04B1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 ldb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 stb >u0084,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 L04B1 lbsr L0347
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 bcs L0472
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 ldx $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 ldb #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 lbra L01EE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 L04BF pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 lda <$26,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 cmpa #$23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544 bne L04D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 lda >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 ora #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 sta >u0085,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 L04D2 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 L04D4 lbsr L03C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 bcs L047A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 ldx >u0081,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 clr <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 lda #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 L04E2 ldb #$4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 eorb <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557 bsr L04F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 bne L04E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561 ldb #$0B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 eorb <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 L04F5 lbra L03FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 L04F8 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 lda >$006F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566 bne L050D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 ldx #$A000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570 L0507 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 bne L0507
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 L050D lda #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 sta >$006F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 fcb $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 fcb $E9 i
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 end