26
|
1 ********************************************************************
|
|
2 * GRFO - Graphics module
|
|
3 *
|
|
4 * $Id$
|
|
5 *
|
|
6 * Ed. Comments Who YY/MM/DD
|
|
7 * ------------------------------------------------------------------
|
|
8 * 7 Original Tandy/Microware version BGP 02/04/06
|
|
9
|
21
|
10 nam GRFO
|
|
11 ttl Graphics module
|
|
12
|
|
13 * Disassembled 02/04/05 23:44:21 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
|
|
23 mod eom,name,tylg,atrv,start,size
|
|
24
|
|
25 u0000 rmb 0
|
|
26 size equ .
|
|
27
|
|
28 fcb $07
|
|
29 name fcs /GRFO/
|
|
30 fcb $01
|
|
31
|
26
|
32 start lbra Entry7
|
21
|
33 lbra L002C
|
|
34 lbra L0026
|
|
35 lbra L0026
|
26
|
36 lbra Entry7
|
21
|
37
|
|
38 L0022 fdb $0055
|
|
39 L0024 fdb $aaff
|
26
|
40 L0026 comb
|
|
41 ldb #E$UnkSvc
|
|
42 rts
|
|
43
|
|
44 L002C suba #$15
|
|
45 leax <Table,pcr
|
|
46 lsla
|
|
47 ldd a,x
|
|
48 jmp d,x
|
|
49
|
|
50 Table fdb Entry1-Table
|
|
51 fdb Entry2-Table
|
|
52 fdb Entry3-Table
|
|
53 fdb Entry4-Table
|
|
54 fdb Entry5-Table
|
|
55 fdb Entry6-Table
|
|
56 fdb Entry7-Table
|
|
57 fdb Entry8-Table
|
|
58 fdb Entry9-Table
|
|
59 fdb Entry7-Table
|
|
60 fdb Entry7-Table
|
|
61
|
|
62 L004A ldd <$28,u
|
|
63 cmpb #$C0
|
|
64 bcs L0053
|
|
65 ldb #$BF
|
21
|
66 L0053 tst <$24,u
|
|
67 bmi L0059
|
|
68 lsra
|
|
69 L0059 std <$28,u
|
|
70 rts
|
26
|
71
|
|
72 Entry1 leax <L0065,pcr
|
21
|
73 L0060 ldb #$02
|
|
74 lbra L015A
|
|
75 L0065 bsr L004A
|
|
76 std <$45,u
|
26
|
77
|
|
78 Entry7 clrb
|
21
|
79 rts
|
26
|
80
|
|
81 Entry5 clr <$47,u
|
|
82 Entry4 leax <L0074,pcr
|
21
|
83 bra L0060
|
|
84 L0074 bsr L004A
|
|
85 std <$45,u
|
|
86 bsr L007E
|
|
87 lbra L014A
|
|
88 L007E jsr [<$5D,u]
|
|
89 L0081 tfr a,b
|
|
90 comb
|
|
91 andb ,x
|
|
92 stb ,x
|
|
93 anda <$47,u
|
|
94 ora ,x
|
|
95 sta ,x
|
|
96 rts
|
26
|
97 Entry3 clr <$47,u
|
|
98 Entry2 leax <L0098,pcr
|
21
|
99 bra L0060
|
|
100 L0098 bsr L004A
|
|
101 leas -$0E,s
|
|
102 std $0C,s
|
|
103 jsr [<$5D,u]
|
|
104 stx $02,s
|
|
105 sta $01,s
|
|
106 ldd <$45,u
|
|
107 jsr [<$5D,u]
|
|
108 sta ,s
|
|
109 clra
|
|
110 clrb
|
|
111 std $04,s
|
|
112 lda #$BF
|
|
113 suba <$46,u
|
|
114 sta <$46,u
|
|
115 lda #$BF
|
|
116 suba <$29,u
|
|
117 sta <$29,u
|
|
118 lda #$FF
|
|
119 sta $06,s
|
|
120 clra
|
|
121 ldb <$45,u
|
|
122 subb <$28,u
|
|
123 sbca #$00
|
|
124 bpl L00D6
|
|
125 nega
|
|
126 negb
|
|
127 sbca #$00
|
|
128 neg $06,s
|
|
129 L00D6 std $08,s
|
|
130 bne L00DF
|
|
131 ldd #$FFFF
|
|
132 std $04,s
|
|
133 L00DF lda #$E0
|
|
134 sta $07,s
|
|
135 clra
|
|
136 ldb <$46,u
|
|
137 subb <$29,u
|
|
138 sbca #$00
|
|
139 bpl L00F4
|
|
140 nega
|
|
141 negb
|
|
142 sbca #$00
|
|
143 neg $07,s
|
|
144 L00F4 std $0A,s
|
|
145 bra L0100
|
|
146 L00F8 sta ,s
|
|
147 ldd $04,s
|
|
148 subd $0A,s
|
|
149 std $04,s
|
|
150 L0100 lda ,s
|
|
151 lbsr L0081
|
|
152 cmpx $02,s
|
|
153 bne L010F
|
|
154 lda ,s
|
|
155 cmpa $01,s
|
|
156 beq L0143
|
|
157 L010F ldd $04,s
|
|
158 bpl L011D
|
|
159 addd $08,s
|
|
160 std $04,s
|
|
161 lda $07,s
|
|
162 leax a,x
|
|
163 bra L0100
|
|
164 L011D lda ,s
|
|
165 ldb $06,s
|
|
166 bpl L0133
|
|
167 lsla
|
|
168 ldb <$24,u
|
|
169 bmi L012A
|
|
170 lsla
|
|
171 L012A bcc L00F8
|
|
172 lda <$4A,u
|
|
173 leax -$01,x
|
|
174 bra L00F8
|
|
175 L0133 lsra
|
|
176 ldb <$24,u
|
|
177 bmi L013A
|
|
178 lsra
|
|
179 L013A bcc L00F8
|
|
180 lda <$49,u
|
|
181 leax $01,x
|
|
182 bra L00F8
|
|
183 L0143 ldd $0C,s
|
|
184 std <$45,u
|
|
185 leas $0E,s
|
|
186 L014A lda <$48,u
|
|
187 sta <$47,u
|
|
188 clrb
|
|
189 rts
|
26
|
190 Entry8 clr <$47,u
|
|
191 Entry6 leax <L0162,pcr
|
21
|
192 ldb #$01
|
|
193 L015A stb <$25,u
|
|
194 stx <$26,u
|
|
195 clrb
|
|
196 rts
|
|
197 L0162 leas -$04,s
|
|
198 ldb <$29,u
|
|
199 stb $01,s
|
|
200 clra
|
|
201 sta ,s
|
|
202 addb $01,s
|
|
203 adca #$00
|
|
204 nega
|
|
205 negb
|
|
206 sbca #$00
|
|
207 addd #$0003
|
|
208 std $02,s
|
|
209 L0179 lda ,s
|
|
210 cmpa $01,s
|
|
211 bcc L01AB
|
|
212 ldb $01,s
|
|
213 bsr L01B9
|
|
214 clra
|
|
215 ldb $02,s
|
|
216 bpl L0193
|
|
217 ldb ,s
|
|
218 lslb
|
|
219 rola
|
|
220 lslb
|
|
221 rola
|
|
222 addd #$0006
|
|
223 bra L01A3
|
|
224 L0193 dec $01,s
|
|
225 clra
|
|
226 ldb ,s
|
|
227 subb $01,s
|
|
228 sbca #$00
|
|
229 lslb
|
|
230 rola
|
|
231 lslb
|
|
232 rola
|
|
233 addd #$000A
|
|
234 L01A3 addd $02,s
|
|
235 std $02,s
|
|
236 inc ,s
|
|
237 bra L0179
|
|
238 L01AB lda ,s
|
|
239 cmpa $01,s
|
|
240 bne L01B5
|
|
241 ldb $01,s
|
|
242 bsr L01B9
|
|
243 L01B5 leas $04,s
|
|
244 bra L014A
|
|
245 L01B9 leas -$08,s
|
|
246 sta ,s
|
|
247 clra
|
|
248 std $02,s
|
|
249 nega
|
|
250 negb
|
|
251 sbca #$00
|
|
252 std $06,s
|
|
253 ldb ,s
|
|
254 clra
|
|
255 std ,s
|
|
256 nega
|
|
257 negb
|
|
258 sbca #$00
|
|
259 std $04,s
|
|
260 ldx $06,s
|
|
261 bsr L0202
|
|
262 ldd $04,s
|
|
263 ldx $02,s
|
|
264 bsr L0202
|
|
265 ldd ,s
|
|
266 ldx $02,s
|
|
267 bsr L0202
|
|
268 ldd ,s
|
|
269 ldx $06,s
|
|
270 bsr L0202
|
|
271 ldd $02,s
|
|
272 ldx ,s
|
|
273 bsr L0202
|
|
274 ldd $02,s
|
|
275 ldx $04,s
|
|
276 bsr L0202
|
|
277 ldd $06,s
|
|
278 ldx $04,s
|
|
279 bsr L0202
|
|
280 ldd $06,s
|
|
281 ldx ,s
|
|
282 bsr L0202
|
|
283 leas $08,s
|
|
284 rts
|
|
285 L0202 pshs b,a
|
|
286 ldb <$46,u
|
|
287 clra
|
|
288 leax d,x
|
|
289 cmpx #$0000
|
|
290 bmi L0214
|
|
291 cmpx #$00BF
|
|
292 ble L0216
|
|
293 L0214 puls pc,b,a
|
|
294 L0216 ldb <$45,u
|
|
295 clra
|
|
296 tst <$24,u
|
|
297 bmi L0221
|
|
298 lslb
|
|
299 rola
|
|
300 L0221 addd ,s++
|
|
301 tsta
|
|
302 beq L0227
|
|
303 rts
|
|
304 L0227 pshs b
|
|
305 tfr x,d
|
|
306 puls a
|
|
307 tst <$24,u
|
|
308 lbmi L007E
|
|
309 lsra
|
|
310 lbra L007E
|
26
|
311 Entry9 clr <$41,u
|
21
|
312 leas -$07,s
|
|
313 lbsr L03AB
|
|
314 lbcs L0346
|
|
315 lda #$FF
|
|
316 sta <$4F,u
|
|
317 ldd <$45,u
|
|
318 lbsr L0351
|
|
319 lda <$4C,u
|
|
320 sta <$4D,u
|
|
321 tst <$24,u
|
|
322 bpl L0261
|
|
323 tsta
|
|
324 beq L0267
|
|
325 lda #$FF
|
|
326 bra L0267
|
|
327 L0261 leax >L0022,pcr
|
|
328 lda a,x
|
|
329 L0267 sta <$4E,u
|
|
330 cmpa <$47,u
|
|
331 lbeq L0346
|
|
332 ldd <$45,u
|
|
333 L0274 suba #$01
|
|
334 bcs L027F
|
|
335 lbsr L0351
|
|
336 bcs L027F
|
|
337 beq L0274
|
|
338 L027F inca
|
|
339 std $01,s
|
|
340 L0282 lbsr L0384
|
|
341 adda #$01
|
|
342 bcs L0290
|
|
343 lbsr L0351
|
|
344 bcs L0290
|
|
345 beq L0282
|
|
346 L0290 deca
|
|
347 ldx $01,s
|
|
348 lbsr L03D3
|
|
349 neg <$4F,u
|
|
350 lbsr L03D3
|
|
351 L029C lbsr L03F9
|
|
352 lbcs L0346
|
|
353 tst <$4F,u
|
|
354 bpl L02B3
|
|
355 subb #$01
|
|
356 bcs L029C
|
|
357 std $03,s
|
|
358 tfr x,d
|
|
359 decb
|
|
360 bra L02BD
|
|
361 L02B3 incb
|
|
362 cmpb #$BF
|
|
363 bhi L029C
|
|
364 std $03,s
|
|
365 tfr x,d
|
|
366 incb
|
|
367 L02BD std $01,s
|
|
368 lbsr L0351
|
|
369 bcs L029C
|
|
370 L02C4 bne L02D2
|
|
371 suba #$01
|
|
372 bcc L02CD
|
|
373 inca
|
|
374 bra L02D6
|
|
375 L02CD lbsr L0351
|
|
376 bcc L02C4
|
|
377 L02D2 adda #$01
|
|
378 bcs L029C
|
|
379 L02D6 cmpd $03,s
|
|
380 bhi L029C
|
|
381 bsr L0351
|
|
382 bcs L029C
|
|
383 bne L02D2
|
|
384 std $05,s
|
|
385 cmpd $01,s
|
|
386 bcc L02FB
|
|
387 ldd $01,s
|
|
388 decb
|
|
389 cmpd $05,s
|
|
390 beq L02FB
|
|
391 neg <$4F,u
|
|
392 ldx $05,s
|
|
393 lbsr L03D3
|
|
394 neg <$4F,u
|
|
395 L02FB ldd $05,s
|
|
396 L02FD std $01,s
|
|
397 L02FF bsr L0351
|
|
398 bcs L030B
|
|
399 bne L030B
|
|
400 bsr L0384
|
|
401 adda #$01
|
|
402 bcc L02FF
|
|
403 L030B deca
|
|
404 ldx $01,s
|
|
405 lbsr L03D3
|
|
406 std $05,s
|
|
407 adda #$01
|
|
408 bcs L0326
|
|
409 L0317 cmpd $03,s
|
|
410 bcc L0326
|
|
411 adda #$01
|
|
412 bsr L0351
|
|
413 bcs L0326
|
|
414 bne L0317
|
|
415 bra L02FD
|
|
416 L0326 inc $03,s
|
|
417 inc $03,s
|
|
418 ldd $03,s
|
|
419 cmpa #$02
|
|
420 lbcs L029C
|
|
421 ldd $05,s
|
|
422 cmpd $03,s
|
|
423 lbcs L029C
|
|
424 neg <$4F,u
|
|
425 ldx $03,s
|
|
426 lbsr L03D3
|
|
427 lbra L029C
|
|
428 L0346 leas $07,s
|
|
429 clrb
|
|
430 ldb <$41,u
|
|
431 beq L0350
|
26
|
432 L034E orcc #Carry
|
21
|
433 L0350 rts
|
|
434 L0351 pshs b,a
|
|
435 cmpb #$BF
|
|
436 bhi L0380
|
|
437 tst <$24,u
|
|
438 bmi L0360
|
|
439 cmpa #$7F
|
|
440 bhi L0380
|
|
441 L0360 jsr [<$5D,u]
|
|
442 tfr a,b
|
|
443 andb ,x
|
|
444 L0367 bita #$01
|
|
445 bne L0376
|
|
446 lsra
|
|
447 lsrb
|
|
448 tst <$24,u
|
|
449 bmi L0367
|
|
450 lsra
|
|
451 lsrb
|
|
452 bra L0367
|
|
453 L0376 stb <$4C,u
|
|
454 cmpb <$4D,u
|
26
|
455 andcc #^Carry
|
21
|
456 puls pc,b,a
|
26
|
457 L0380 orcc #Carry
|
21
|
458 puls pc,b,a
|
|
459 L0384 pshs b,a
|
|
460 jsr [<$5D,u]
|
|
461 bita #$80
|
|
462 beq L03A6
|
|
463 ldb <$4E,u
|
|
464 cmpb ,x
|
|
465 bne L03A6
|
|
466 ldb <$47,u
|
|
467 stb ,x
|
|
468 puls b,a
|
|
469 tst <$24,u
|
|
470 bmi L03A3
|
|
471 adda #$03
|
|
472 rts
|
|
473 L03A3 adda #$07
|
|
474 rts
|
|
475 L03A6 lbsr L0081
|
|
476 puls pc,b,a
|
|
477 L03AB ldx <$3F,u
|
|
478 beq L03B5
|
|
479 stx <$3D,u
|
|
480 L03B3 clrb
|
|
481 rts
|
|
482 L03B5 pshs u
|
|
483 ldd #$0200
|
|
484 os9 F$SRqMem
|
|
485 bcc L03C1
|
|
486 puls pc,u
|
|
487 L03C1 tfr u,d
|
|
488 puls u
|
|
489 std <$3B,u
|
|
490 addd #$0200
|
|
491 std <$3F,u
|
|
492 std <$3D,u
|
|
493 bra L03B3
|
|
494 L03D3 pshs b,a
|
|
495 ldd <$3D,u
|
|
496 subd #$0004
|
|
497 cmpd <$3B,u
|
|
498 bcs L03F2
|
|
499 std <$3D,u
|
|
500 tfr d,y
|
|
501 lda <$4F,u
|
|
502 sta ,y
|
|
503 stx $01,y
|
|
504 puls b,a
|
|
505 sta $03,y
|
|
506 rts
|
|
507 L03F2 ldb #$F5
|
|
508 stb <$41,u
|
|
509 puls pc,b,a
|
|
510 L03F9 ldd <$3D,u
|
|
511 cmpd <$3F,u
|
|
512 lbcc L034E
|
|
513 tfr d,y
|
|
514 addd #$0004
|
|
515 std <$3D,u
|
|
516 lda ,y
|
|
517 sta <$4F,u
|
|
518 ldd $01,y
|
|
519 tfr d,x
|
|
520 lda $03,y
|
26
|
521 andcc #^Carry
|
21
|
522 rts
|
|
523
|
|
524 emod
|
|
525 eom equ *
|
|
526 end
|
|
527
|