annotate level2/modules/cc3io.asm @ 556:28a203bbd2cc

findstr and signal finished.
author roug
date Tue, 22 Oct 2002 19:09:04 +0000
parents c3d73ed26b28
children c00354059d1c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * CC3IO - CoCo 3 I/O driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * ------------------------------------------------------------------
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * 16 Original OS-9 L2 Tandy distribution
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 * 26c Added support for obtaining monitor type from BGP 98/10/12
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 * the init module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 * 26d Added support for obtaining key repeat info BGP 98/10/23
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 * from the init module
350
2c13557a04d6 Added code to read mouse info from init
boisy
parents: 0
diff changeset
13 * 26e Added support for obtaining mouse info BGP 02/07/24
2c13557a04d6 Added code to read mouse info from init
boisy
parents: 0
diff changeset
14 * from the init module
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 nam CC3IO
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 ttl CoCo 3 I/O driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 * Disassembled 98/09/09 08:29:24 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 tylg set Drivr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 atrv set ReEnt+rev
350
2c13557a04d6 Added code to read mouse info from init
boisy
parents: 0
diff changeset
27 rev set 5
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28 edition set 26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0000 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 u0001 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 u0002 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 u0003 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 u0004 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 u0005 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 u0006 rmb 3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 u0009 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 u000B rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 u000C rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 u000D rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 u000E rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44 u0010 rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u0016 rmb 5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 u001B rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47 u001D rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 u001E rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 u001F rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 u0020 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 u0022 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 u0023 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 u0024 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 u0025 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 u0026 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 u0027 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 u0028 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 u0029 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 u002A rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 u002B rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 u002C rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 u002D rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 u002F rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 u0030 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 u0031 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 u0033 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 u0034 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 u0035 rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 u003B rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 u003C rmb 8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 u0044 rmb 4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72 u0048 rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73 u004A rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 u0050 rmb 6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 u0056 rmb 10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 u0060 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 u0061 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 u0062 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 u0063 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80 u0064 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 u0065 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 u0066 rmb 1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 u0067 rmb 25
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 u0080 rmb 24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 u0098 rmb 13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 u00A5 rmb 13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 u00B2 rmb 13
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 u00BF rmb 7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 u00C6 rmb 26
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 KeyEnt rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 KeyStat rmb 8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92 JoyEnt rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 JoyStat rmb 8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 SndEnt rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 SndStat rmb 2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 u00F8 rmb 8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 fcb $07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 name fcs /CC3IO/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 start lbra Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 Term ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 cmpu <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 bne L0056
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 lbsr L0495
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 cmpu <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 bne L0056
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 pshs u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 ldx #$10EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 bsr TermSub
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 ldx #$10F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 bsr TermSub
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 ldx #$10E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 bsr TermSub
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 puls u,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 orcc #IRQMask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 std <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 ldx <D.Clock
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 stx <D.AltIRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 puls cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 L0056 ldb #$0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 lbra L0590
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 * Call terminate routine in subroutine module (KeyDrv/JoyDrv/SndDrv)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 * X = addr in statics of entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 TermSub leau 2,x point U to static area for sub module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 ldx ,x get entry pointer at ,X
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138 jmp $03,x call term routine in sub module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140 Init ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 ldd <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 lbne L00EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 leax >CC3Irq,pcr Set up AltIRQ vector in DP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 stx <D.AltIRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 leax >L0495,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 leax >L054C,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 std >G.MsInit,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 std >G.WindBk,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 stu <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 lbsr L054C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 sta G.CurTik,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 inc <G.Mouse+Pt.Valid,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 ldd #$0178 right mouse/time out value
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 std <G.Mouse+Pt.Actv,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 ldd #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 std <G.LKeyCd,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 std <G.2Key2,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 ldd <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 * Added to allow patching for RGB/CMP/Mono and Key info - BGP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 * Uses new init module format to get monitor type and key info
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 ldy <D.Init get init module ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 lda MonType,y get monitor type byte
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 sta <G.MonTyp,x save off
350
2c13557a04d6 Added code to read mouse info from init
boisy
parents: 0
diff changeset
174 ldd MouseInf,y get mouse information
2c13557a04d6 Added code to read mouse info from init
boisy
parents: 0
diff changeset
175 sta <G.Mouse+Pt.Res,x save off hi-res/lo-res flag
2c13557a04d6 Added code to read mouse info from init
boisy
parents: 0
diff changeset
176 stb <G.Mouse+Pt.Actv,x save off left/right
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 ldd KeyRptS,y get key repeat start/delay constant
387
c3d73ed26b28 Initialized another global with key repeat
boisy
parents: 372
diff changeset
178 sta <G.KyRept,x set first delay
c3d73ed26b28 Initialized another global with key repeat
boisy
parents: 372
diff changeset
179 std <G.KyDly,x set initial and 2ndary constants
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 ldd <D.SysPrc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 std <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 leax >KeyDrv,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 bsr LinkSys
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 sty >KeyEnt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 leau >KeyStat,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 jsr ,y call init routine of sub module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 leax >JoyDrv,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 bsr LinkSys
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 sty >JoyEnt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 leau >JoyStat,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 jsr ,y call init routine of sub module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 leax >SndDrv,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194 bsr LinkSys
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 sty >SndEnt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 leau >SndStat,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197 jsr ,y call init routine of sub module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 puls u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 std <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 L00EF ldd #$0078
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 std <u0028,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 ldd <IT.PAR,y get parity/baud bytes from dev desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 std <u001F,u save it off in our static
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 lbra L08AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 KeyDrv fcs /KeyDrv/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 JoyDrv fcs /JoyDrv/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 SndDrv fcs /SndDrv/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 LinkSys lda #Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 os9 F$Link
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 Read lda <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 lbne L0667
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 leax >u0080,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 ldb <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 orcc #IRQMask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 cmpb <u0033,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 beq L0138
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 abx
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 bsr L0159
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 stb <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 andcc #^(IRQMask!Carry)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 L0138 lda V.BUSY,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 sta V.WAKE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 andcc #^IRQMask
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 os9 F$Sleep
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 clr V.WAKE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 ldb <P$Signal,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 beq Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 lda P$State,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 bita #Condem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 bne L0157
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 cmpb #S$Window
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 bcc Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 L0157 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 L0159 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 cmpb #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 bls L015F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 L015F rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 L0160 fdb $0801,$027f,$f8ff,$0000,$0801,$00bf,$f8ff,$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 L0170 cmpd ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 blt L017B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 ldd ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256 bpl L017D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 L017B std ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 L017D rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 L017E ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 ldb <u0063,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 beq L01E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 lda <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 bita #$78
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 beq L01DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 clr $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 sta <u0067,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 ldb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 leax >L0160,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 leay <u0056,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 L01A2 bita <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 beq L01C5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 tst <u0030,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 beq L01B1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 bra L01BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 L01B1 tst <u0031,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 beq L01BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 addb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 ldd b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 bra L01C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 L01BC ldb b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 sex
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 addd ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 L01C1 std ,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 ldd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 L01C5 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 cmpb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 bne L01CD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 leay -$02,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 L01CD std ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 bpl L01A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 ldd #$027F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 bsr L0170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 leay $02,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 ldd #$00BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 bsr L0170
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 L01DF lda <u0065,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 bne L0223
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L01E6 tst <u0064,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 beq L0225
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 clr <u0064,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 cmpa #$81
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 bne L01FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 ldb <u0035,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 bne L0223
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 ldx <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 com <$21,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 bra L0223
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 L01FF cmpa #$82
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 bne L0208
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 lbsr L0485
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 bra L0223
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 L0208 cmpa #$83
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 bne L0211
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 lbsr L0495
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 bra L0223
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 L0211 cmpa #$84
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 bne L0225
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 ldb <u0035,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 bne L0223
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 com <u0063,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 ldx <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 com <$2A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 L0223 clr $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336 L0225 ldb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 puls pc,u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 L0229 pshs x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 leax <u003C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 tst $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 lbeq L02C8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 leas -$05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 tst <u0063,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 bne L024E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 ldb #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 lda $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 anda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 beq L0248
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 L0248 andb $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 beq L024E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 L024E clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 rola
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 std $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 bne L0276
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 lda $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 beq L02C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 bsr L02CA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 beq L0262
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 bsr L02D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 beq L02AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 L0262 dec $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 bne L02AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 sta >u00C6,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 std $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 std $0A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 std $0C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 std $0E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 bra L02C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 L0276 lda $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 sta $05,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 bsr L02CA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 beq L02AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 bsr L02D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 inc >$008A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 ldd <$18,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 std <$12,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 ldd <$1A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 std <$14,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 ldu <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 lda <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 beq L02A9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 ldb <u0027,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 bcs L02A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 clr <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 L02A5 clr >$008A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 L02A9 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 L02AB ldd $0C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 cmpa #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 beq L02B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 L02B2 cmpb #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 beq L02B7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 L02B7 std $0C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 ldd $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 cmpd #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408 beq L02C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 addd #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 L02C4 std $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 L02C6 leas $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412 L02C8 puls pc,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 L02CA ldd $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 eora $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 eorb $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 std $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 L02D3 ldd $0C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 tst $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 beq L02E9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 sta $0E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 lda $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 bne L02E8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 lda $0A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 cmpa #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 beq L02E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 L02E6 sta $0A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 L02E8 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 L02E9 tst $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 beq L02FD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 stb $0F,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 ldb $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 bne L02FC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 ldb $0B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 cmpb #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 beq L02FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 L02FA stb $0B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 L02FC clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 L02FD std $0C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 ldd $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 std $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 ldd $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 L0305 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 CC3Irq ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 ldy <G.CurDev,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 lbeq L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 lda <G.TnCnt,u get tone counter
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 beq L0319 branch if zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453 deca else decrement
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 sta <G.TnCnt,u and save back
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 L0319 leax <L0305,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 stx <D.AltIRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 andcc #^(IntMasks)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 ldb <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 beq L0337
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 lda $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 bpl L032F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 lda G.GfBusy,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 ora G.WIBusy,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 bne L034F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 L032F lda #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 lbsr L05DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 clr <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 L0337 ldb G.CntTik,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 beq L034F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 stb G.CntTik,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 bne L034F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 lda G.GfBusy,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 ora G.WIBusy,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 beq L034A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 inc G.CntTik,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 bra L034F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 L034A lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 lbsr L05DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 L034F lda <G.KyMse,u keyboard mouse?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 bne L0369 branch if so
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 lda <G.MSmpRt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 beq L0369
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 bne L0366
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 lbsr L0739
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 puls u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 lda <G.MSmpRV,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 L0366 sta <G.MSmpRt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 L0369 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 std <G.KySns,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 tst <G.KyMse,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 beq L0381
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 ldx >$10E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 leau >$00E2,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 jsr $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 sta <G.KyButt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 L0381 ldx >$10EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 leau >$00EC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 jsr $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 lda #$82
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 cmpb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 beq L0397
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 cmpb #$C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 bne L039C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 L0397 inc <G.Clear,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 bra L03C8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 L039C tst $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 bpl L03A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 bitb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 beq L03A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 bra L03C8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 L03A8 lda <G.KyButt,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 lbsr L0229
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 lbne L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 ldx >$10E0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 leau >$00E2,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 jsr $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 puls u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 bpl L03C8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 clr <G.LastCh,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 lbra L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 L03C8 cmpa <G.LastCh,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 bne L03DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 ldb <G.KyRept,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 beq L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 beq L03DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 L03D5 stb <G.KyRept,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 bra L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 L03DA ldb <u0062,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 bra L03ED
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 L03DF sta <u0027,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 ldb <u0061,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 tst <u0035,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544 bne L03D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 ldb <u0061,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 L03ED stb <u0029,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 lbsr L017E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 beq L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 stb >u00BF,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 ldu <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 ldb <u0033,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 leax >u0080,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 abx
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 lbsr L0159
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 cmpb <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557 beq L0411
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 stb <u0033,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 L0411 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 beq L0431
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561 cmpa u000D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 bne L0421
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 ldx u0009,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 beq L0443
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 sta $08,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566 bra L0443
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 L0421 ldb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 cmpa u000B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 beq L042D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 cmpa u000C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 bne L0431
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573 L042D lda u0003,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 bra L0447
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 L0431 lda <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 beq L0443
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 ldb <u0025,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579 bcs L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 clr <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 bra L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 L0443 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
583 lda u0005,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584 L0447 beq L044E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
585 clr u0005,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 L044E ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 lda <G.AutoMs,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 beq L046B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 lda <G.MseMv,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 ora <G.Mouse+Pt.CBSA,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 beq L046B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593 lda G.GfBusy,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 ora G.WIBusy,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 bne L046B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597 lbsr L05DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
598 clr <G.MseMv,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
599 L046B orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 leax >CC3Irq,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
601 stx <D.AltIRQ
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
603
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
604 L0474 stb $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
605 ldx <u0024
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
606 lda $0D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
607 ldb #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
608 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 ldy <u0080
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610 leax d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
611 stx $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
612 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 L0485 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
614 leas <-$11,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
615 ldb #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
616 bsr L0474
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
617 stx $09,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 sty $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619 bra L04A7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 L0495 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621 leas <-$11,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 ldb #$F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
623 bsr L0474
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 leay -$09,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 sty $09,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 leax -$09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 stx $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 L04A7 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 ldu <$20,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
630 lbeq L0546
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 ldx u0001,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 stx $0B,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633 stx $0F,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
634 ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 std $0D,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 L04BA ldx $0F,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 L04BC ldb $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638 leax b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 cmpx $09,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 bne L04C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 ldx $07,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 L04C6 stx $0F,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 ldd ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 cmpd $0D,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
645 bne L04BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
646 ldu $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 beq L04BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 cmpx $0B,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 beq L0541
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
650 lda <u001E,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
651 beq L04BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
652 ldx <u0016,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
653 beq L0536
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
654 lda u0003,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
655 beq L0536
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
656 ldy <u0048
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
657 lda a,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
658 beq L0536
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
659 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
660 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
661 lda >$00AC,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 leay <$30,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
663 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
665 L04FA ldb #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
666 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
667 L04FE decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
668 cmpa b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
669 beq L050F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
671 bne L04FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
672 ldx <$3D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
673 bne L04FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
674 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
675 bra L0536
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
676 L050F puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
677 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
678 L0513 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
679 cmpa #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
680 bhi L051F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
681 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
682 lda b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
683 bra L0522
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
684 L051F lda a,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
685 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
686 L0522 cmpa ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
687 beq L0536
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
688 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
689 bmi L052D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
690 lda b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
691 bra L0522
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
692 L052D lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
693 ldx <$3D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
694 bne L0513
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
695 bra L04BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
696 L0536 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
697 stu <$20,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
698 clr $0A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
699 clr >$00BF,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
700 L0541 inc <u0023,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
701 bsr L054C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
702 L0546 leas <$11,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
703 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
704 puls pc,u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
705 L054C pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
706 ldd <u0028,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
707 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
708 sta <$3B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
709 sta <$60,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
710 stb <$3E,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
711 ldd <u002A,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
712 sta <$63,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
713 stb <$66,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
714 lda u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
715 sta $0B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
716 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
717 puls pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
718
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
719 Write ldb <u002C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
720 lbne L0600
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
721 sta <u001F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
722 cmpa #C$SPAC space or higher?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
723 bcc L058E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
724 cmpa #$1E $1E escape code?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
725 bcc L05EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
726 cmpa #$1B $1B escape code?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
727 beq L05F3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
728 cmpa #$05 $05 escape code?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
729 beq L05F3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
730 cmpa #C$BELL Bell?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
731 bne L058E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
732 jmp [>WGlobal+G.BelVec]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
733
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
734 L058E ldb #$03 1st entry point in co-module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
735 L0590 lda <u001F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
736 L0593 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
737 stu G.CurDvM,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
738 L0597 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
739 leax <G.CoTble,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
740 lda <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
741 ldx a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
742 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
743 beq L05EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
744 leax b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
745 bsr L05C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
746 ldb <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
747 beq L05B4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
748 jsr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
749
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
750 L05B0 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
751 bra L05BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
752 L05B4 jsr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
753 L05B6 pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
754 clr >WGlobal+G.WIBusy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
755 L05BB clr >WGlobal+G.CrDvFl
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
756 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
757
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
758 L05C0 pshs x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
759 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
760 clr G.WIBusy,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
761 ldb <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
762 bne L05CE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
763 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
764 stb G.WIBusy,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
765 L05CE clr G.CrDvFl,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
766 cmpu <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
767 bne L05D8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
768 inc g000A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
769 L05D8 puls pc,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
770
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
771 L05DA pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
772 ldu <u0020,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
773 L05DF ldb #$0F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
774 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
775 bsr L0597
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
776 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
777 L05E7 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
778 bra L05DF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
779 L05EB comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
780 ldb #E$MNF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
781 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
782
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
783 L05EF cmpa #$1E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
784 beq L05FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
785 L05F3 leax <L058E,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
786 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
787 stx <u002D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
788 stb <u002C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
789 L05FE clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
790 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
791
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
792 L0600 ldx <u0031,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
793 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
794 stx <u0031,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
795 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
796 stb <u002C,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
797 bne L05FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
798 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
799 bsr L05C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
800 stu G.CurDvM,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
801 ldx <u002F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
802 stx <u0031,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
803 ldb <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
804 beq L0624
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
805 jsr [<u002D,u]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
806 bra L05B0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
807 L0624 jsr [<u002D,u]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
808 bra L05B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
809
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
810 GetStat cmpa #SS.EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
811 beq SSEOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
812 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
813 cmpa #SS.ComSt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
814 beq GSComSt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
815 cmpa #SS.Joy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
816 beq GSJoy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
817 cmpa #SS.Mouse
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
818 lbeq GSMouse
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
819 cmpa #SS.Ready
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
820 beq GSReady
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
821 cmpa #SS.KySns
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
822 beq GSKySns
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
823 cmpa #SS.Montr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
824 beq GSMontr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
825 ldb #$06 2nd entry point in co-module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
826 lbra L0593
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
827
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
828 * SS.ComSt - get baud/parity info
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
829 GSComSt lda V.TYPE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
830 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
831 std R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
832 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
833
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
834 GSReady ldb <u0033,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
835 cmpb <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
836 beq L0667
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
837 bhi L0660
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
838 addb #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
839 L0660 subb <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
840 stb $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
841 SSEOF clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
842 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
843 L0667 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
844 ldb #E$NotRdy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
845 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
846
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
847 GSKySns ldy <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
848 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
849 cmpu <G.CurDev,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
850 bne L0678
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
851 ldb <G.KySns,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
852 L0678 stb R$A,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
853 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
854 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
855
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
856 * GetStat: SS.Montr (get Monitor type)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
857 GSMontr ldb >WGlobal+G.MonTyp get monitor type
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
858 tfr b,a put in A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
859 std $04,x save in caller's X
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
860 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
861
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
862 * GetStat: SS.JOY (get joystick X/Y/button values)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
863 GSJoy clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
864 tfr x,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
865 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
866 cmpu <$20,x is this win device same as current?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
867 beq L0697 branch if so
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
868 clra else D = 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
869 std $04,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
870 std $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
871 sta $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
872 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
873 L0697 ldx >$10EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
874 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
875 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
876 leau >$00EC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
877 jsr $0C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
878 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
879 lda $05,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
880 beq L06AB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
881 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
882 L06AB andb #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
883 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
884 bcc L06B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
885 orb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
886 L06B2 stb $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
887 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
888 lda $05,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
889 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
890 ldy #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
891 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
892 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
893 ldx >$10EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
894 leau >$00EC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
895 jsr $0F,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
896 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
897 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
898 ldy $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
899 stx $04,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
900 ldd #$003F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
901 subd ,s++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
902 std $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
903 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
904 puls pc,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
905
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
906 * GetStat: SS.Mouse (get mouse info)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
907 GSMouse pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
908 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
909 cmpu <$20,x is caller in current window?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
910 beq L06FA branch i so
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
911 ldy ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
912 ldb #$20 size of packet
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
913 L06EC clr ,-s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
914 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
915 bne L06EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
916 leax ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
917 bsr L0729
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
918 leas <$20,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
919 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
920 * here the caller is in the current window
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
921 L06FA tst <$63,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
922 bne L071A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
923 lda <$60,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
924 bne L071A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
925 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
926 bsr L073B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
927 puls u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
928 lda <$66,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
929 anda <$67,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
930 beq L071A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
931 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
932 lbsr L05E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
933 clr <$67,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
934 L071A lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
935 lbsr L05E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
936 leax <$3C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
937 ldy ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
938 bsr L0729
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
939 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
940 L0729 ldu $04,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
941 ldy <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
942 ldb P$Task,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
943 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
944 ldy #32
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
945 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
946 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
947 L0739 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
948 L073B leax <$3C,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
949 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
950 ldb <$17,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
951 tfr d,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
952 lda $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
953 pshs u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
954 ldx >$10EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
955 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
956 leau >$00EC,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
957 jsr $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
958 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
959 ldx $06,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
960 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
961 leay <$18,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
962 bsr L0764
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
963 puls b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
964 bsr L0764
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
965 puls pc,u,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
966 L0764 cmpd ,y++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
967 beq L0770
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
968 std -$02,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
969 lda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
970 sta <$2B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
971 L0770 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
972
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
973 SSTone ldx >$10F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
974 jmp $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
975
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
976 SSAnPal ldx >$10F4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
977 jmp $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
978
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
979 * Y = addr of path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
980 SetStat ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
981 cmpa #SS.ComSt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
982 lbeq SSComSt
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
983 cmpa #SS.Montr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
984 lbeq SSMontr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
985 cmpa #SS.KySns
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
986 lbeq SSKySns
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
987 cmpa #SS.Tone
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
988 beq SSTone
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
989 cmpa #SS.AnPal
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
990 beq SSAnPal
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
991 cmpa #SS.SSig
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
992 beq SSSig
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
993 cmpa #SS.MsSig
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
994 beq SSMsSig
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
995 cmpa #SS.Relea
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
996 beq SSRelea
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
997 cmpa #SS.Mouse
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
998 beq SSMouse
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
999 cmpa #SS.GIP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1000 lbeq SSGIP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1001 cmpa #SS.Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1002 bne L07B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1003 SSOpen ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1004 stx u0001,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1005 L07B5 ldb #$09 3rd entry point in co-module
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1006 lbra L0593
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1007
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1008 * SS.SSig - send signal on data ready
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1009 SSSig pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1010 clr <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1011 lda <u0034,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1012 suba <u0033,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1013 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1014 bsr L07EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1015 tst ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1016 bne L07F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1017 std <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1018 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1019
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1020 * SS.MsSig - send signal on mouse button
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1021 SSMsSig pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1022 clr <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1023 bsr L07EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1024 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1025 cmpu <G.CurDev,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1026 bne L07E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1027 tst >G.MsSig,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1028 bne L07F3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1029 L07E7 std <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1030 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1031 L07EC orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1032 lda PD.CPR,y get curr proc #
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1033 ldb R$X+1,x get user signal code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1034 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1035 L07F3 clr >G.MsSig,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1036 L07F7 puls cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1037 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1038 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1039
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1040 * SS.Relea - release a path from SS.SSig
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1041 SSRelea lda PD.CPR,y get curr proc #
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1042 cmpa <u0024,u same as keyboard?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1043 bne L0807 branch if not
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1044 clr <u0024,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1045 L0807 cmpa <u0026,u same as mouse?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1046 bne L0871
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1047 clr <u0026,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1048 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1049
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1050 * SS.Mouse - set mouse sample rate and button timeout
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1051 SSMouse ldd R$X,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1052 cmpa #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1053 beq L0819
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1054 sta <u0028,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1055 L0819 cmpb #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1056 beq L0820
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1057 stb <u0029,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1058 L0820 ldb R$Y+1,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1059 stb <u002B,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1060 ldy <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1061 cmpu <G.CurDev,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1062 bne L083D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1063 stb <G.AutoMs,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1064 ldd <u0028,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1065 sta <G.MSmpRV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1066 sta <G.MSmpRt,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1067 stb <G.Mouse+Pt.ToTm,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1068 L083D clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1069 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1070
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1071 * SS.GIP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1072 SSGIP ldy <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1073 cmpu <G.CurDev,y current window?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1074 bne L0866 branch if not
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1075 ldd R$Y,x get caller's Y (key repeat info)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1076 cmpd #$FFFF unchanged?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1077 beq L0853 yes, don't change current key info
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1078 std <G.KyDly,y else save key delay and speed info
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1079 L0853 ldd R$X,x get mouse info
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1080 cmpa #$01 set for hi res adapter?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1081 bgt L088F branch to error if greater
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1082 sta <G.Mouse+Pt.Res,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1083 * B = mouse port (1 = right, 2 = left)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1084 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1085 beq L088F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1086 cmpb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1087 bgt L088F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1088 stb <G.Mouse+Pt.Actv,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1089 L0866 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1090 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1091
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1092 * SS.KySns - setstat???
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1093 SSKySns ldd R$X,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1094 beq L086E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1095 ldb #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1096 L086E stb <u0022,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1097 L0871 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1098 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1099
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1100 * SS.Montr - change monitor type
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1101 SSMontr ldd R$X,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1102 cmpd #$0002
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1103 bhi L088F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1104 lda <D.VIDMD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1105 anda #$EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1106 bitb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1107 beq L0885
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1108 ora #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1109 L0885 sta <D.VIDMD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1110 stb >WGlobal+G.MonTyp
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1111 inc <u0023,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1112 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1113 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1114 L088F comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1115 ldb #E$IllArg
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1116 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1117
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1118 * SS.ComSt - set baud/parity params
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1119 SSComSt ldd R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1120 eora u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1121 anda #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1122 bne L088F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1123 lda R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1124 bsr L08AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1125 lbcc L07B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1126 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1127
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1128 VDGInt fcs /VDGInt/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1129
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1130 L08AA sta u0006,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1131 bmi L08C3 if hi-bit if A is set, we're a window
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1132 pshs u,y,a ..else VDG
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1133 lda #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1134 sta <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1135 leax <VDGInt,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1136 bsr L08D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1137 puls pc,u,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1138
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1139 WindInt fcs /WindInt/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1140
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1141 L08C3 pshs u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1142 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1143 sta <u001D,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1144 leax <WindInt,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1145 lda #$80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1146 bsr L08D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1147 puls pc,u,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1148 L08D2 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1149 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1150 L08D4 ldb <u002F,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1151 bne L08D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1152 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1153 ldu <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1154 bita <G.BCFFlg,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1155 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1156 bne L0900
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1157 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1158 bpl L08E8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1159 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1160 L08E8 pshs y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1161 bsr L0905
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1162 bcc L08F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1163 puls pc,y,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1164 L08F0 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1165 ldx <D.CCMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1166 leax <G.CoTble,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1167 sty a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1168 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1169 cmpa #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1170 bgt L08D2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1171 L0900 ldb #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1172 lbra L0590
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1173 L0905 ldd <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1174 pshs u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1175 ldd <D.SysPrc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1176 std <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1177 lda #Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1178 os9 F$Link
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1179 ldx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1180 bcc L091B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1181 ldu <D.SysPrc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1182 os9 F$Load
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1183 L091B puls u,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1184 std <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1185 lbcs L05EB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1186 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1187
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1188 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1189 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1190 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1191