annotate level1/cmds/grfdrv.asm @ 2087:92a292bd81e8

makefiles updated
author boisy
date Sun, 23 Jul 2006 15:49:57 +0000
parents b41df77588b0
children b8c7b7fbf3c9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1933
1e312b144f4d Major changes:
boisy
parents:
diff changeset
1 ********************************************************************
1e312b144f4d Major changes:
boisy
parents:
diff changeset
2 * GrfDrv - Graphics module
1e312b144f4d Major changes:
boisy
parents:
diff changeset
3 *
1e312b144f4d Major changes:
boisy
parents:
diff changeset
4 * $Id$
1e312b144f4d Major changes:
boisy
parents:
diff changeset
5 *
1e312b144f4d Major changes:
boisy
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
1e312b144f4d Major changes:
boisy
parents:
diff changeset
7 * Comment
1e312b144f4d Major changes:
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1e312b144f4d Major changes:
boisy
parents:
diff changeset
9 * 1 ????/??/??
1e312b144f4d Major changes:
boisy
parents:
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00.
1e312b144f4d Major changes:
boisy
parents:
diff changeset
11
1e312b144f4d Major changes:
boisy
parents:
diff changeset
12 nam GrfDrv
1e312b144f4d Major changes:
boisy
parents:
diff changeset
13 ttl Graphics module
1e312b144f4d Major changes:
boisy
parents:
diff changeset
14
1e312b144f4d Major changes:
boisy
parents:
diff changeset
15 * Disassembled 02/04/05 23:44:21 by Disasm v1.6 (C) 1988 by RML
1e312b144f4d Major changes:
boisy
parents:
diff changeset
16
1e312b144f4d Major changes:
boisy
parents:
diff changeset
17 ifp1
1e312b144f4d Major changes:
boisy
parents:
diff changeset
18 use defsfile
1e312b144f4d Major changes:
boisy
parents:
diff changeset
19 use vtiodefs
1e312b144f4d Major changes:
boisy
parents:
diff changeset
20 endc
1e312b144f4d Major changes:
boisy
parents:
diff changeset
21
1e312b144f4d Major changes:
boisy
parents:
diff changeset
22 tylg set Systm+Objct
1e312b144f4d Major changes:
boisy
parents:
diff changeset
23 atrv set ReEnt+rev
1e312b144f4d Major changes:
boisy
parents:
diff changeset
24 rev set $00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
25 edition set 1
1e312b144f4d Major changes:
boisy
parents:
diff changeset
26
1e312b144f4d Major changes:
boisy
parents:
diff changeset
27 mod eom,name,tylg,atrv,start,size
1e312b144f4d Major changes:
boisy
parents:
diff changeset
28
1e312b144f4d Major changes:
boisy
parents:
diff changeset
29 org 0
1e312b144f4d Major changes:
boisy
parents:
diff changeset
30 size equ .
1e312b144f4d Major changes:
boisy
parents:
diff changeset
31
1e312b144f4d Major changes:
boisy
parents:
diff changeset
32 fcb $07
1942
b41df77588b0 printer is now scbbp
boisy
parents: 1933
diff changeset
33
1933
1e312b144f4d Major changes:
boisy
parents:
diff changeset
34 name fcs /GrfDrv/
1e312b144f4d Major changes:
boisy
parents:
diff changeset
35 fcb edition
1e312b144f4d Major changes:
boisy
parents:
diff changeset
36
1e312b144f4d Major changes:
boisy
parents:
diff changeset
37 * Dispatch table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
38 start lbra Init
1e312b144f4d Major changes:
boisy
parents:
diff changeset
39 lbra Write
1e312b144f4d Major changes:
boisy
parents:
diff changeset
40 lbra GetStat
1e312b144f4d Major changes:
boisy
parents:
diff changeset
41 lbra SetStat
1e312b144f4d Major changes:
boisy
parents:
diff changeset
42 lbra Term
1e312b144f4d Major changes:
boisy
parents:
diff changeset
43
1e312b144f4d Major changes:
boisy
parents:
diff changeset
44 * 128x192 4 color pixel table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
45 Mode1Clr fdb $0055,$aaff
1e312b144f4d Major changes:
boisy
parents:
diff changeset
46
1e312b144f4d Major changes:
boisy
parents:
diff changeset
47 GetStat
1e312b144f4d Major changes:
boisy
parents:
diff changeset
48 SetStat comb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
49 ldb #E$UnkSvc
1e312b144f4d Major changes:
boisy
parents:
diff changeset
50 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
51
1e312b144f4d Major changes:
boisy
parents:
diff changeset
52 Write suba #$15
1e312b144f4d Major changes:
boisy
parents:
diff changeset
53 leax <Table,pcr
1e312b144f4d Major changes:
boisy
parents:
diff changeset
54 lsla
1e312b144f4d Major changes:
boisy
parents:
diff changeset
55 ldd a,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
56 jmp d,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
57
1e312b144f4d Major changes:
boisy
parents:
diff changeset
58 Table fdb Do15-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
59 fdb Do16-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
60 fdb Do17-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
61 fdb Do18-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
62 fdb Do19-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
63 fdb Do1A-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
64 fdb NoOp-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
65 fdb Do1C-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
66 fdb Do1D-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
67 fdb NoOp-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
68 fdb NoOp-Table
1e312b144f4d Major changes:
boisy
parents:
diff changeset
69
1e312b144f4d Major changes:
boisy
parents:
diff changeset
70 * Fix X/Y coords:
1e312b144f4d Major changes:
boisy
parents:
diff changeset
71 * - if Y > 191 then cap it at 191
1e312b144f4d Major changes:
boisy
parents:
diff changeset
72 * - adjust X coord if in 128x192 mode
1e312b144f4d Major changes:
boisy
parents:
diff changeset
73 FixXY ldd <V.NChar,u get next 2 charas
1e312b144f4d Major changes:
boisy
parents:
diff changeset
74 cmpb #192 Y greater than max?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
75 bcs L0053 branch if lower than
1e312b144f4d Major changes:
boisy
parents:
diff changeset
76 ldb #191
1e312b144f4d Major changes:
boisy
parents:
diff changeset
77 L0053 tst <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
78 bmi L0059 branch if 256x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
79 lsra else divide X by 2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
80 L0059 std <V.NChar,u and save
1e312b144f4d Major changes:
boisy
parents:
diff changeset
81 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
82
1e312b144f4d Major changes:
boisy
parents:
diff changeset
83 * $15 - set graphics cursor
1e312b144f4d Major changes:
boisy
parents:
diff changeset
84 Do15 leax <SetGC,pcr load X with return address
1e312b144f4d Major changes:
boisy
parents:
diff changeset
85 GChar2 ldb #$02 need two parameters
1e312b144f4d Major changes:
boisy
parents:
diff changeset
86 lbra GChar
1e312b144f4d Major changes:
boisy
parents:
diff changeset
87
1e312b144f4d Major changes:
boisy
parents:
diff changeset
88 SetGC bsr FixXY fix coords
1e312b144f4d Major changes:
boisy
parents:
diff changeset
89 std <V.GCrsX,u and save new gfx cursor pos
1e312b144f4d Major changes:
boisy
parents:
diff changeset
90
1e312b144f4d Major changes:
boisy
parents:
diff changeset
91 NoOp
1e312b144f4d Major changes:
boisy
parents:
diff changeset
92 Init
1e312b144f4d Major changes:
boisy
parents:
diff changeset
93 Term clrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
94 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
95
1e312b144f4d Major changes:
boisy
parents:
diff changeset
96 * $19 - erase point
1e312b144f4d Major changes:
boisy
parents:
diff changeset
97 Do19 clr <V.Msk1,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
98 * $18 - set point
1e312b144f4d Major changes:
boisy
parents:
diff changeset
99 Do18 leax <DrawPnt,pcr
1e312b144f4d Major changes:
boisy
parents:
diff changeset
100 bra GChar2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
101
1e312b144f4d Major changes:
boisy
parents:
diff changeset
102 DrawPnt bsr FixXY fix coords
1e312b144f4d Major changes:
boisy
parents:
diff changeset
103 std <V.GCrsX,u save as new gfx cursor pos
1e312b144f4d Major changes:
boisy
parents:
diff changeset
104 bsr DrwPt2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
105 lbra L014A
1e312b144f4d Major changes:
boisy
parents:
diff changeset
106 DrwPt2 jsr [<V.CnvVct,u]
1e312b144f4d Major changes:
boisy
parents:
diff changeset
107 L0081 tfr a,b
1e312b144f4d Major changes:
boisy
parents:
diff changeset
108 comb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
109 andb ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
110 stb ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
111 anda <V.Msk1,u and with mask
1e312b144f4d Major changes:
boisy
parents:
diff changeset
112 ora ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
113 sta ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
114 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
115
1e312b144f4d Major changes:
boisy
parents:
diff changeset
116 * $17 - erase line
1e312b144f4d Major changes:
boisy
parents:
diff changeset
117 Do17 clr <V.Msk1,u clear mask value
1e312b144f4d Major changes:
boisy
parents:
diff changeset
118
1e312b144f4d Major changes:
boisy
parents:
diff changeset
119 * $16 - draw line
1e312b144f4d Major changes:
boisy
parents:
diff changeset
120 Do16 leax <DrawLine,pcr load X with return address
1e312b144f4d Major changes:
boisy
parents:
diff changeset
121 bra GChar2 need two params
1e312b144f4d Major changes:
boisy
parents:
diff changeset
122
1e312b144f4d Major changes:
boisy
parents:
diff changeset
123 DrawLine bsr FixXY fix up coords
1e312b144f4d Major changes:
boisy
parents:
diff changeset
124 leas -$0E,s make room on stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
125 std $0C,s save X/Y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
126 jsr [<V.CnvVct,u] get address given X/Y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
127 stx $02,s save on stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
128 sta $01,s and pixel too
1e312b144f4d Major changes:
boisy
parents:
diff changeset
129 ldd <V.GCrsX,u get current graphics cursor
1e312b144f4d Major changes:
boisy
parents:
diff changeset
130 jsr [<V.CnvVct,u] get address given X/Y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
131 sta ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
132 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
133 clrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
134 std $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
135 lda #$BF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
136 suba <V.GCrsY,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
137 sta <V.GCrsY,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
138 lda #$BF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
139 suba <V.NChr2,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
140 sta <V.NChr2,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
141 lda #$FF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
142 sta $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
143 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
144 ldb <V.GCrsX,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
145 subb <V.NChar,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
146 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
147 bpl L00D6
1e312b144f4d Major changes:
boisy
parents:
diff changeset
148 nega
1e312b144f4d Major changes:
boisy
parents:
diff changeset
149 negb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
150 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
151 neg $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
152 L00D6 std $08,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
153 bne L00DF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
154 ldd #$FFFF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
155 std $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
156 L00DF lda #$E0
1e312b144f4d Major changes:
boisy
parents:
diff changeset
157 sta $07,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
158 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
159 ldb <V.GCrsY,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
160 subb <V.NChr2,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
161 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
162 bpl L00F4
1e312b144f4d Major changes:
boisy
parents:
diff changeset
163 nega
1e312b144f4d Major changes:
boisy
parents:
diff changeset
164 negb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
165 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
166 neg $07,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
167 L00F4 std $0A,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
168 bra L0100
1e312b144f4d Major changes:
boisy
parents:
diff changeset
169 L00F8 sta ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
170 ldd $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
171 subd $0A,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
172 std $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
173 L0100 lda ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
174 lbsr L0081
1e312b144f4d Major changes:
boisy
parents:
diff changeset
175 cmpx $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
176 bne L010F
1e312b144f4d Major changes:
boisy
parents:
diff changeset
177 lda ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
178 cmpa $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
179 beq L0143
1e312b144f4d Major changes:
boisy
parents:
diff changeset
180 L010F ldd $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
181 bpl L011D
1e312b144f4d Major changes:
boisy
parents:
diff changeset
182 addd $08,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
183 std $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
184 lda $07,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
185 leax a,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
186 bra L0100
1e312b144f4d Major changes:
boisy
parents:
diff changeset
187 L011D lda ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
188 ldb $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
189 bpl L0133
1e312b144f4d Major changes:
boisy
parents:
diff changeset
190 lsla
1e312b144f4d Major changes:
boisy
parents:
diff changeset
191 ldb <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
192 bmi L012A branch if 256x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
193 lsla
1e312b144f4d Major changes:
boisy
parents:
diff changeset
194 L012A bcc L00F8
1e312b144f4d Major changes:
boisy
parents:
diff changeset
195 lda <V.4A,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
196 leax -$01,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
197 bra L00F8
1e312b144f4d Major changes:
boisy
parents:
diff changeset
198 L0133 lsra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
199 ldb <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
200 bmi L013A branch if 256x196
1e312b144f4d Major changes:
boisy
parents:
diff changeset
201 lsra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
202 L013A bcc L00F8
1e312b144f4d Major changes:
boisy
parents:
diff changeset
203 lda <V.MCol,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
204 leax $01,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
205 bra L00F8
1e312b144f4d Major changes:
boisy
parents:
diff changeset
206 L0143 ldd $0C,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
207 std <V.GCrsX,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
208 leas $0E,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
209 L014A lda <V.Msk2,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
210 sta <V.Msk1,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
211 clrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
212 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
213
1e312b144f4d Major changes:
boisy
parents:
diff changeset
214 * $1C - erase circle
1e312b144f4d Major changes:
boisy
parents:
diff changeset
215 Do1C clr <V.Msk1,u clear mask value
1e312b144f4d Major changes:
boisy
parents:
diff changeset
216 * $1A - draw circle
1e312b144f4d Major changes:
boisy
parents:
diff changeset
217 Do1A leax <Circle,pcr
1e312b144f4d Major changes:
boisy
parents:
diff changeset
218 ldb #$01 require another param -- radius
1e312b144f4d Major changes:
boisy
parents:
diff changeset
219 GChar stb <V.NGChr,u one more char
1e312b144f4d Major changes:
boisy
parents:
diff changeset
220 stx <V.RTAdd,u return address
1e312b144f4d Major changes:
boisy
parents:
diff changeset
221 clrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
222 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
223
1e312b144f4d Major changes:
boisy
parents:
diff changeset
224 Circle leas -$04,s make room on stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
225 ldb <V.NChr2,u get radius
1e312b144f4d Major changes:
boisy
parents:
diff changeset
226 stb $01,s store on stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
227 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
228 sta ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
229 addb $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
230 adca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
231 nega
1e312b144f4d Major changes:
boisy
parents:
diff changeset
232 negb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
233 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
234 addd #$0003
1e312b144f4d Major changes:
boisy
parents:
diff changeset
235 std $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
236 L0179 lda ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
237 cmpa $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
238 bcc L01AB
1e312b144f4d Major changes:
boisy
parents:
diff changeset
239 ldb $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
240 bsr L01B9
1e312b144f4d Major changes:
boisy
parents:
diff changeset
241 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
242 ldb $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
243 bpl L0193
1e312b144f4d Major changes:
boisy
parents:
diff changeset
244 ldb ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
245 lslb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
246 rola
1e312b144f4d Major changes:
boisy
parents:
diff changeset
247 lslb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
248 rola
1e312b144f4d Major changes:
boisy
parents:
diff changeset
249 addd #$0006
1e312b144f4d Major changes:
boisy
parents:
diff changeset
250 bra L01A3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
251 L0193 dec $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
252 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
253 ldb ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
254 subb $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
255 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
256 lslb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
257 rola
1e312b144f4d Major changes:
boisy
parents:
diff changeset
258 lslb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
259 rola
1e312b144f4d Major changes:
boisy
parents:
diff changeset
260 addd #$000A
1e312b144f4d Major changes:
boisy
parents:
diff changeset
261 L01A3 addd $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
262 std $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
263 inc ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
264 bra L0179
1e312b144f4d Major changes:
boisy
parents:
diff changeset
265 L01AB lda ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
266 cmpa $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
267 bne L01B5
1e312b144f4d Major changes:
boisy
parents:
diff changeset
268 ldb $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
269 bsr L01B9
1e312b144f4d Major changes:
boisy
parents:
diff changeset
270 L01B5 leas $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
271 bra L014A
1e312b144f4d Major changes:
boisy
parents:
diff changeset
272 L01B9 leas -$08,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
273 sta ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
274 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
275 std $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
276 nega
1e312b144f4d Major changes:
boisy
parents:
diff changeset
277 negb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
278 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
279 std $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
280 ldb ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
281 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
282 std ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
283 nega
1e312b144f4d Major changes:
boisy
parents:
diff changeset
284 negb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
285 sbca #$00
1e312b144f4d Major changes:
boisy
parents:
diff changeset
286 std $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
287 ldx $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
288 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
289 ldd $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
290 ldx $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
291 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
292 ldd ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
293 ldx $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
294 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
295 ldd ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
296 ldx $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
297 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
298 ldd $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
299 ldx ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
300 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
301 ldd $02,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
302 ldx $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
303 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
304 ldd $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
305 ldx $04,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
306 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
307 ldd $06,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
308 ldx ,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
309 bsr L0202
1e312b144f4d Major changes:
boisy
parents:
diff changeset
310 leas $08,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
311 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
312 L0202 pshs b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
313 ldb <V.GCrsY,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
314 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
315 leax d,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
316 cmpx #$0000
1e312b144f4d Major changes:
boisy
parents:
diff changeset
317 bmi L0214
1e312b144f4d Major changes:
boisy
parents:
diff changeset
318 cmpx #$00BF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
319 ble L0216
1e312b144f4d Major changes:
boisy
parents:
diff changeset
320 L0214 puls pc,b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
321 L0216 ldb <V.GCrsX,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
322 clra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
323 tst <V.Mode,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
324 bmi L0221
1e312b144f4d Major changes:
boisy
parents:
diff changeset
325 lslb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
326 rola
1e312b144f4d Major changes:
boisy
parents:
diff changeset
327 L0221 addd ,s++
1e312b144f4d Major changes:
boisy
parents:
diff changeset
328 tsta
1e312b144f4d Major changes:
boisy
parents:
diff changeset
329 beq L0227
1e312b144f4d Major changes:
boisy
parents:
diff changeset
330 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
331 L0227 pshs b
1e312b144f4d Major changes:
boisy
parents:
diff changeset
332 tfr x,d
1e312b144f4d Major changes:
boisy
parents:
diff changeset
333 puls a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
334 tst <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
335 lbmi DrwPt2 branch if 256x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
336 lsra else divide A by 2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
337 lbra DrwPt2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
338
1e312b144f4d Major changes:
boisy
parents:
diff changeset
339 * $1D - flood fill
1e312b144f4d Major changes:
boisy
parents:
diff changeset
340 Do1D clr <V.FFFlag,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
341 leas -$07,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
342 lbsr L03AB
1e312b144f4d Major changes:
boisy
parents:
diff changeset
343 lbcs L0346
1e312b144f4d Major changes:
boisy
parents:
diff changeset
344 lda #$FF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
345 sta <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
346 ldd <V.GCrsX,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
347 lbsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
348 lda <V.4C,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
349 sta <V.4D,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
350 tst <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
351 bpl L0261 branch if 128x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
352 tsta
1e312b144f4d Major changes:
boisy
parents:
diff changeset
353 beq L0267
1e312b144f4d Major changes:
boisy
parents:
diff changeset
354 lda #$FF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
355 bra L0267
1e312b144f4d Major changes:
boisy
parents:
diff changeset
356 L0261 leax >Mode1Clr,pcr
1e312b144f4d Major changes:
boisy
parents:
diff changeset
357 lda a,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
358 L0267 sta <V.4E,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
359 cmpa <V.Msk1,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
360 lbeq L0346
1e312b144f4d Major changes:
boisy
parents:
diff changeset
361 ldd <V.GCrsX,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
362 L0274 suba #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
363 bcs L027F
1e312b144f4d Major changes:
boisy
parents:
diff changeset
364 lbsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
365 bcs L027F
1e312b144f4d Major changes:
boisy
parents:
diff changeset
366 beq L0274
1e312b144f4d Major changes:
boisy
parents:
diff changeset
367 L027F inca
1e312b144f4d Major changes:
boisy
parents:
diff changeset
368 std $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
369 L0282 lbsr L0384
1e312b144f4d Major changes:
boisy
parents:
diff changeset
370 adda #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
371 bcs L0290
1e312b144f4d Major changes:
boisy
parents:
diff changeset
372 lbsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
373 bcs L0290
1e312b144f4d Major changes:
boisy
parents:
diff changeset
374 beq L0282
1e312b144f4d Major changes:
boisy
parents:
diff changeset
375 L0290 deca
1e312b144f4d Major changes:
boisy
parents:
diff changeset
376 ldx $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
377 lbsr L03D3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
378 neg <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
379 lbsr L03D3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
380 L029C lbsr L03F9
1e312b144f4d Major changes:
boisy
parents:
diff changeset
381 lbcs L0346
1e312b144f4d Major changes:
boisy
parents:
diff changeset
382 tst <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
383 bpl L02B3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
384 subb #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
385 bcs L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
386 std $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
387 tfr x,d
1e312b144f4d Major changes:
boisy
parents:
diff changeset
388 decb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
389 bra L02BD
1e312b144f4d Major changes:
boisy
parents:
diff changeset
390 L02B3 incb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
391 cmpb #$BF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
392 bhi L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
393 std $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
394 tfr x,d
1e312b144f4d Major changes:
boisy
parents:
diff changeset
395 incb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
396 L02BD std $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
397 lbsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
398 bcs L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
399 L02C4 bne L02D2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
400 suba #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
401 bcc L02CD
1e312b144f4d Major changes:
boisy
parents:
diff changeset
402 inca
1e312b144f4d Major changes:
boisy
parents:
diff changeset
403 bra L02D6
1e312b144f4d Major changes:
boisy
parents:
diff changeset
404 L02CD lbsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
405 bcc L02C4
1e312b144f4d Major changes:
boisy
parents:
diff changeset
406 L02D2 adda #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
407 bcs L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
408 L02D6 cmpd $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
409 bhi L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
410 bsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
411 bcs L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
412 bne L02D2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
413 std $05,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
414 cmpd $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
415 bcc L02FB
1e312b144f4d Major changes:
boisy
parents:
diff changeset
416 ldd $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
417 decb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
418 cmpd $05,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
419 beq L02FB
1e312b144f4d Major changes:
boisy
parents:
diff changeset
420 neg <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
421 ldx $05,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
422 lbsr L03D3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
423 neg <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
424 L02FB ldd $05,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
425 L02FD std $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
426 L02FF bsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
427 bcs L030B
1e312b144f4d Major changes:
boisy
parents:
diff changeset
428 bne L030B
1e312b144f4d Major changes:
boisy
parents:
diff changeset
429 bsr L0384
1e312b144f4d Major changes:
boisy
parents:
diff changeset
430 adda #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
431 bcc L02FF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
432 L030B deca
1e312b144f4d Major changes:
boisy
parents:
diff changeset
433 ldx $01,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
434 lbsr L03D3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
435 std $05,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
436 adda #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
437 bcs L0326
1e312b144f4d Major changes:
boisy
parents:
diff changeset
438 L0317 cmpd $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
439 bcc L0326
1e312b144f4d Major changes:
boisy
parents:
diff changeset
440 adda #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
441 bsr L0351
1e312b144f4d Major changes:
boisy
parents:
diff changeset
442 bcs L0326
1e312b144f4d Major changes:
boisy
parents:
diff changeset
443 bne L0317
1e312b144f4d Major changes:
boisy
parents:
diff changeset
444 bra L02FD
1e312b144f4d Major changes:
boisy
parents:
diff changeset
445 L0326 inc $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
446 inc $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
447 ldd $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
448 cmpa #$02
1e312b144f4d Major changes:
boisy
parents:
diff changeset
449 lbcs L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
450 ldd $05,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
451 cmpd $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
452 lbcs L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
453 neg <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
454 ldx $03,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
455 lbsr L03D3
1e312b144f4d Major changes:
boisy
parents:
diff changeset
456 lbra L029C
1e312b144f4d Major changes:
boisy
parents:
diff changeset
457 L0346 leas $07,s
1e312b144f4d Major changes:
boisy
parents:
diff changeset
458 clrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
459 ldb <V.FFFlag,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
460 beq L0350
1e312b144f4d Major changes:
boisy
parents:
diff changeset
461 L034E orcc #Carry
1e312b144f4d Major changes:
boisy
parents:
diff changeset
462 L0350 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
463 L0351 pshs b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
464 cmpb #$BF
1e312b144f4d Major changes:
boisy
parents:
diff changeset
465 bhi L0380
1e312b144f4d Major changes:
boisy
parents:
diff changeset
466 tst <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
467 bmi L0360 branch if 256x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
468 cmpa #$7F
1e312b144f4d Major changes:
boisy
parents:
diff changeset
469 bhi L0380
1e312b144f4d Major changes:
boisy
parents:
diff changeset
470 L0360 jsr [<V.CnvVct,u]
1e312b144f4d Major changes:
boisy
parents:
diff changeset
471 tfr a,b
1e312b144f4d Major changes:
boisy
parents:
diff changeset
472 andb ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
473 L0367 bita #$01
1e312b144f4d Major changes:
boisy
parents:
diff changeset
474 bne L0376
1e312b144f4d Major changes:
boisy
parents:
diff changeset
475 lsra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
476 lsrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
477 tst <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
478 bmi L0367 branch if 256x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
479 lsra
1e312b144f4d Major changes:
boisy
parents:
diff changeset
480 lsrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
481 bra L0367
1e312b144f4d Major changes:
boisy
parents:
diff changeset
482 L0376 stb <V.4C,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
483 cmpb <V.4D,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
484 andcc #^Carry
1e312b144f4d Major changes:
boisy
parents:
diff changeset
485 puls pc,b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
486 L0380 orcc #Carry
1e312b144f4d Major changes:
boisy
parents:
diff changeset
487 puls pc,b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
488 L0384 pshs b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
489 jsr [<V.CnvVct,u]
1e312b144f4d Major changes:
boisy
parents:
diff changeset
490 bita #$80
1e312b144f4d Major changes:
boisy
parents:
diff changeset
491 beq L03A6
1e312b144f4d Major changes:
boisy
parents:
diff changeset
492 ldb <V.4E,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
493 cmpb ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
494 bne L03A6
1e312b144f4d Major changes:
boisy
parents:
diff changeset
495 ldb <V.Msk1,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
496 stb ,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
497 puls b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
498 tst <V.Mode,u which mode?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
499 bmi L03A3 branch if 256x192
1e312b144f4d Major changes:
boisy
parents:
diff changeset
500 adda #$03
1e312b144f4d Major changes:
boisy
parents:
diff changeset
501 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
502 L03A3 adda #$07
1e312b144f4d Major changes:
boisy
parents:
diff changeset
503 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
504 L03A6 lbsr L0081
1e312b144f4d Major changes:
boisy
parents:
diff changeset
505 puls pc,b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
506 L03AB ldx <V.FFSTp,u get top of flood fill stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
507 beq L03B5 if zero, we need to allocate stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
508 stx <V.FFSPt,u else reset flood fill stack ptr
1e312b144f4d Major changes:
boisy
parents:
diff changeset
509 L03B3 clrb
1e312b144f4d Major changes:
boisy
parents:
diff changeset
510 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
511
1e312b144f4d Major changes:
boisy
parents:
diff changeset
512 * Allocate Flood Fill Stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
513 L03B5 pshs u save U for now
1e312b144f4d Major changes:
boisy
parents:
diff changeset
514 ldd #$0200 get 512 bytes
1e312b144f4d Major changes:
boisy
parents:
diff changeset
515 os9 F$SRqMem from system
1e312b144f4d Major changes:
boisy
parents:
diff changeset
516 bcc AllocOk branch if ok
1e312b144f4d Major changes:
boisy
parents:
diff changeset
517 puls pc,u else pull out with error
1e312b144f4d Major changes:
boisy
parents:
diff changeset
518 AllocOk tfr u,d move pointer to alloced mem to D
1e312b144f4d Major changes:
boisy
parents:
diff changeset
519 puls u get stat pointer we saved earlier
1e312b144f4d Major changes:
boisy
parents:
diff changeset
520 std <V.FFMem,u save pointer to alloc'ed mem
1e312b144f4d Major changes:
boisy
parents:
diff changeset
521 addd #512 point D to end of alloc'ed mem
1e312b144f4d Major changes:
boisy
parents:
diff changeset
522 std <V.FFSTp,u and save here as top of fill stack
1e312b144f4d Major changes:
boisy
parents:
diff changeset
523 std <V.FFSPt,u and here
1e312b144f4d Major changes:
boisy
parents:
diff changeset
524 bra L03B3 do a clean return
1e312b144f4d Major changes:
boisy
parents:
diff changeset
525
1e312b144f4d Major changes:
boisy
parents:
diff changeset
526 L03D3 pshs b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
527 ldd <V.FFSPt,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
528 subd #$0004
1e312b144f4d Major changes:
boisy
parents:
diff changeset
529 cmpd <V.FFMem,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
530 bcs L03F2
1e312b144f4d Major changes:
boisy
parents:
diff changeset
531 std <V.FFSPt,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
532 tfr d,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
533 lda <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
534 sta ,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
535 stx $01,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
536 puls b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
537 sta $03,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
538 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
539 L03F2 ldb #$F5
1e312b144f4d Major changes:
boisy
parents:
diff changeset
540 stb <V.FFFlag,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
541 puls pc,b,a
1e312b144f4d Major changes:
boisy
parents:
diff changeset
542 L03F9 ldd <V.FFSPt,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
543 cmpd <V.FFSTp,u top of flood fill stack?
1e312b144f4d Major changes:
boisy
parents:
diff changeset
544 lbcc L034E
1e312b144f4d Major changes:
boisy
parents:
diff changeset
545 tfr d,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
546 addd #$0004
1e312b144f4d Major changes:
boisy
parents:
diff changeset
547 std <V.FFSPt,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
548 lda ,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
549 sta <V.4F,u
1e312b144f4d Major changes:
boisy
parents:
diff changeset
550 ldd $01,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
551 tfr d,x
1e312b144f4d Major changes:
boisy
parents:
diff changeset
552 lda $03,y
1e312b144f4d Major changes:
boisy
parents:
diff changeset
553 andcc #^Carry
1e312b144f4d Major changes:
boisy
parents:
diff changeset
554 rts
1e312b144f4d Major changes:
boisy
parents:
diff changeset
555
1e312b144f4d Major changes:
boisy
parents:
diff changeset
556 emod
1e312b144f4d Major changes:
boisy
parents:
diff changeset
557 eom equ *
1e312b144f4d Major changes:
boisy
parents:
diff changeset
558 end
1e312b144f4d Major changes:
boisy
parents:
diff changeset
559