annotate level2/modules/cc3disk.asm @ 977:dd89c62ea2ca

os9.asm and oscode.asm now use BTStart symbolic from systype
author boisy
date Tue, 04 Feb 2003 19:43:52 +0000
parents 6641a883d6b0
children 4e0afd4781a9
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 * CC3Disk - CoCo 3 WD1773 disk driver
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 * 9 Original Tandy distribution version
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 * 12 Obtained from L2 Upgrade archive BGP 98/10/12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 nam CC3Disk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 ttl CoCo 3 WD1773 disk driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 * Disassembled 98/08/24 22:57:22 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 tylg set Drivr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 rev set $01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 edition set 12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 u0000 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u0001 rmb 3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u0004 rmb 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u0008 rmb 7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u000F rmb 35
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0032 rmb 29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u004F rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u0050 rmb 58
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u008A rmb 29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u00A7 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u00A9 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u00AA rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u00AB rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u00AD rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 u00AE rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 u00AF rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 u00B1 rmb 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 u00B5 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u00B6 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 u00B8 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 u00B9 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 fcb $FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 name fcs /CC3Disk/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 start lbra Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 lbra Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 L0028 fcb $00,$f0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 L002A fcb $00,$01,$0a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 Init clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 sta <D.MotOn clear out floppy disk timeout counter
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 ldx u0001,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 leax $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 lda #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 lbsr L0412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 sta >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 sta >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 ldb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 leax u000F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 L004B sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 sta <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 leax <$26,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 bne L004B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 leax >L0256,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 stx <$00FC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 leay >u00B5,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 tfr y,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 leay >L050B,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 leax >L002A,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 os9 F$IRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 bcs L0086
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 ldd #$0200
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 tfr u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 bcs L0086
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 stx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 GetStat clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 L0086 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 Term leay >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 os9 F$VIRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 os9 F$IRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 ldu >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 ldd #$0200
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 sta <u0032
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 L00AB rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 L00AC pshs x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 stx >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 anda #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 bne L00BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 bra L00CA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 L00BB puls x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 rora
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 stx >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 L00CA puls pc,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 Read bsr L00AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 lbsr L0162
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 bcs L00AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 cmpx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 bne L012D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 puls y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 bita #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 beq L00F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 lbsr L0526
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 bra L012D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 L00F0 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 ldy >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 ldb #$14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 L00FD lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 sta b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 bpl L00FD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 lda <$10,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 ldy $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 ldb <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 beq L0115
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 beq L0154
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 L0115 bita #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 beq L011D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 beq L0154
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 L011D bita #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 beq L0128
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 lda <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 suba #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 bcs L0154
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 L0128 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 puls y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 L012D ldy $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 ldy >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 anda #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 beq L014A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 ldd >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 andb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 beq L014B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 leay >$0100,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 L014A clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 L014B lda ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 bne L014B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 L0154 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 ldb #$F9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 L0159 bcc L0162
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 lbsr SSRESET
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 L0162 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 bsr L016F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 lbcc L00AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 bne L0159
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 L016F lbsr L02B8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 lbcs L00AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 L0176 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 pshs y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 ldb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 bsr L01A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 L0180 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 bne L019E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 bne L0180
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 lda >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 ora #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 lda #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 sta >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 puls y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 lbra L03D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 L019E lda >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 bra L019E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 L01A8 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 ldy #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 ldb #$28
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 orb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 ldb #$A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 orb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 lbsr L0412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 Write lbsr L00AC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 L01CB pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 bsr L01EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 bcs L01DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 tst <$28,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 bne L01DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 lbsr L0266
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 bcs L01DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 L01DD clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 L01DE rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 L01DF lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 lbeq L03BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 bcc L01CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 lbsr SSRESET
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 bra L01CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 L01EF lbsr L02B8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 bcs L01DE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 pshs y,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 anda #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 beq L0214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 lda #$91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 lbsr L0176
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 ldd >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 andb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 beq L0214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 leax >$0100,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 bra L0218
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 L0214 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 L0218 ldy $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 L021C lda ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 bne L021C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 puls y,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 ldb #$A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 L022B pshs y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 lbsr L01A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 L0230 bita >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 bne L024C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 leay -$01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 bne L0230
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 lda >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 ora #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 lda #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 sta >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 puls y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 lbra L03BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 L024C lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 stb >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bra L024C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 L0256 leas $0C,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 puls y,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 bitb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 lbne L03EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 lbra L03BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 L0266 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 stx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 ldx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 lbsr L016F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 stx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 bcs L02AF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 pshs u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 ldb <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 ldy >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 andb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 beq L0299
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 ldd >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 andb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 beq L0299
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 leay >$0100,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 L0299 tfr x,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 L029B ldx ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 cmpx ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 bne L02AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 leau u0008,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 leay $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 bne L029B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 bra L02AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 L02AB orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 L02AD puls u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 L02AF puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 L02B1 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 ldb <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 bra L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 L02B8 lbsr L0382
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 lbsr L0337
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 lda >u00AD,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 beq L02D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 lda >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 ora #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 sta >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 L02D0 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 bne L02D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 L02D8 stb >$FF4A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 ldx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 ldb <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 lda <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 eora <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 anda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 lda $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 tst ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 beq L02F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 L02F5 stb >$FF49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 ldb #$15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 ldb <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 andb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 beq L0305
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 lsl ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 L0305 cmpa ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 bra L0313
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 ldb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 orb #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 stb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 L0313 ldb >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 bne L0320
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 cmpb <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 beq L032D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 L0320 sta >$FF4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 ldb <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 andb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 eorb #$1B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 lbsr L03F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 L032D puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 sta <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 sta >$FF49
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 L0337 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 bne L034B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 cmpd #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 beq L037D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 ldx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 cmpd $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 bcs L034F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 L034B comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 ldb #$F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 L034F stb >u00AE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 ldb <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 ldb >u00AE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 bcc L0373
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408 bra L0369
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 L0361 com >u00AD,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 bne L0369
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 L0369 subb $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 sbca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 bcc L0361
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 bra L0379
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 L0371 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 L0373 subb $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 sbca #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 bcc L0371
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 L0379 addb $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 L037D rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 L037E fcb $01,$02,$04,$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 L0382 clr >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 L0386 lda <$21,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 cmpa #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 bcs L0391
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 ldb #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 L0391 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 leax >L037E,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 ldb a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 stb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 leax u000F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 ldb #$26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 cmpx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 beq L03B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 stx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 com >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 L03B2 clr >u00AD,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 lbsr L04BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 L03BB ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 L03BE bitb #$F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 beq L03D6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 bitb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 bne L03D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 bitb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 bne L03DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453 bitb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 bne L03E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 bitb #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 bne L03E4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 bitb #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 bne L03E8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 L03D6 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 L03D8 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 ldb #$F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 L03DC comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 ldb #$F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 L03E0 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 ldb #$F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 L03E4 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 ldb #$F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 L03E8 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 ldb #$F3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 L03EC comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 ldb #$F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 L03F0 bsr L0410
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 L03F2 ldb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 beq L041B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 ldd >L0028,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 std >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 bra L03F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 L0403 lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 ora >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 stb >$FF48
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 L0410 bsr L0403
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 L0412 lbsr L0415
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 L0415 lbsr L0418
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 L0418 lbsr L041B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 L041B rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 SetStat ldx PD.RGS,y get caller register ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 ldb R$B,x get func code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 cmpb #SS.WTRK
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 beq SSWTRK
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 cmpb #SS.RESET
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 lbeq SSRESET
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 ldb #E$UnkSvc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 SSWTRK pshs u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 ldd #$1A00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 bcs L0495
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 ldx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 stu >$00AF,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 ldx <u0050
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 lda $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 ldb <$00D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 ldy ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 ldx $04,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 ldy #$1A00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 bcs L0485
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 puls u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 pshs u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 lbsr L0382
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 ldx $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 ldb $07,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 bitb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 beq L0471
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 com >u00AD,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 ldb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 orb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 stb >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 L0471 lda $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 ldx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 lbsr L02B1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 bcs L0495
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 ldb #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 ldx >u00AF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 lbsr L022B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 L0485 ldu $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 ldu >u00AF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 ldd #$1A00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544 puls b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 L0495 puls pc,u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 SSRESET lbsr L0386
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 ldx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 clr <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 lda #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 L04A3 ldb <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 andb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 eorb #$4B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 lbsr L03F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 bne L04A3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 ldb <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 andb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561 eorb #$0B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 lbsr L03F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 L04BF pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 ldd >L0028,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566 std >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 lda >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 ora #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570 lda <u0032
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 bmi L04EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 bne L04EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 ldx #$A000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 L04DB nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 lbrn L04EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 lbrn L04EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 bne L04DB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 L04EA bsr L04EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 L04EC clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
583 puls pc,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584 L04EF lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
585 sta <u0032
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 ldx #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 leay >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 clr $04,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 ldd >L0028,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 os9 F$VIRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 bcc L0509
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 lda #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593 sta <u0032
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 L0509 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 L050B pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597 lda <u008A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
598 beq L0515
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
599 bsr L04EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 bra L0524
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
601 L0515 sta >$FF40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602 lda >u00B5,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
603 anda #$FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
604 sta >u00B5,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
605 clr <u0032
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
606 L0524 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
607 L0526 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
608 ldx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 ldb #$14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610 L052E clr b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
611 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
612 bpl L052E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 ldd <$25,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
614 lda <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
615 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
616 subd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
617 lda <$2A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 sta $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619 sta <$12,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
623 lda <$2C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 leax a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 lda <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 anda #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 beq L055C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
630 rola
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 L055C tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
634 std $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 lda #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 sta $0D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 lda <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 lda <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 ora ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 sta <$10,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
645 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
646
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 end