annotate level1/modules/grfo.asm @ 256:9e9648e17298

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