0
|
1 ********************************************************************
|
|
2 * GRFO - CoCo 2 Graphics co-driver
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
201
|
8 * From Tandy OS-9 Level One VR 02.00.00
|
0
|
9
|
|
10 nam GRFO
|
|
11 ttl CoCo 2 Graphics co-driver
|
|
12
|
|
13 * Disassembled 98/08/23 18:01:47 by Disasm v1.6 (C) 1988 by RML
|
|
14
|
|
15 ifp1
|
|
16 use defsfile
|
|
17 endc
|
|
18
|
|
19 tylg set Systm+Objct
|
|
20 atrv set ReEnt+rev
|
|
21 rev set $01
|
|
22 edition set $01
|
|
23
|
|
24 mod eom,name,tylg,atrv,start,size
|
|
25
|
|
26 u0000 rmb 0
|
|
27 size equ .
|
|
28 fcb $07
|
|
29
|
|
30 name fcs /GRFO/
|
|
31 fcb edition
|
|
32
|
|
33 start lbra L006A
|
|
34 lbra L002A
|
|
35 lbra L0026
|
|
36 lbra L0026
|
|
37 lbra L006A
|
|
38
|
|
39 L0022 fcb $00,$55,$aa,$ff
|
|
40
|
|
41 L0026 comb
|
|
42 ldb #E$UnkSvc
|
|
43 rts
|
|
44 L002A suba #$15
|
|
45 leax <L0034,pcr
|
|
46 lsla
|
|
47 ldd a,x
|
|
48 jmp d,x
|
|
49
|
|
50 L0034 fdb $0029,$005f,$005c,$003b,$0038,$0121
|
|
51 fdb $0036,$011e,$0204,$0036,$0036
|
|
52
|
|
53 L004A ldd <$28,u
|
|
54 cmpb #$C0
|
|
55 bcs L0053
|
|
56 ldb #$BF
|
|
57 L0053 tst <$24,u
|
|
58 bmi L0059
|
|
59 lsra
|
|
60 L0059 std <$28,u
|
|
61 rts
|
|
62 leax <L0065,pcr
|
|
63 L0060 ldb #$02
|
|
64 lbra L015A
|
|
65 L0065 bsr L004A
|
|
66 std <$45,u
|
|
67
|
|
68 L006A clrb
|
|
69 rts
|
|
70 clr <$47,u
|
|
71 leax <L0074,pcr
|
|
72 bra L0060
|
|
73 L0074 bsr L004A
|
|
74 std <$45,u
|
|
75 bsr L007E
|
|
76 lbra L014A
|
|
77 L007E jsr [<$5D,u]
|
|
78 L0081 tfr a,b
|
|
79 comb
|
|
80 andb ,x
|
|
81 stb ,x
|
|
82 anda <$47,u
|
|
83 ora ,x
|
|
84 sta ,x
|
|
85 rts
|
|
86 clr <$47,u
|
|
87 leax <L0098,pcr
|
|
88 bra L0060
|
|
89
|
|
90 L0098 fdb $8db0,$3272,$ed6c,$add8
|
|
91 fdb $5daf,$62a7,$61ec,$c845,$add8,$5da7,$e44f,$5fed
|
|
92 fdb $6486,$bfa0,$c846,$a7c8,$4686,$bfa0,$c829,$a7c8
|
|
93 fdb $2986,$ffa7,$664f,$e6c8,$45e0,$c828,$8200,$2a06
|
|
94 fdb $4050,$8200,$6066,$ed68,$2605,$ccff,$ffed,$6486
|
|
95 fdb $e0a7,$674f,$e6c8,$46e0,$c829,$8200,$2a06,$4050
|
|
96 fdb $8200,$6067,$ed6a,$2008
|
|
97
|
|
98 L00F8 sta ,s
|
|
99 ldd $04,s
|
|
100 subd $0A,s
|
|
101 std $04,s
|
|
102 L0100 lda ,s
|
|
103 lbsr L0081
|
|
104 cmpx $02,s
|
|
105 bne L010F
|
|
106 lda ,s
|
|
107 cmpa $01,s
|
|
108 beq L0143
|
|
109 L010F ldd $04,s
|
|
110 bpl L011D
|
|
111 addd $08,s
|
|
112 std $04,s
|
|
113 lda $07,s
|
|
114 leax a,x
|
|
115 bra L0100
|
|
116 L011D lda ,s
|
|
117 ldb $06,s
|
|
118 bpl L0133
|
|
119 lsla
|
|
120 ldb <$24,u
|
|
121 bmi L012A
|
|
122 lsla
|
|
123 L012A bcc L00F8
|
|
124 lda <$4A,u
|
|
125 leax -$01,x
|
|
126 bra L00F8
|
|
127 L0133 lsra
|
|
128 ldb <$24,u
|
|
129 bmi L013A
|
|
130 lsra
|
|
131 L013A bcc L00F8
|
|
132 lda <$49,u
|
|
133 leax $01,x
|
|
134 bra L00F8
|
|
135 L0143 ldd $0C,s
|
|
136 std <$45,u
|
|
137 leas $0E,s
|
|
138 L014A lda <$48,u
|
|
139 sta <$47,u
|
|
140 clrb
|
|
141 rts
|
|
142 clr <$47,u
|
|
143 leax <L0162,pcr
|
|
144 ldb #$01
|
|
145 L015A stb <$25,u
|
|
146 stx <$26,u
|
|
147 clrb
|
|
148 rts
|
|
149
|
|
150 L0162 fdb $327c,$e6c8,$29e7,$614f,$a7e4,$eb61,$8900
|
|
151 fdb $4050,$8200,$c300,$03ed
|
|
152 fcb $62
|
|
153
|
|
154 L0179 lda ,s
|
|
155 cmpa $01,s
|
|
156 bcc L01AB
|
|
157 ldb $01,s
|
|
158 bsr L01B9
|
|
159 clra
|
|
160 ldb $02,s
|
|
161 bpl L0193
|
|
162 ldb ,s
|
|
163 lslb
|
|
164 rola
|
|
165 lslb
|
|
166 rola
|
|
167 addd #$0006
|
|
168 bra L01A3
|
|
169 L0193 dec $01,s
|
|
170 clra
|
|
171 ldb ,s
|
|
172 subb $01,s
|
|
173 sbca #$00
|
|
174 lslb
|
|
175 rola
|
|
176 lslb
|
|
177 rola
|
|
178 addd #$000A
|
|
179 L01A3 addd $02,s
|
|
180 std $02,s
|
|
181 inc ,s
|
|
182 bra L0179
|
|
183 L01AB lda ,s
|
|
184 cmpa $01,s
|
|
185 bne L01B5
|
|
186 ldb $01,s
|
|
187 bsr L01B9
|
|
188 L01B5 leas $04,s
|
|
189 bra L014A
|
|
190 L01B9 leas -$08,s
|
|
191 sta ,s
|
|
192 clra
|
|
193 std $02,s
|
|
194 nega
|
|
195 negb
|
|
196 sbca #$00
|
|
197 std $06,s
|
|
198 ldb ,s
|
|
199 clra
|
|
200 std ,s
|
|
201 nega
|
|
202 negb
|
|
203 sbca #$00
|
|
204 std $04,s
|
|
205 ldx $06,s
|
|
206 bsr L0202
|
|
207 ldd $04,s
|
|
208 ldx $02,s
|
|
209 bsr L0202
|
|
210 ldd ,s
|
|
211 ldx $02,s
|
|
212 bsr L0202
|
|
213 ldd ,s
|
|
214 ldx $06,s
|
|
215 bsr L0202
|
|
216 ldd $02,s
|
|
217 ldx ,s
|
|
218 bsr L0202
|
|
219 ldd $02,s
|
|
220 ldx $04,s
|
|
221 bsr L0202
|
|
222 ldd $06,s
|
|
223 ldx $04,s
|
|
224 bsr L0202
|
|
225 ldd $06,s
|
|
226 ldx ,s
|
|
227 bsr L0202
|
|
228 leas $08,s
|
|
229 rts
|
|
230 L0202 pshs b,a
|
|
231 ldb <$46,u
|
|
232 clra
|
|
233 leax d,x
|
|
234 cmpx #$0000
|
|
235 bmi L0214
|
|
236 cmpx #$00BF
|
|
237 ble L0216
|
|
238 L0214 puls pc,b,a
|
|
239 L0216 ldb <$45,u
|
|
240 clra
|
|
241 tst <$24,u
|
|
242 bmi L0221
|
|
243 lslb
|
|
244 rola
|
|
245 L0221 addd ,s++
|
|
246 tsta
|
|
247 beq L0227
|
|
248 rts
|
|
249 L0227 pshs b
|
|
250 tfr x,d
|
|
251 puls a
|
|
252 tst <$24,u
|
|
253 lbmi L007E
|
|
254 lsra
|
|
255 lbra L007E
|
|
256 clr <$41,u
|
|
257 leas -$07,s
|
|
258 lbsr L03AB
|
|
259 lbcs L0346
|
|
260 lda #$FF
|
|
261 sta <$4F,u
|
|
262 ldd <$45,u
|
|
263 lbsr L0351
|
|
264 lda <$4C,u
|
|
265 sta <$4D,u
|
|
266 tst <$24,u
|
|
267 bpl L0261
|
|
268 tsta
|
|
269 beq L0267
|
|
270 lda #$FF
|
|
271 bra L0267
|
|
272 L0261 leax >L0022,pcr
|
|
273 lda a,x
|
|
274 L0267 sta <$4E,u
|
|
275 cmpa <$47,u
|
|
276 lbeq L0346
|
|
277 ldd <$45,u
|
|
278 L0274 suba #$01
|
|
279 bcs L027F
|
|
280 lbsr L0351
|
|
281 bcs L027F
|
|
282 beq L0274
|
|
283 L027F inca
|
|
284 std $01,s
|
|
285 L0282 lbsr L0384
|
|
286 adda #$01
|
|
287 bcs L0290
|
|
288 lbsr L0351
|
|
289 bcs L0290
|
|
290 beq L0282
|
|
291 L0290 deca
|
|
292 ldx $01,s
|
|
293 lbsr L03D3
|
|
294 neg <$4F,u
|
|
295 lbsr L03D3
|
|
296 L029C lbsr L03F9
|
|
297 lbcs L0346
|
|
298 tst <$4F,u
|
|
299 bpl L02B3
|
|
300 subb #$01
|
|
301 bcs L029C
|
|
302 std $03,s
|
|
303 tfr x,d
|
|
304 decb
|
|
305 bra L02BD
|
|
306 L02B3 incb
|
|
307 cmpb #$BF
|
|
308 bhi L029C
|
|
309 std $03,s
|
|
310 tfr x,d
|
|
311 incb
|
|
312 L02BD std $01,s
|
|
313 lbsr L0351
|
|
314 bcs L029C
|
|
315 L02C4 bne L02D2
|
|
316 suba #$01
|
|
317 bcc L02CD
|
|
318 inca
|
|
319 bra L02D6
|
|
320 L02CD lbsr L0351
|
|
321 bcc L02C4
|
|
322 L02D2 adda #$01
|
|
323 bcs L029C
|
|
324 L02D6 cmpd $03,s
|
|
325 bhi L029C
|
|
326 bsr L0351
|
|
327 bcs L029C
|
|
328 bne L02D2
|
|
329 std $05,s
|
|
330 cmpd $01,s
|
|
331 bcc L02FB
|
|
332 ldd $01,s
|
|
333 decb
|
|
334 cmpd $05,s
|
|
335 beq L02FB
|
|
336 neg <$4F,u
|
|
337 ldx $05,s
|
|
338 lbsr L03D3
|
|
339 neg <$4F,u
|
|
340 L02FB ldd $05,s
|
|
341 L02FD std $01,s
|
|
342 L02FF bsr L0351
|
|
343 bcs L030B
|
|
344 bne L030B
|
|
345 bsr L0384
|
|
346 adda #$01
|
|
347 bcc L02FF
|
|
348 L030B deca
|
|
349 ldx $01,s
|
|
350 lbsr L03D3
|
|
351 std $05,s
|
|
352 adda #$01
|
|
353 bcs L0326
|
|
354 L0317 cmpd $03,s
|
|
355 bcc L0326
|
|
356 adda #$01
|
|
357 bsr L0351
|
|
358 bcs L0326
|
|
359 bne L0317
|
|
360 bra L02FD
|
|
361 L0326 inc $03,s
|
|
362 inc $03,s
|
|
363 ldd $03,s
|
|
364 cmpa #$02
|
|
365 lbcs L029C
|
|
366 ldd $05,s
|
|
367 cmpd $03,s
|
|
368 lbcs L029C
|
|
369 neg <$4F,u
|
|
370 ldx $03,s
|
|
371 lbsr L03D3
|
|
372 lbra L029C
|
|
373 L0346 leas $07,s
|
|
374 clrb
|
|
375 ldb <$41,u
|
|
376 beq L0350
|
|
377 L034E orcc #Carry
|
|
378 L0350 rts
|
|
379 L0351 pshs b,a
|
|
380 cmpb #$BF
|
|
381 bhi L0380
|
|
382 tst <$24,u
|
|
383 bmi L0360
|
|
384 cmpa #$7F
|
|
385 bhi L0380
|
|
386 L0360 jsr [<$5D,u]
|
|
387 tfr a,b
|
|
388 andb ,x
|
|
389 L0367 bita #$01
|
|
390 bne L0376
|
|
391 lsra
|
|
392 lsrb
|
|
393 tst <$24,u
|
|
394 bmi L0367
|
|
395 lsra
|
|
396 lsrb
|
|
397 bra L0367
|
|
398 L0376 stb <$4C,u
|
|
399 cmpb <$4D,u
|
|
400 andcc #^Carry
|
|
401 puls pc,b,a
|
|
402 L0380 orcc #Carry
|
|
403 puls pc,b,a
|
|
404 L0384 pshs b,a
|
|
405 jsr [<$5D,u]
|
|
406 bita #$80
|
|
407 beq L03A6
|
|
408 ldb <$4E,u
|
|
409 cmpb ,x
|
|
410 bne L03A6
|
|
411 ldb <$47,u
|
|
412 stb ,x
|
|
413 puls b,a
|
|
414 tst <$24,u
|
|
415 bmi L03A3
|
|
416 adda #$03
|
|
417 rts
|
|
418 L03A3 adda #$07
|
|
419 rts
|
|
420 L03A6 lbsr L0081
|
|
421 puls pc,b,a
|
|
422 L03AB ldx <$3F,u
|
|
423 beq L03B5
|
|
424 stx <$3D,u
|
|
425 L03B3 clrb
|
|
426 rts
|
|
427 L03B5 pshs u
|
|
428 ldd #$0200
|
|
429 os9 F$SRqMem
|
|
430 bcc L03C1
|
|
431 puls pc,u
|
|
432 L03C1 tfr u,d
|
|
433 puls u
|
|
434 std <$3B,u
|
|
435 addd #$0200
|
|
436 std <$3F,u
|
|
437 std <$3D,u
|
|
438 bra L03B3
|
|
439 L03D3 pshs b,a
|
|
440 ldd <$3D,u
|
|
441 subd #$0004
|
|
442 cmpd <$3B,u
|
|
443 bcs L03F2
|
|
444 std <$3D,u
|
|
445 tfr d,y
|
|
446 lda <$4F,u
|
|
447 sta ,y
|
|
448 stx $01,y
|
|
449 puls b,a
|
|
450 sta $03,y
|
|
451 rts
|
|
452 L03F2 ldb #$F5
|
|
453 stb <$41,u
|
|
454 puls pc,b,a
|
|
455 L03F9 ldd <$3D,u
|
|
456 cmpd <$3F,u
|
|
457 lbcc L034E
|
|
458 tfr d,y
|
|
459 addd #$0004
|
|
460 std <$3D,u
|
|
461 lda ,y
|
|
462 sta <$4F,u
|
|
463 ldd $01,y
|
|
464 tfr d,x
|
|
465 lda $03,y
|
|
466 andcc #^Carry
|
|
467 rts
|
|
468
|
|
469 emod
|
|
470 eom equ *
|