annotate level1/modules/wordpakii.asm @ 2940:824019cd8744

rb1773: Make 48 TPI floppy disks readonly in 96 TPI drives Deny the disk destroying write with the narrower heads of the 96 tpi drive when the user has placed a 48 tpi disk in the 96 tpi drive so he can read it. Double stepping the drive is then done automatically so as to stay in mechanical synch with the tracks on a 48 tpi disk. But that, until now, did not make the disk read-only, this patch does that. Patch by Gene Heskett and Robert Gault.
author Robert Gault <robert.gault@att.net>
date Sat, 25 Jan 2014 23:20:06 +0100
parents 1e312b144f4d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1881
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
1 ********************************************************************
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
2 * WordPakII - Word-Pak II Driver
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
3 *
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
4 * $Id$
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
5 *
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
6 * NOTE: This driver is currently a stand-alone SCF driver. Work has
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
7 * started to convert it into a co-module that would fit under the
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
8 * CCIO driver hierarchy, but that work is not complete.
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
9 *
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
10 * Edt/Rev YYYY/MM/DD Modified by
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
11 * Comment
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
12 * ------------------------------------------------------------------
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
13 * 5 1985?/??/??
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
14 * Original OS-9 Level One Driver
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
15
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
16 nam WordPakII
1881
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
17 ttl Word-Pak II Driver
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
18
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
19 * Disassembled 2005/01/06 19:47:27 by Disasm v1.5 (C) 1988 by RML
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
21 ifp1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
22 use defsfile
1933
1e312b144f4d Major changes:
boisy
parents: 1881
diff changeset
23 use vtiodefs
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
24 endc
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
25
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
26 tylg set Drivr+Objct
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
27 atrv set ReEnt+rev
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
28 rev set $01
1881
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
29 edition set 5
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
30
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
31 CO80 equ 0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
32 SIZEX equ 80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
33 SIZEY equ 24
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
34
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
35 mod eom,name,tylg,atrv,start,size
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
36 rmb $1D
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
37 V.PIA rmb 2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
38 rmb $BB-$1D-2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
39 size equ .
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
40
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
41 fcb $07
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
42
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
43 name
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
44 IFEQ CO80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
45 fcs /WordPakII/
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
46 ELSE
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
47 fcs /CO80/
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
48 ENDC
1881
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
49 fcb edition
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
50
1881
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
51 * fcc /(C) 1985 PBJ, Inc./
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
52
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
53 * WordPak Initialization Values
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
54 WPIV fcb $6E R0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
55 fcb $50 R1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
56 fcb $56 R2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
57 fcb $18 R3
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
58 fcb $1A R4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
59 fcb $00 R5
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
60 fcb $18 R6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
61 fcb $19 R7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
62 fcb $78 R8
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
63 fcb $09 R9
1881
a9154d83aff9 Combo of changes
boisy
parents: 1741
diff changeset
64 L0034 fcb $60 R10
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
65 fcb $09 R11
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
66 fcb $00 R12
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
67 fcb $00 R13
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
68 fcb $00 R14
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
69 fcb $00 R15
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
70 fcb $00 R16
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
71 fcb $00 R17
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
72 fcb $00 R18
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
73 fcb $00 R19
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
74 fcb $10 R20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
75
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
76 start bra Init
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
77 nop
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
78 IFEQ CO80
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
79 lbra Read
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
80 ENDC
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
81 lbra Write
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
82 bra GetStat
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
83 nop
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
84 lbra SetStat
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
85 IFEQ CO80
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
86 lbra Term
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
87 ELSE
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
88 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
89 ENDC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
90
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
91 Init
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
92 IFEQ CO80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
93 pshs dp,cc save DP and CC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
94 orcc #IntMasks mask interrupts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
95 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
96 tfr a,dp set DP to 0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
97 stu <D.KbdSta save off statics ptr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
98 nop
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
99 nop
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
100 nop
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
101 nop
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
102 leax >IRQSVC,pcr point to IRQ routine
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
103 stx <D.AltIRQ save as alternate IRQ
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
104 ldx #PIA0Base get base address of PIA0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
105 stx <V.PIA,u save off in statics
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
106 clrb now D = 0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
107 std <$27,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
108 std <$29,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
109 std <$2B,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
110 std <$2D,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
111 * Initialize PIA here
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
112 sta $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
113 sta ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
114 sta $03,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
115 comb B = $FF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
116 stb $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
117 stb <$20,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
118 stb <$21,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
119 stb <$22,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
120 lda #$34
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
121 sta $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
122 lda #$3F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
123 sta $03,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
124 lda $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
125 ENDC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
126 * Initialize WordPak Hardware
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
127 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
128 leax <WPIV,pcr point to initialization values
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
129 L0097 ldb ,x+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
130 std [<V.PORT,u] write to WP hardware
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
131 inca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
132 cmpa #$14
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
133 bcs L0097
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
134 IFEQ CO80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
135 ldb ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
136 stb <$31,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
137 ldx V.PORT,u get port address
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
138 lda #64
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
139 sta $04,x ???
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
140 lbsr ClrScr clear screen
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
141 lda <L0034,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
142 sta <$3A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
143 puls pc,dp,cc
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
144 ELSE
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
145 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
146 ENDC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
147
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
148
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
149 GetStat
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
150 IFEQ CO80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
151 cmpa #SS.Ready
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
152 bne L00C9
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
153 lda <$2E,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
154 suba <$2D,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
155 lbne L0181
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
156 ldb #E$NotRdy
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
157 bra L00F5
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
158 L00C9 cmpa #SS.EOF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
159 lbeq L0181
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
160 ldx R$Y,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
161 cmpa #SS.Joy
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
162 lbeq SSJOY
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
163 cmpa #SS.Cursr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
164 beq CURSR
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
165 cmpa #SS.ScSiz
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
166 beq SCSIZ
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
167 cmpa #$83
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
168 beq L00F8
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
169 cmpa #$84
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
170 beq L0106
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
171 cmpa #$86
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
172 beq L0117
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
173 cmpa #$87
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
174 beq L0101
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
175 cmpa #$88
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
176 beq L00FC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
177 ENDC
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
178 SetStat ldb #E$UnkSvc
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
179 L00F5 orcc #Carry
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
180 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
181 L00F8 lda #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
182 bra L0102
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
183 L00FC lda <$31,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
184 bra L0102
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
185 L0101 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
186 L0102 sta $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
187 bra L0127
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
188
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
189 L0106 ldd #80*256+24
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
190 bra L0125
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
191
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
192 SCSIZ ldd #SIZEX
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
193 std R$X,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
194 ldd #SIZEY
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
195 std R$Y,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
196 bra L0127
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
197
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
198 L0117 ldb <$3A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
199 bsr L0129
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
200 andb #$0F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
201 bne L0124
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
202 ldb #$01
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
203 bra L0125
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
204 L0124 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
205 L0125 std R$A,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
206 L0127 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
207 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
208 L0129 pshs x,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
209 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
210 leax >L083C,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
211 andb #$60
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
212 L0132 cmpb ,x+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
213 beq L013B
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
214 inca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
215 cmpa #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
216 bcs L0132
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
217 L013B puls x,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
218 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
219
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
220 CURSR clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
221 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
222 ldd <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
223 L0144 cmpd <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
224 beq L0151
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
225 subd #SIZEX
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
226 inc ,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
227 bra L0144
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
228 L0151 puls b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
229 addb #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
230 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
231 std $06,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
232 ldd <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
233 subd <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
234 addb #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
235 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
236 std $04,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
237 lbsr L05C2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
238 anda #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
239 sta $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
240 ldx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
241 lbra L056A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
242
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
243 IFEQ CO80
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
244 Term pshs cc
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
245 orcc #IRQMask
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
246 ldd >D.Clock get original clock pointer
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
247 std >D.AltIRQ save as alternate IRQ
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
248 puls pc,cc
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
249
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
250 L017C incb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
251 cmpb #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
252 bls L0182
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
253 L0181 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
254 L0182 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
255
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
256 * Interrupt Service Routine
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
257 IRQSVC ldu >D.KbdSta get IRQ static ptr in U
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
258 ldx <V.PIA,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
259 lda $03,x get IRQ status bit
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
260 bmi L0191 branch if set
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
261 jmp [>D.AltIRQ] else continue on
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
262 L0191 lda $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
263 lda #$FF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
264 sta $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
265 lda ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
266 coma
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
267 anda #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
268 bne L01A7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
269 clr $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
270 lda ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
271 coma
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
272 anda #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
273 bne L01C8
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
274 L01A7 ldd #$FFFF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
275 std <$20,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
276 std <$22,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
277 L01B0 ldd #$1E05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
278 std <$2F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
279 L01B6 lda >$00A0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
280 beq L01C4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
281 deca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
282 sta >$00A0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
283 bne L01C4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
284 sta >$FF40
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
285 L01C4 jmp [>D.Clock]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
286 L01C8 bsr L0217
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
287 bpl L01D0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
288 bcs L01B6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
289 bra L01B0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
290 L01D0 cmpa #$1F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
291 bne L01D9
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
292 com <$27,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
293 bra L01B6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
294 L01D9 ldb <$2D,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
295 leax <$3B,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
296 abx
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
297 bsr L017C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
298 cmpb <$2E,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
299 beq L01EA
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
300 stb <$2D,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
301 L01EA sta ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
302 beq L020A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
303 cmpa V.PCHR,u pause character?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
304 bne L01FA
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
305 ldx V.DEV2,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
306 beq L020A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
307 sta $08,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
308 bra L020A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
309 L01FA ldb #S$Intrpt
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
310 cmpa V.INTR,u interrupt character?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
311 beq L0206
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
312 ldb #S$Abort
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
313 cmpa V.QUIT,u quit character?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
314 bne L020A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
315 L0206 lda V.LPRC,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
316 bra L020E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
317 L020A ldb #S$Wake
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
318 lda V.WAKE,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
319 L020E beq L0213
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
320 os9 F$Send
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
321 L0213 clr V.WAKE,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
322 bra L01B6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
323 L0217 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
324 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
325 sta <$1F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
326 std <$28,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
327 coma
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
328 sta <$24,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
329 sta <$25,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
330 sta <$26,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
331 deca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
332 sta $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
333 L022C lda ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
334 coma
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
335 anda #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
336 beq L023F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
337 ldb #$FF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
338 L0235 incb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
339 lsra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
340 bcc L023B
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
341 bsr L0286
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
342 L023B cmpb #$06
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
343 bcs L0235
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
344 L023F inc <$1F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
345 orcc #Carry
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
346 rol $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
347 bcs L022C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
348 bsr L02C1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
349 bmi L0285
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
350 beq L0268
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
351 suba #$1A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
352 bhi L0268
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
353 adda #$1A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
354 ldb <$29,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
355 bne L0267
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
356 adda #$40
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
357 ldb <$28,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
358 eorb <$27,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
359 andb #$01
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
360 bne L0267
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
361 adda #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
362 L0267 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
363 L0268 ldb #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
364 mul
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
365 lda <$28,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
366 beq L0273
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
367 incb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
368 bra L027A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
369 L0273 lda <$29,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
370 beq L027A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
371 addb #$02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
372 L027A pshs x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
373 leax >L0344,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
374 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
375 lda d,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
376 puls x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
377 L0285 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
378
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
379 L0286 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
380 lslb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
381 lslb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
382 lslb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
383 addb <$1F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
384 cmpb #$31
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
385 bne L0297
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
386 inc <$29,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
387 puls pc,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
388 L0297 cmpb #$37
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
389 bne L02A0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
390 com <$28,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
391 puls pc,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
392 L02A0 pshs x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
393 leax <$24,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
394 bsr L02AB
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
395 puls x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
396 puls pc,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
397 L02AB pshs a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
398 lda ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
399 bpl L02B5
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
400 stb ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
401 puls pc,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
402 L02B5 lda $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
403 bpl L02BD
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
404 stb $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
405 puls pc,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
406 L02BD stb $02,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
407 puls pc,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
408 L02C1 pshs y,x,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
409 leax <$20,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
410 ldb #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
411 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
412 L02CA leay <$24,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
413 ldb #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
414 lda ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
415 bmi L0322
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
416 L02D3 cmpa ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
417 bne L0319
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
418 tst <$23,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
419 bpl L02EB
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
420 sta <$23,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
421 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
422 ldd #$1E05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
423 std <$2F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
424 puls b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
425 bra L0301
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
426 L02EB cmpa <$23,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
427 beq L02F9
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
428 sta <$23,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
429 ldd #$1E05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
430 std <$2F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
431 L02F9 tst <$2F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
432 beq L0307
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
433 dec <$2F,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
434 L0301 clr ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
435 com ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
436 bra L0322
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
437 L0307 dec <$30,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
438 beq L0312
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
439 orcc #Negative+Carry
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
440 L030E leas $01,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
441 puls pc,y,x,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
442 L0312 ldb #$05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
443 stb <$30,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
444 bra L030E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
445 L0319 leay $01,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
446 decb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
447 bne L02D3
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
448 lda #$FF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
449 sta ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
450 L0322 leax $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
451 dec ,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
452 bne L02CA
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
453 leas $01,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
454 leax <$24,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
455 lda #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
456 L032F ldb ,x+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
457 bpl L033A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
458 deca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
459 bne L032F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
460 orcc #Negative
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
461 puls pc,y,x,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
462 L033A leax <$20,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
463 lbsr L02AB
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
464 tfr b,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
465 puls pc,y,x,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
466 ENDC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
467
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
468 L0344 fdb $4060,$000c,$1c13,$0a1a,$1208,$1810
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
469 fdb $0919,$1120,$2020,$3030,$1f31,$217c,$3222,$0033
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
470 fdb $237e,$3424,$0035,$2500,$3626,$0037,$275e,$3828
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
471 fdb $5b39,$295d,$3a2a,$003b,$2b00,$2c3c,$7b2d,$3d5f
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
472 fdb $2e3e,$7d2f,$3f5c,$0d0d,$0d00,$0000,$0503
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
473 fcb $1b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
474
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
475 IFEQ CO80
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
476 Read leax <$3B,u
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
477 ldb <$2E,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
478 orcc #IntMasks
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
479 cmpb <$2D,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
480 beq L03A8
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
481 abx
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
482 lda ,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
483 lbsr L017C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
484 stb <$2E,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
485 andcc #^(IntMasks+Carry)
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
486 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
487 L03A8 lda V.BUSY,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
488 sta V.WAKE,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
489 andcc #^IntMasks
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
490 ldx #$0000
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
491 os9 F$Sleep
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
492 clr V.WAKE,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
493 ldx >D.Proc
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
494 ldb <$36,x
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
495 beq Read
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
496 cmpb #$03
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
497 L03C0 bhi Read
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
498 coma
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
499 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
500 ENDC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
501
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
502 SSJOY pshs u,y,cc
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
503 orcc #IntMasks
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
504 ldu <V.PIA,u get PIA address
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
505 lda #$FF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
506 sta $02,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
507 ldb ,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
508 L03D1 ldy $04,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
509 beq L03DC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
510 andb #$02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
511 beq L03E1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
512 bra L03E0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
513 L03DC andb #$01
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
514 beq L03E1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
515 L03E0 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
516 L03E1 sta $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
517 lda $03,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
518 ora #$08
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
519 ldy $04,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
520 bne L03EE
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
521 anda #$F7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
522 L03EE sta >$FF03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
523 lda $01,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
524 anda #$F7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
525 bsr L040B
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
526 std $04,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
527 lda $01,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
528 ora #$08
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
529 bsr L040B
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
530 pshs b,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
531 ldd #$003F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
532 subd ,s++
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
533 std $06,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
534 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
535 puls pc,u,y,cc
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
536
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
537 L040B sta $01,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
538 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
539 bsr L041A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
540 bsr L041A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
541 bsr L041A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
542 bsr L041A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
543 lsrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
544 lsrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
545 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
546 rts
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
547
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
548 L041A pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
549 lda #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
550 tfr a,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
551 L0420 lsrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
552 cmpb #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
553 bhi L042C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
554 lsra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
555 lsra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
556 tfr a,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
557 addb ,s+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
558 rts
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
559
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
560 L042C addb #$02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
561 andb #$FC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
562 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
563 sta >PIA1Base
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
564 tst ,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
565 bpl L043D
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
566 adda ,s+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
567 bra L0420
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
568 L043D suba ,s+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
569 bra L0420
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
570
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
571 L0441 fcb $02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
572 fdb ClrScr-* $0276
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
573 fcb $05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
574 fdb Do05-* $0258
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
575 fcb $06
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
576 fdb Do06-* $03b3
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
577 fcb $09
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
578 fdb Do09-* $0222
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
579 fcb $0b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
580 fdb Do0B-* $0209
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
581 fcb $0F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
582 fdb Do0F-* $01fe
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
583 fcb $13
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
584 fdb Do13-* $0283
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
585 fcb $14
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
586 fdb Do14-* $0339
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
587 fcb $19
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
588 fdb Do19-* $023f
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
589 fcb $1b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
590 fdb DoESC-* $0095
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
591 fcb $80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
592
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
593 L0460 fcb $01
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
594 fdb DoH01-* $01ee
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
595 fcb $02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
596 fdb DoH02-* $032c
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
597 fcb $03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
598 fdb DoH03-* $0232
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
599 fcb $04
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
600 fdb DoH04-* $0233
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
601 fcb $05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
602 fdb DoH05-* $008c
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
603 fcb $06
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
604 fdb DoH06-* $01fd
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
605 fcb $09
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
606 fdb DoH09-* $01e4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
607 fcb $0b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
608 fdb DoH0B-* $0261
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
609 fcb $0c
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
610 fdb ClrScr-* $023f
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
611 fcb $1b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
612 fdb DoESC-* $0076
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
613 fcb $80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
614
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
615 L047F fcb $41
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
616 fdb Do41-* $021d
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
617 fcb $42
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
618 fdb Do42-* $0254
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
619 fcb $45
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
620 fdb Do45-* $02c2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
621 fcb $46
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
622 fdb Do46-* $02e5
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
623 fcb $47
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
624 fdb Do47-* $0287
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
625 fcb $48
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
626 fdb Do48-* $0264
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
627 fcb $53
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
628 fdb Do53-* $0058
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
629 fcb $56
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
630 fdb Do56-* $037f
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
631 fcb $58
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
632 fdb Do58-* $0056
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
633 fcb $57
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
634 fdb Do57-* $004b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
635 fcb $76
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
636 fdb Do76-* $037d
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
637 fcb $80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
638
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
639 Write
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
640 IFEQ CO80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
641 fcb $6D,$C8,$2C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
642 lbne L079C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
643 ldx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
644 tst <$2A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
645 bne L04FD
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
646 ENDC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
647 cmpa #C$SPAC space?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
648 lbcc L053A branch if >=
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
649 cmpa #C$CR carriage return?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
650 lbeq L0557 branch if equal
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
651 cmpa #C$LF line feed?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
652 lbeq L055C branch if equal
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
653 cmpa #C$BSP backspace?
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
654 lbeq L056A branch if equal
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
655 tst V.TYPE,u look at type
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
656 bmi L04D2 branch if hi-bit set
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
657 leay >L0441,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
658 bra L04D6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
659 L04D2 leay >L0460,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
660 L04D6 cmpa ,y+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
661 beq L04E2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
662 leay $02,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
663 tst ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
664 bpl L04D6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
665 bra L0555
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
666 L04E2 ldd ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
667 jmp d,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
668
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
669 Do57 lda #$57
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
670 bra L04F4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
671
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
672 Do53 lda #$53
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
673 bra L04F4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
674
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
675 Do58 lda #$58
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
676 bra L04F4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
677
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
678 DoESC lda #$1B
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
679 L04F4 sta <$2A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
680 L04F7 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
681 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
682
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
683 DoH05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
684 Do01 lda #$05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
685 bra L04F4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
686
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
687 L04FD ldb <$2A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
688 clr <$2A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
689 tst V.TYPE,u get type byte
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
690 bmi L0513 branch if hi-bit set
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
691 cmpb #$2E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
692 lbeq L0807
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
693 cmpa #$2E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
694 beq L04F4
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
695 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
696 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
697
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
698 L0513 cmpb #$05
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
699 beq L04F7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
700 cmpb #$57
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
701 lbeq L0822
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
702 cmpb #$53
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
703 lbeq L07F2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
704 cmpb #$58
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
705 bne L0534
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
706 suba #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
707 ble L0555
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
708 cmpa #$10
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
709 bhi L0555
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
710 sta <$31,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
711 bra L0555
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
712 L0534 leay >L047F,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
713 bra L04D6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
714 L053A bsr L05A1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
715 leax $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
716 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
717 bsr L058C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
718 ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
719 leax <$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
720 cmpx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
721 bhi L0555
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
722 L054E stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
723 bsr L05CD
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
724 L0553 bsr L0587
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
725 L0555 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
726 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
727
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
728 L0557 ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
729 bra L0582
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
730 L055C leax <$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
731 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
732 ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
733 leax <$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
734 bra L054E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
735 L056A cmpx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
736 bhi L0580
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
737 ldy <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
738 cmpy <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
739 beq L0555
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
740 leay <-$50,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
741 sty <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
742 L0580 leax -$01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
743 L0582 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
744 bra L0553
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
745 L0587 ldx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
746 L058A bsr L0591
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
747 L058C lda #$0E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
748 bsr L0593
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
749 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
750 L0591 lda #$12
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
751 L0593 pshs x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
752 ldb ,s+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
753 std [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
754 inca increment A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
755 ldb ,s+
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
756 std [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
757 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
758 L05A1 tst <$2B,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
759 beq L05AA
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
760 ora #$80
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
761 bra L05AC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
762 L05AA anda #$7F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
763 L05AC bsr L05B7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
764 pshs x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
765 ldx $01,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
766 sta $03,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
767 puls x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
768 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
769 L05B7 ldb #$1F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
770 stb [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
771 L05BC tst [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
772 bpl L05BC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
773 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
774 L05C2 bsr L05B7
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
775 pshs x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
776 ldx $01,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
777 lda $03,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
778 puls x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
779 L05CC rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
780 L05CD ldd <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
781 subd <$32,u
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
782 cmpd #SIZEX*SIZEY
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
783 bmi L05CC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
784 lbsr L06AE
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
785 ldx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
786 leax <$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
787 cmpx #$5000
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
788 bmi L05F3
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
789 ldx #SIZEX*SIZEY-SIZEX
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
790 stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
791 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
792 ldx #$0000
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
793 L05F3 stx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
794 ldy $01,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
795 leay $04,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
796 ldb <$31,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
797 cmpb #$10
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
798 beq L062A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
799 negb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
800 andb #$0F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
801 lda #$C0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
802 L0607 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
803 pshs b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
804 ldb #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
805 inca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
806 cmpa #$CA
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
807 beq L0628
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
808 L0612 bitb [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
809 bne L0612
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
810 L0617 bitb [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
811 beq L0617
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
812 sta ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
813 dec ,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
814 bne L0612
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
815 puls b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
816 puls b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
817 bra L0607
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
818 L0628 leas $02,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
819 L062A tfr x,d
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
820 tfr a,b
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
821 lda #$0C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
822 pshs b,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
823 tfr x,d
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
824 lda #$0D
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
825 pshs b,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
826 ldb #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
827 L063A bitb [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
828 beq L063A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
829 puls x,b,a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
830 stx [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
831 std [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
832 lda #$40
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
833 sta ,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
834 lbsr L0587
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
835 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
836
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
837
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
838 DoH01
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
839 Do0F ldx <$32,u
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
840 stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
841 bra L0693
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
842
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
843 DoH09
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
844 Do0B ldx <$34,u
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
845 cmpx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
846 bls L0696
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
847 leax <-$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
848 stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
849 ldx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
850 leax <-$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
851 bra L0693
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
852
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
853 DoH06
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
854 Do09 ldd <$34,u
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
855 addd #SIZEX-1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
856 cmpd <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
857 bhi L068E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
858 ldx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
859 leax >SIZEX*SIZEY-SIZEX,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
860 cmpx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
861 beq L0696
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
862 ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
863 leax <$50,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
864 stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
865 L068E ldx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
866 leax $01,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
867 L0693 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
868 L0696 lbra L0553
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
869
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
870 DoH03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
871 Do19
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
872 bsr L06AE
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
873 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
874 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
875
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
876 Do41
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
877 DoH04
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
878 Do05 bsr L06A1
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
879 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
880 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
881 L06A1 ldd <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
882 addd #SIZEX
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
883 subd <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
884 tfr d,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
885 bra L06B5
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
886 L06AE ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
887 ldy #SIZEX
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
888 L06B5 lbra L0768
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
889 Do02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
890 ClrScr ldx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
891 ldy #2048
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
892 bsr L06E6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
893 ldx #$0000
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
894 stx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
895 stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
896 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
897 lda #$0C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
898 lbsr L0593
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
899 lbsr L058A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
900 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
901 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
902
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
903 Do42
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
904 DoH0B
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
905 Do13
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
906 ldd <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
907 addd #2048
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
908 subd <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
909 tfr d,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
910 bsr L06E6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
911 bra L0696
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
912 L06E6 lbsr L0591
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
913 L06E9 lda #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
914 L06EB lbsr L05A1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
915 leay -$01,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
916 bne L06EB
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
917 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
918
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
919 Do48 ldx <$34,u
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
920 tfr x,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
921 leax <$4F,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
922 pshs x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
923 L06FD leax $08,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
924 bsr L0733
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
925 cmpx ,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
926 bcc L0709
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
927 leay $01,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
928 bra L06FD
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
929 L0709 leas $02,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
930 ldy #$0008
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
931 bsr L06E9
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
932 bra L0696
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
933
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
934 Do47 ldy <$34,u
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
935 leay <$4F,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
936 L071A leax -$08,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
937 bsr L0733
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
938 cmpx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
939 bls L0727
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
940 leay -$01,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
941 bra L071A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
942 L0727 ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
943 ldy #$0008
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
944 bsr L06E6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
945 lbra L0553
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
946 L0733 lbsr L0591
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
947 lbsr L05C2
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
948 pshs a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
949 exg x,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
950 lbsr L0591
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
951 puls a
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
952 lbsr L05AC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
953 exg x,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
954 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
955
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
956 Do45 ldy <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
957 leay >$077F,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
958 L0750 leax <-$50,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
959 bsr L0733
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
960 cmpx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
961 bls L075E
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
962 leay -$01,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
963 bra L0750
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
964 L075E ldx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
965 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
966 L0764 ldy #SIZEX
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
967 L0768 lbsr L06E6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
968 lbra L0553
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
969
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
970 Do46 ldy <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
971 leay >SIZEX*SIZEY-SIZEX,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
972 pshs y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
973 ldy <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
974 L077C leax <$50,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
975 bsr L0733
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
976 cmpy ,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
977 bcc L078A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
978 leay $01,y
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
979 bra L077C
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
980 L078A leas $02,s
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
981 tfr y,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
982 bra L0764
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
983
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
984 DoH02
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
985 Do14
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
986 ldb #$58
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
987 tst V.TYPE,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
988 bmi L0797
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
989 incb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
990 L0797 stb <$2C,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
991 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
992 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
993
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
994 L079C suba #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
995 ldb <$2C,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
996 tst V.TYPE,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
997 bpl L07B1
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
998 cmpb #$58
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
999 bne L07AD
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1000 bsr L07C6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1001 bra L07F0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1002 L07AD bsr L07B9
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1003 bra L07D5
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1004 L07B1 cmpb #$59
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1005 bne L07D3
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1006 bsr L07B9
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1007 bra L07F0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1008 L07B9 cmpa #$17
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1009 bls L07BF
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1010 lda #$17
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1011 L07BF sta <$38,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1012 dec <$2C,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1013 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1014 L07C6 cmpa #$4F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1015 bls L07CC
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1016 lda #$4F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1017 L07CC sta <$39,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1018 inc <$2C,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1019 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1020 L07D3 bsr L07C6
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1021 L07D5 lda <$38,u
1741
94aaf037f7ba Added for CO51
boisy
parents: 1739
diff changeset
1022 ldb #SIZEX
1739
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1023 mul
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1024 ldx <$32,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1025 leax d,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1026 stx <$34,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1027 ldb <$39,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1028 abx
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1029 stx <$36,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1030 lbsr L0587
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1031 clr <$2C,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1032 L07F0 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1033 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1034 L07F2 suba #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1035 beq L0802
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1036 deca
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1037 beq L0801
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1038 bra L0805
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1039
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1040 Do06 clra
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1041 tst <$2B,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1042 bne L0802
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1043 L0801 coma
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1044 L0802 sta <$2B,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1045 L0805 clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1046 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1047
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1048 L0807 suba #$30
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1049 cmpa #$04
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1050 bhi L083A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1051 leax <L083F,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1052 ldb a,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1053 bra L0832
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1054
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1055 Do56 ldb #$F0
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1056 andb <$3A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1057 bra L0832
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1058
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1059 Do76 ldb #$08
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1060 orb <$3A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1061 bra L0832
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1062 L0822 suba #$20
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1063 cmpa #$03
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1064 bhi L083A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1065 leax <L083C,pcr
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1066 ldb <$3A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1067 andb #$9F
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1068 orb a,x
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1069 L0832 stb <$3A,u
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1070 lda #$0A
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1071 std [<V.PORT,u]
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1072 L083A clrb
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1073 rts
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1074
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1075 L083C neg <$60
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1076 nega
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1077 L083F fcb $20,$60,$00,$68,$08
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1078
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1079 emod
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1080 eom equ *
fc04a0042413 Driver provided by Roy Justus
boisy
parents:
diff changeset
1081 end