annotate level1/modules/cchdisk.asm @ 556:28a203bbd2cc

findstr and signal finished.
author roug
date Tue, 22 Oct 2002 19:09:04 +0000
parents c93ecc262253
children c736acb7dda2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
151
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
1 ********************************************************************
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
2 * CCHDisk - Tandy hard disk driver
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
3 *
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
4 * $Id$
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
5 *
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
6 * Ed. Comments Who YY/MM/DD
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
7 * ------------------------------------------------------------------
201
668388823050 Fixed headers to be consistent
boisy
parents: 151
diff changeset
8 * 4 From Tandy OS-9 Level One VR 02.00.00
151
845e890728df Fixed some misspellings
boisy
parents: 0
diff changeset
9
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 nam CCHDisk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 ttl Tandy hard disk driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * Disassembled 98/08/23 17:28:39 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 use rbfdefs
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
201
668388823050 Fixed headers to be consistent
boisy
parents: 151
diff changeset
23 edition set 4
0
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
257
c93ecc262253 More source enhancements
boisy
parents: 256
diff changeset
27 rmb DRVBEG
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 u000F rmb 91
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 u006A rmb 61
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 u00A7 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31 u00A9 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u00AA rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u00AB rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u00AD rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u00AF rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u00B0 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u00B1 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u00B2 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u00B3 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u00B4 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 u00B5 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 u00B6 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 u00B7 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 u00B8 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u00B9 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 u00BA rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 u00BB rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 u00BC rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 u00BE rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 u00BF rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 u00C1 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 size equ .
256
9e9648e17298 Additional source improvements
boisy
parents: 201
diff changeset
53
9e9648e17298 Additional source improvements
boisy
parents: 201
diff changeset
54 fcb DIR.+SHARE.+PREAD.+PWRIT.+PEXEC.+READ.+WRITE.+EXEC.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 name fcs /CCHDisk/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 start lbra Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 lbra Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 * Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 * Y = address of device descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 Init lbsr L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 lda >$FF51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 cmpa #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 beq L0037
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 ldb #E$NotRdy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 bra L0083
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 L0037 lbsr L04C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 bcs L0083
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 ldd #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 std >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 std >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 leax <$25,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 ldd ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 sta >u00B3,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 stb >u00BE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 ldd ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 std >u00BF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 ldd ,x++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 std >u00C1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 sta >u00B2,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 lda #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 leay u000F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 ldb #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 L006C stb ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 stb <$15,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 leay <$26,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 bne L006C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 os9 F$SRqMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 tfr u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 L0083 bcs L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 stx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 leax >$0100,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 stx >u00AD,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 bra L00C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 * Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 Term pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 ldu >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 ldd #256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 * GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 GetStat clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 * Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 * B = MSB of the disk's LSN
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 * X = LSB of the disk's LSN
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 Read lbsr L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 cmpx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 bne L00CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 bne L00CB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 bsr L00D1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 bcs L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 ldy >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 ldb #$14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 L00BD lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 sta b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 bpl L00BD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 puls y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 L00C6 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 L00C7 lbsr L04E1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 L00CB bsr L00D1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 bcs L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 bra L00C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 L00D1 lbsr L033F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 bcs L00E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 sta >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 lbsr L028C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 L00E3 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 * Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 * B = MSB of the disk's LSN
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 * X = LSB of the disk's LSN
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 Write lbsr L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 bsr L014A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 bcs L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 pshs x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 bsr L0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 puls x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 bcs L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 tst <$28,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 bne L00C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 bsr L0113
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 bcc L00C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 ldb <$00F5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 bra L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 L0100 lbsr L033F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 bcs L0112
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 sta >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 lda #$30
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 lbsr L028C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 L0112 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 L0113 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 ldx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 stx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 ldx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 bsr L00D1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 stx $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 bcs L0148
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 pshs u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 ldy >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 tfr x,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 L0134 ldx ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 cmpx ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 bne L0144
257
c93ecc262253 More source enhancements
boisy
parents: 256
diff changeset
239 leau $08,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 leay $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 bne L0134
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 bra L0146
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 L0144 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 L0146 puls u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 L0148 puls pc,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 L014A pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 ldb >$FF50
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 beq L0179
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 lda <$21,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 bne L015C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 andb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 bne L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 bra L0179
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 L015C cmpa #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 bne L0166
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 andb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 bne L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 bra L0179
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 L0166 cmpa #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 bne L0170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 andb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 bne L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 bra L0179
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 L0170 andb #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 beq L0179
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 L0174 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 ldb #E$WP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 stb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 L0179 puls pc,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 * SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 SetStat lbsr L04D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 lbsr L0460
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 ldb R$B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 cmpb #SS.Reset
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 bne L018E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 lbsr L04A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 bra L01A1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 L018E cmpb #SS.WTrk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 bne L0196
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 bsr L01B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 bra L01A1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 L0196 cmpb #SS.SQD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 bne L019E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bsr L01A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 bra L01A1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 L019E comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 ldb #E$UnkSvc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 L01A1 lbcs L00C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 lbra L00C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 L01A8 ldd <$25,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 exg a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 std >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 lbsr L0496
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L01B5 ldd $8,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 cmpd #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 bne L01C3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 ldd $6,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 cmpa #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 beq L01C5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 L01C3 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 L01C5 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 clr >u00AF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 clr >u00B0,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 clr >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 lda <$2A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 bsr L023D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 L01D8 lda <$2A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 sta >u00B4,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 lda >u00B2,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 sta >u00B5,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 lda >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 anda #$F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 sta >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 lda >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 ora >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 sta >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 ldd >u00AF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 exg a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 std >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 sta >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 lda #$50
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 bsr L028C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 bcs L023B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 lda >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 sta >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 cmpa <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 bcs L01D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 clr >u00B1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 ldd >u00AF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 addd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 std >u00AF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 cmpd <$25,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 bcs L01D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 L023B puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 L023D pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 ldb <$2D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 stb >u00BB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 sta >u00BA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 ldx >u00AB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 leay a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 nega
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 L0255 clr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 cmpa >u00BA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 beq L0278
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 ldb >u00BB,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 abx
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 cmpx $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 bcs L026E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 leax b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 L026E cmpx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 bne L0255
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 leax $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 stx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 bra L0255
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 L0278 ldy $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 lda #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 L027D cmpy >u00AD,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 beq L0288
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 sta ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 bra L027D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 L0288 leas $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 puls pc,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 L028C pshs y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 leax >u00B3,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 ldy #$FF59
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 ldb #$06
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 L0298 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 sta ,y+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 bne L0298
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 sta ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 ldy $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 ldx $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 lda >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 cmpa #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 beq L02C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 bsr L02E1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 cmpa #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408 beq L02BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 L02B6 bsr L02F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 puls pc,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 L02BA bsr L02EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 L02BC lda >$FF58
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 bne L02BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 bra L02B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 L02C6 lda ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 sta >$FF58
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 bne L02C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 bsr L02E1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 bra L02B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 L02D2 lda >$FF5F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 lda >$FF5F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 cmpa ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 leas $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 bne L02D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 L02E1 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 L02E3 bsr L02D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 anda #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 bne L02E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 L02EB bsr L02D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 bita #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 beq L02EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 L02F2 bsr L02D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 bita #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 bne L02FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 L02FA comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 beq L0302
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 lbsr L04F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 L0302 lda >$FF59
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 bita #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 bne L0332
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 bita #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 bne L031F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453 bita #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 bne L0322
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 bita #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 bne L0336
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 bita #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 bne L0322
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 bita #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 bne L0326
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 L031F ldb #E$CRC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 L0322 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 ldb #E$Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 L0326 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 ldb #E$Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 ldb #E$Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 L032E comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 ldb #E$NotRdy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 L0332 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 ldb #E$Unit
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 L0336 lda >$FF5F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 bita #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 beq L0322
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 bra L032E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 L033F lbsr L0460
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 bcs L0346
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 bsr L0347
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 L0346 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 L0347 pshs y,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 lbsr L04C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 lbcs L0428
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 stx >u00BC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 bne L0380
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 cmpx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 bne L0380
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 leax >u00B4,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 ldd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 sta $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 sta $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 stb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 lda >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 anda #$F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 sta >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 tst >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 lbne L040B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 lbra L0427
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 L0380 ldy >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 cmpb ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 lbhi L042E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 bcs L0393
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 cmpx $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 lbcc L042E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 L0393 clr >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 clr >u00B7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 ldb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 ldx $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 ldy $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 bne L03B4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 pshs x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 lda <$2A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 ldb <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 subd $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 puls x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 bhi L03D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 L03B4 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 lda >u00BE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 ldy >u00BF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 ldu >u00C1,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 bsr L0435
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 ldu $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 std >u00BC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 exg a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 std >u00B6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 puls u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 L03D5 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 ldb <$2A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 beq L042E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544 ldd >u00BC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 L03E3 subd $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 bcs L03EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 inc ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 bra L03E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 L03EB addd $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 stb >u00B5,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 lda >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 anda #$F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 ora ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 sta >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 leas $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557 sta >u00B4,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 tst >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 beq L0427
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 L040B clr >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561 ldy >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 lda <$15,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 ldy $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 cmpa #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 bne L0423
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566 lbsr L04A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 bra L0428
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 L0423 bsr L0496
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 bra L0428
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570 L0427 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 L0428 bcc L042C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 stb ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 L042C puls pc,y,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 L042E puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 ldb #E$Sect
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 L0435 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579 ldd $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 L0439 subd $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 bcc L0443
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 addd $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
583 andcc #^Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584 bra L0445
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
585 L0443 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 L0445 rol $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 rola
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 bne L0439
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 std ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 andb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593 stb $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 ldb $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 beq L045E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 L0457 lsr ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597 ror $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
598 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
599 bne L0457
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 L045E puls pc,u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
601 L0460 lda <$21,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602 cmpa #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
603 lbcc L0332
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
604 cmpa >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
605 beq L0495
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
606 sta >u00A9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
607 dec >u00AA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
608 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
611 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
612 lda >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 anda #$E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
614 ora ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
615 leas $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
616 sta >u00B8,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
617 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 ldx <$1E,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619 stx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621 L0495 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 L0496 clr >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
623 lda <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 anda #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 ora #$70
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 lbsr L028C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 L04A5 clr >u00B9,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 lda <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
630 anda #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 ora #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 lbsr L028C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633 bcs L04BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
634 ldx >u00A7,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 clr <$15,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 clr <$16,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 L04BF rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 L04C0 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 L04C3 lda >$FF5F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 bita #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 bne L04D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
645 bne L04C3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
646 ldb #E$NotRdy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 stb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 L04D2 puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
650
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
651 L04D4 dec <u006A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
652 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
653 sta >MPI.Slct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
654 lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
655 L04DD sta >$FF51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
656 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
657
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
658 L04E1 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
659 lda #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
660 sta >$FF51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
661 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 sta >MPI.Slct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
663 clr <u006A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
665
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
666 L04F1 lda #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
667 bra L04DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
668
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
669 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
671 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
672