annotate level1/modules/cchdisk.asm @ 1071:853a796a1bcd

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