annotate level1/modules/ccio.asm @ 1890:1021c2fd0c67

virtual disk descriptor program for DragonPlus add-on
author afra
date Wed, 12 Oct 2005 01:09:22 +0000
parents 316b175a40e4
children
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 * CCIO - OS-9 Level One V2 CoCo 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 *
1340
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1340
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
9 * 12 ????/??/?? ???
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00.
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
11 *
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
12 * 12r1 2003/09/11 Rodney V. Hamilton
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
13 * Modified key table to include $7F, $1D, $1E and $1F codes.
1735
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
14 *
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
15 * 2004/11/28, P.Harvey-Smith.
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
16 * Added code to remap Dragon keyboard inputs to CoCo format.
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
17 *
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
18 * 2004/12/02, P.Harvey-Smith.
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
19 * Changed the way that the entry points for the co?? drivers are
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
20 * called, so that we can have up to 7 different drivers.
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
21 * Integrated changes needed for the co51 driver from Dragon Data
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
22 * OS-9.
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
23 *
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
24 * 2005/04/24, P.Harvey-Smith.
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
25 * Added cursor flash call to AltIRQ routine, this decrements a
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
26 * counter and when zero calls the routine contained in V.Flash
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
27 * ccio initialises this to point to an rts, the individual COxx
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
28 * routine can over-ride this in it's init, this should point to
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
29 * a routine to flash the cursor which should end in an rts.
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
30 *
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 nam CCIO
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 ttl OS-9 Level One V2 CoCo I/O driver
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 use scfdefs
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
38 use cciodefs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 tylg set Drivr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42 atrv set ReEnt+rev
1340
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
43 rev set $01
201
668388823050 Fixed headers to be consistent
boisy
parents: 164
diff changeset
44 edition set 12
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
48 size equ V.Last
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49
256
9e9648e17298 Additional source improvements
boisy
parents: 201
diff changeset
50 fcb UPDAT.+EXEC.
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 name fcs /CCIO/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 start lbra Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 lbra Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 * Init
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 * Y = address of device descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 *
1795
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
72 Init
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
73 * MESS Debug lines for Phill
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
74 * pshs y
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
75 * ldy #$aa55
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
76 * ldy #V.5136
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
77 * ldy #V.51End
f5397babb085 Phill's testing modifications commented out
boisy
parents: 1736
diff changeset
78 * puls y
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
79
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
80 stu >D.KbdSta store devmem ptr
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
81 clra clear A
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
82 leax <V.SCF,u point to memory after V.SCF
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
83 ; ldb #$5D get counter
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
84 ldb #V.51End-V.SCF
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
85 L002E sta ,x+ clear mem
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
86 decb decrement counter
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
87 bne L002E continue if more
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
88
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
89 leax FlashCursor,pcr * Point to dummy cursor flash
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
90 stx V.Flash,u * Setup cursor flash
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
91
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
92 coma A = $FF
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
93 comb B = $FF
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
94 stb <V.Caps,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
95 std <V.LKeyCd,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
96 std <V.2Key2,u
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
97 lda #60
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
98 sta <V.ClkCnt,u
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
99 leax >AltIRQ,pcr get IRQ routine ptr
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
100 stx >D.AltIRQ store in AltIRQ
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
101 leax >SetDsply,pcr get display vector
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
102 stx <V.DspVct,u store in vector address
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
103 leax >XY2Addr,pcr get address of XY2Addr
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
104 stx <V.CnvVct,u
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
105 ldd <IT.PAR,y get parity and baud
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
106 lbra SetupTerm process them
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 * Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 Term pshs cc
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
118 orcc #IRQMask mask interrupts
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
119 ldx >D.Clock get clock vector
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
120 stx >D.AltIRQ and put back in AltIRQ
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 puls pc,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 * Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130 * A = character read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 *
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
134 Read
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
135 * pshs y
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
136 * ldy #$aa57
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
137 * puls y
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
138
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
139 leax V.InBuf,u point X to input buffer
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
140 ldb V.IBufT,u get tail pointer
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
141 orcc #IRQMask mask IRQ
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
142 cmpb V.IBufH,u same as head pointer
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
143 beq Put2Bed if so, buffer is empty, branch to sleep
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
144 abx X now points to curr char
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
145 lda ,x get char
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
146 bsr L009D check for tail wrap
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
147 stb V.IBufT,u store updated tail
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
148 andcc #^(IRQMask+Carry) unmask IRQ
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 rts
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
150
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
151 Put2Bed lda V.BUSY,u get calling process ID
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
152 sta V.WAKE,u store in V.WAKE
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
153 andcc #^IRQMask clear interrupts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 ldx #$0000
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
155 os9 F$Sleep sleep forever
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
156 clr V.WAKE,u clear wake
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
157 ldx <D.Proc get pointer to current proc desc
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
158 ldb <P$Signal,x get signal recvd
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
159 beq Read branch if no signal
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
160 cmpb #S$Window window signal?
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
161 bcc Read branch if so
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
164 * Check if we need to wrap around tail pointer to zero
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
165 L009D incb increment pointer
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
166 cmpb #$7F at end?
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
167 bls L00A3 branch if not
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
168 clrb else clear pointer (wrap to head)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 L00A3 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
171 *
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
172 * IRQ routine for keyboard
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
173 *
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
174 AltIRQ
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
175 * pshs y
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
176 * ldy #$aa58
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
177 * puls y
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
178
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
179
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
180 ldu >D.KbdSta get keyboard static
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
181 ldb <V.CFlg1,u graphics screen currently being displayed?
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
182 beq L00B7 branch if not
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
183 ldb <V.Alpha,u alpha mode?
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
184 beq L00B7 branch if so
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
185 lda <V.PIA1,u
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
186 lbsr SetDsply set up display
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
187 L00B7 ldx #PIA0Base point to PIA base
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 clrb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
190 std <V.KySns,u clear keysense byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
191 bsr L00E8 get bits
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 bne L00CC
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
193 clr $02,x clear PIA0Base+2
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
194 lda ,x get byte from PIA
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
195 coma complement
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
196 anda #$7F strip off hi bit
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
197 bne L00F1 branch if any bit set
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 L00CC clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 clrb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
200 std <V.KTblLC,u clear
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
201 coma A = $FF
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
202 tst <V.Spcl,u special key?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
203 bne l@ branch if so
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
204 sta <V.LKeyCd,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
205 l@ stb <V.Spcl,u clear for next time
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 comb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
207 sta <V.2Key1,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
208 std <V.2Key2,u
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
209
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
210 CheckFlash
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
211 dec V.FlashCount,u Get flash counter
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
212 beq FlashTime count zero, flash cursor
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
213 bra AltIRQEnd Otherwise just call clock module
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
214
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
215 FlashTime
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
216 jsr [V.Flash,u] Call flash routine
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
217 lda #CFlash50hz Re-init count
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
218 sta V.FlashCount,u
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
219
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
220 AltIRQEnd
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
221 jmp [>D.Clock] jump into clock module
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
222
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 L00E8 comb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
224 stb $02,x strobe one column
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
225 ldb ,x read PIA #0 row states
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
226 comb invert bits so 1=key pressed
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
227 andb #$03 mask out all but lower 2 bits
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 rts
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
229
1735
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
230 L00F1
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
231 bsr L015C
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 bmi L00CC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 bsr L00E8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 bne L00CC
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
236 cmpa <V.6F,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 bne L010E
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
238 ldb <V.ClkCnt,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 beq L010A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 decb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
241 L0105 stb <V.ClkCnt,u
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
242 * bra AltIRQEnd
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
243 bra CheckFlash
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 L010A ldb #$05
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 bra L011A
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
246 L010E sta <V.6F,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 ldb #$05
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
248 tst <V.KySame,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 bne L0105
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
250 ldb #60
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
251 L011A stb <V.ClkCnt,u
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
252 ldb V.IBufH,u get head pointer in B
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
253 leax V.InBuf,u point X to input buffer
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
254 abx X now holds address of head
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
255 lbsr L009D check for tail wrap
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
256 cmpb V.IBufT,u B at tail?
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
257 beq L012F branch if so
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
258 stb V.IBufH,u
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
259 L012F sta ,x store our char at ,X
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
260 beq WakeIt if nul, do wake-up
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
261 cmpa V.PCHR,u pause character?
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
262 bne L013F branch if not
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
263 ldx V.DEV2,u else get dev2 statics
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
264 beq WakeIt branch if none
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
265 sta V.PAUS,x else set pause request
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
266 bra WakeIt
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
267 L013F ldb #S$Intrpt get interrupt signal
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
268 cmpa V.INTR,u our char same as intr?
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
269 beq L014B branch if same
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
270 ldb #S$Abort get abort signal
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
271 cmpa V.QUIT,u our char same as QUIT?
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
272 bne WakeIt branch if not
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
273 L014B lda V.LPRC,u get ID of last process to get this device
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
274 bra L0153 go for it
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
275 WakeIt ldb #S$Wake get wake signal
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
276 lda V.WAKE,u get process to wake
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
277 L0153 beq L0158 branch if none
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
278 os9 F$Send else send wakeup signal
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
279 L0158 clr V.WAKE,u clear process to wake flag
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
280 bra AltIRQEnd and move along
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
281
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 L015C clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 clrb
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
284 std <V.ShftDn,u SHIFT/CTRL flag; 0=NO $FF=YES
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
285 std <V.KeyFlg,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
286 * %00000111-Column # (Output, 0-7)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
287 * %00111000-Row # (Input, 0-6)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 comb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
290 std <V.Key1,u key 1&2 flags $FF=none
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
291 sta <V.Key3,u key 3 "
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
292 deca lda #%11111110
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
293 sta $02,x write column strobe
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
294 L016F lda ,x read row from PIA0Base
1735
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
295
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
296 IFEQ DragonIO-1
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
297 lbsr DragonToCoCo ; Translate Dragon keyboard layout to CoCo
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
298 ENDC
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
299
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
300 coma invert so 1=key pressed
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
301 anda #$7F keep only keys, bit 0=off 1=on
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
302 beq L0183 no keys pressed, try next column
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
303 ldb #$FF preset counter to -1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 L0178 incb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
305 lsra bit test regA
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
306 bcc L017F no key, brach
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
307 lbsr L0221 convert column/row to matrix value and store
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
308 L017F cmpb #$06 max counter
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
309 bcs L0178 loop if more bits to test
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
310 L0183 inc <V.KeyFlg,u counter; used here for column
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
311 orcc #Carry bit marker; disable strobe
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
312 rol $02,x shift to next column
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
313 bcs L016F not finished with columns so loop
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
314 lbsr L0289 simultaneous check; recover key matrix value
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
315 bmi L020A invalid so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
316 cmpa <V.LKeyCd,u last keyboard code
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 bne L0199
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
318 inc <V.KySame,u same key flag ?counter?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
319 L0199 sta <V.LKeyCd,u setup for last key pressed
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
320 beq L01B9 if @ key, use lookup table
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
321 suba #$1A the key value (matrix) of Z
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
322 bhi L01B9 not a letter, so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
323 adda #$1A restore regA
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
324 ldb <V.CtrlDn,u CTRL flag
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
325 bne L01E9 CTRL is down so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
326 adda #$40 convert to ASCII value; all caps
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
327 ldb <V.ShftDn,u shift key flag
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
328 eorb <V.Caps,u get current device static memory pointer
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
329 andb #$01 tet caps flag
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
330 bne L01E9 not shifted so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
331 adda #$20 convert to ASCII lowercase
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 bra L01E9
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
333 * Not a letter key, use the special keycode lookup table
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
334 * Entry: A = table idnex (matrix scancode-26)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
335 L01B9 ldb #$03 three entries per key (normal, SHIFT, CTRL)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
336 mul convert index to table offset
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
337 lda <V.ShftDn,u shift key flag
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
338 beq L01C4 not shifted so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
339 incb else adjust offset for SHIFTed entry
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
340 bra L01CB and do it
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
341 L01C4 lda <V.CtrlDn,u CTRL flag?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
342 beq L01CB adjust offset for CTRL key
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 addb #$02
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
344 L01CB lda <V.KySnsF,u key sense flag?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
345 beq L01D4 not set, so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
346 cmpb #$11 spacebar?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
347 ble L0208 must be an arrow so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
348 L01D4 cmpb #$4C ALT key? (SHOULD BE $4C???)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
349 blt L01DD not ALT, CTRL, F1, F2 or SHIFT so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
350 inc <V.AltDwn,u flag special keys (ALT, CTRL)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
351 subb #$06 adjust offset to skip them
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
352 L01DD pshs x save X
1735
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
353
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
354 leax >KeyTbl,pcr point to keyboard table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 puls x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
357 bmi L01FD if A = $81 - $84, special key
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
358 * several entries to this routine from any key press; A is already ASCII
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
359 L01E9 ldb <V.AltDwn,u was ALT flagged?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
360 beq L01FA no, so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
361 cmpa #$3F ?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
362 bls L01F8 # or code
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
363 cmpa #$5B [
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
364 bcc L01F8 capital letter so go
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
365 ora #$20 convert to lower case
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
366 L01F8 ora #$80 set for ALT characters
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
367 L01FA andcc #^Negative not negative
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 rts
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
369 * Flag that special key was hit
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
370 L01FD inc <V.Spcl,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
371 ldb <V.KySame,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 bne L0208
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
373 com <V.Caps,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
374 L0208 orcc #Negative set negative
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 L020A rts
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
376
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
377 * Calculate arrow keys for key sense byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
378 L020B pshs b,a convert column into power of 2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 L0211 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 bne L0211
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385 bra L0219
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 L0217 pshs b,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
387 L0219 orb <V.KySns,u previous value of column
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
388 stb <V.KySns,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 puls pc,b,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
390 * Check special keys (SHIFT, CTRL, ALT)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 L0221 pshs b,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
392 cmpb #$03 is it row 3?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 bne L0230
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
394 lda <V.KeyFlg,u get column #
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
395 cmpa #$03 is it column 3?; ie up arrow
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
396 blt L0230 if lt it must be a letter
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
397 bsr L020B its a non letter so bsr
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
398 L0230 lslb B*8 8 keys per row
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 lslb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
401 addb <V.KeyFlg,u add in the column #
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 beq L025D
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
403 cmpb #$33 ALT
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 bne L0243
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
405 inc <V.AltDwn,u ALT down flag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406 ldb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 bra L0219
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
408 L0243 cmpb #$31 CLEAR?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 beq L024B
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
410 cmpb #$34 CTRL?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 bne L0252
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
412 L024B inc <V.CtrlDn,u CTRL down flag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 bra L0219
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
415 L0252 cmpb #$37 SHIFT key
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 bne L0262
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
417 com <V.ShftDn,u SHIFT down flag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 bra L0219
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 L025D ldb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 bsr L0217
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 clrb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
423 * Check how many key (1-3) are currently being pressed
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 L0262 pshs x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
425 leax <V.Key1,u 1st key table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 bsr L026D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 puls pc,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 L026D pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 bpl L0279
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 stb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 L0279 lda $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 bpl L0283
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 stb $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 L0283 stb $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 ldb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 puls pc,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
443 * simultaneous key test
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 L0289 pshs y,x,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 bsr L02EE
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
446 ldb <V.KTblLC,u key table entry #
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 beq L02C5
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
448 leax <V.2Key1,u point to 2nd key table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 pshs b
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
450 L0297 leay <V.Key1,u 1st key table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 ldb #$03
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
452 lda ,x get key #1
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
453 bmi L02B6 go if invalid? (no key)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
454 L02A0 cmpa ,y is it a match?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
455 bne L02AA go if not a matched key
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 clr ,y
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
457 com ,y set value to $FF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 bra L02B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 L02AA leay $01,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 bne L02A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 lda #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 sta ,x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
464 dec <V.KTblLC,u key table entry #
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 L02B6 leax $01,x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
466 dec ,s column counter
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 bne L0297
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 leas $01,s
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
469 ldb <V.KTblLC,u key table entry (can test for 3 simul keys)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 beq L02C5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 bsr L0309
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
472 L02C5 leax <V.Key1,u 1st key table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 lda #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 L02CA ldb ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 bpl L02DE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 bne L02CA
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
478 ldb <V.KTblLC,u key table entry (can test for 3 simul keys)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 beq L02EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 decb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
481 leax <V.2Key1,u 2nd key table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 lda b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 bra L02E8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 L02DE tfr b,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
485 leax <V.2Key1,u 2nd key table
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 bsr L026D
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
487 stb <V.KTblLC,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 L02E8 puls pc,y,x,b
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
489 L02EA orcc #Negative flag negative
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 puls pc,y,x,b
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
491
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
492 L02EE ldd <V.ShftDn,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 bne L0301
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 lda #$03
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
495 leax <V.Key1,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 L02F8 ldb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 beq L0302
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 bne L02F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 L0301 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 L0302 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 stb ,x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
504 inc <V.AltDwn,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 rts
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
506
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
507 * Sort 3 byte packet @ G.2Key1 according to sign of each byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
508 * so that positive #'s are at beginning & negative #'s at end
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
509 L0309 leax <V.2Key1,u 2nd key table
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
510 bsr L0314 sort bytes 1 & 2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 leax $01,x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
512 bsr L0314 sort bytes 2 & 3
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
513 leax -$01,x sort 1 & 2 again (fall thru for third pass)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
514 L0314 lda ,x get current byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
515 bpl L0320 positive - no swap
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
516 ldb $01,x get next byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
517 bmi L0320 negative - no swap
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
518 sta $01,x swap the bytes
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 stb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 L0320 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521
1735
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
522 ;
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
523 ; Convert Dragon Keyboard mapping to CoCo.
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
524 ;
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
525 ; Entry a=Dragon formatted keyboard input from PIA
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
526 ; Exit a=CoCo formatted keyboard input from PIA
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
527 ;
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
528
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
529 IFEQ DragonIO-1
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
530 DragonToCoCo
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
531 pshs b
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
532 sta ,-s ; Save on stack
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
533 tfr a,b ; Take a copy of keycode
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
534 anda #%01000000 ; Top row same on both machines
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
535 andb #%00000011 ; shift bottom 2 rows up 4 places
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
536 lslb
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
537 lslb
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
538 lslb
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
539 lslb
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
540 pshs b
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
541 ora ,s+ ; recombine rows
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
542 puls b
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
543 andb #%00111100 ; Shift middle 4 rows down 2 places
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
544 lsrb
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
545 lsrb
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
546 pshs b
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
547 ora ,s+ ; recombine rows
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
548 puls b
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
549 RTS
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
550
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
551 ENDC
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
552
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
553 * Key Table
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
554 * 1st column = key (no modifier)
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
555 * 2nd column = SHIFT+key
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
556 * 3rd column = CTRL+key
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
557 KeyTbl fcb $00,$40,$60 ALT @ `
1340
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
558 fcb $0c,$1c,$13 UP
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
559 fcb $0a,$1a,$12 DOWN
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
560 fcb $08,$18,$10 LEFT
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
561 fcb $09,$19,$11 RIGHT
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
562 fcb $20,$20,$20 SPACEBAR
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
563 fcb $30,$30,$81 0 0 capslock
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
564 fcb $31,$21,$7c 1 ! |
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
565 fcb $32,$22,$00 2 " null
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
566 fcb $33,$23,$7e 3 # ~
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
567 fcb $34,$24,$1d 4 $ RS (was null)
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
568 fcb $35,$25,$1e 5 % GS (was null)
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
569 fcb $36,$26,$1f 6 & US (was null)
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
570 fcb $37,$27,$5e 7 ' ^
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
571 fcb $38,$28,$5b 8 ( [
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
572 fcb $39,$29,$5d 9 ) ]
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
573 fcb $3a,$2a,$00 : * null
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
574 fcb $3b,$2b,$7f ; + del (was null)
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
575 fcb $2c,$3c,$7b , < {
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
576 fcb $2d,$3d,$5f - = _
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
577 fcb $2e,$3e,$7d . > }
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
578 fcb $2f,$3f,$5c / ? \
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
579 fcb $0d,$0d,$0d ENTER key
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
580 fcb $00,$00,$00 CLEAR key
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
581 fcb $05,$03,$1b BREAK key
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
582 fcb $31,$33,$35 F1 key
63bfe1e5c5f4 Rodney added several additional codes that can be generated from the
boisy
parents: 1287
diff changeset
583 fcb $32,$34,$36 F2 key
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584
1735
11f38ece79ef More changes by Phill for Dragon
boisy
parents: 1586
diff changeset
585
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 * Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589 * A = character to write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 *
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
597 Write ldb <V.NGChr,u are we in the process of getting parameters?
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
598 bne PrmHandl yes, go process
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
599 sta <V.WrChr,u save character to write
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
600 cmpa #C$SPAC space or higher?
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
601 bcc GoCo yes, normal write
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
602 cmpa #$1E escape sequence $1E or $1F?
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
603 bcc Escape yes, go process
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
604 cmpa #$0F GFX codes?
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
605 lbcc GfxDispatch branch if so
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
606 cmpa #C$BELL bell?
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
607 lbeq Ding if so, ring bell
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
608 * Here we call the CO-module to write the character
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
609 GoCo lda <V.CurCo,u get CO32/CO80 flag
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
610 CoWrite ldb #$03 we want to write
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
611
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
612 CallCO leax <V.GRFOE,u get base pointer to CO-entries
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
613 pshs a
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
614 lbsr GetModOffset ; Get offset
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
615 ldx a,x get pointer to CO32/CO80
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
616 puls a
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
617 beq NoIOMod branch if no module
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
618 lda <V.WrChr,u get character to write
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
619 L039D jmp b,x call i/o subroutine
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
620 NoIOMod comb
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
621 ldb #E$MNF
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 rts
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
623
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
624 * Parameter handler
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
625 PrmHandl cmpb #$02 two parameters left?
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
626 beq L03B0 branch if so
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
627 sta <V.NChr2,u else store in V.NChr2
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
628 clr <V.NGChr,u clear parameter counter
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
629 jmp [<V.RTAdd,u] jump to return address
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
630 L03B0 sta <V.NChar,u store in V.NChar
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
631 dec <V.NGChr,u decrement parameter counter
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633 rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
634
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
635 Escape beq L03C5 if $1E, we conveniently ignore it
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
636 leax <COEscape,pcr else it's $1F... set up to get next char
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 L03BD ldb #$01
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
638 L03BF stx <V.RTAdd,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
639 stb <V.NGChr,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 L03C5 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
642
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
643 COEscape ldb #$03 write offset into CO-module
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
644 lbra JmpCO
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
645
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
646 * Show VDG or Graphics screen
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
647 * Entry: B = 0 for VDG, 1 for Graphics
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
648 SetDsply pshs x,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
649 stb <V.Alpha,u save passed flag in B
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
650 lda >PIA1Base+2
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
651 anda #$07 mask out all but lower 3 bits
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
652 ora ,s+ OR in passed A
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
653 tstb display graphics?
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
654 bne L03DE branch if so
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
655 ora <V.CFlag,u
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
656 L03DE sta >PIA1Base+2
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
657 sta <V.PIA1,u
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
658 tstb display graphics?
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
659 bne DoGfx branch if so
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
660 * Set up VDG screen for text
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
661 DoVDG
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 stb >$FFC0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
663 stb >$FFC2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 stb >$FFC4
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
665 lda <V.ScrnA,u get pointer to alpha screen
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
666 bra L0401
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
667
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
668 * Set up VDG screen for graphics
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
669 DoGfx stb >$FFC0
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 stb >$FFC3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
671 stb >$FFC5
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
672 lda <V.SBAdd,u get pointer to graphics screen
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
673
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
674 L0401 ldb #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
675 ldx #$FFC6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
676 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
677 L0407 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
678 bcs L0410
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
679 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
680 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
681 bra L0414
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
682 L0410 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
683 sta ,x+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
684 L0414 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
685 bne L0407
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
686 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
687 puls pc,x
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
688
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
689 GRFO fcs /GRFO/
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
690 CO32 fcs /CO32/
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
691 CO80 fcs /CO80/
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
692 CO51 fcs /CO51/
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
693
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
694 * GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
695 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
696 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
697 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
698 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
699 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
700 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
701 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
702 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
703 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
704 *
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
705 GetStat sta <V.WrChr,u save off stat code
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
706 cmpa #SS.Ready ready call?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
707 bne L0439 branch if not
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
708 lda V.IBufT,u get buff tail ptr
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
709 suba V.IBufH,u num of chars ready in A
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
710 lbeq NotReady branch if empty
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
711 SSEOF clrb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
712 rts
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
713 L0439 cmpa #SS.EOF EOF?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
714 beq SSEOF branch if so
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
715 ldx PD.RGS,y get caller's regs
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
716 cmpa #SS.Joy joystick?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
717 beq SSJOY branch if so
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
718 cmpa #SS.ScSiz screen size?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
719 beq SSSCSIZ branch if so
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
720 cmpa #SS.KySns keyboard sense?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
721 beq SSKYSNS branch if so
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
722 cmpa #SS.DStat display status?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
723 lbeq SSDSTAT branch if so
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
724 ldb #$06 getstat entry into CO-module
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
725 lbra JmpCO
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
726
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
727 * Return key sense information
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
728 SSKYSNS ldb <V.KySns,u get key sense info
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
729 stb R$A,x put in caller's A
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
730 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
731 rts
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
732
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
733 * Return screen size
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
734 SSSCSIZ clra clear upper 8 bits of D
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
735 ldb <V.Col,u get column count
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
736 std R$X,x save in X
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
737 ldb <V.Row,u get row count
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
738 std R$Y,x save in Y
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
739 clrb no error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
740 rts
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
741
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
742 * Get joytsick values
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
743 SSJOY pshs y,cc
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
744 orcc #IRQMask mask interrupts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
745 lda #$FF
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
746 sta >PIA0Base+2
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
747 ldb >PIA0Base
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
748 ldy R$X,x get joystick number to poll
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
749 bne L0481
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
750 andb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
751 bne L0485
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
752 bra L0486
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
753 L0481 andb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
754 beq L0486
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
755 L0485 clra
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
756 L0486 sta R$A,x
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
757 lda >PIA0Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
758 ora #$08
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
759 ldy R$X,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
760 bne L0494
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
761 anda #$F7
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
762 L0494 sta >PIA0Base+3
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
763 lda >PIA0Base+1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
764 anda #$F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
765 bsr L04B3
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
766 std R$X,x
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
767 lda >PIA0Base+1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
768 ora #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
769 bsr L04B3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
770 pshs b,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
771 ldd #63
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
772 subd ,s++
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
773 std R$Y,x
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
774 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
775 puls pc,y,cc
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
776
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
777 L04B3 sta >PIA0Base+1
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
778 lda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
779 ldb #$40
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
780 bra L04C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
781 L04BC lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
782 cmpb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
783 bhi L04C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
784 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
785 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
786 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
787 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
788 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
789 L04C7 pshs b
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
790 sta >PIA1Base
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
791 tst >PIA0Base
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
792 bpl L04D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
793 adda ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
794 bra L04BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
795 L04D5 suba ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
796 bra L04BC
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
797
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
798 * Return display status
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
799 * Entry: A = path
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
800 * Exit: A = color code of pixel at cursor address
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
801 * X = address of graphics display memory
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
802 * Y = graphics cursor address; X = MSB, Y = LSB
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
803 SSDSTAT lbsr GfxActv gfx screen allocated?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
804 bcs L050E branch if not
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
805 ldd <V.GCrsX,u else get X/Y gfx cursor position
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
806 bsr XY2Addr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
807 tfr a,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
808 andb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
809 L04E7 bita #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
810 bne L04F6
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
811 lsra divide D by 2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
812 lsrb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
813 tst <V.Mode,u which mode?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
814 bmi L04E7 branch if 256x192
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
815 lsra else divide D by 2 again
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
816 lsrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
817 bra L04E7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
818 L04F6 pshs b
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
819 ldb <V.PMask,u get pixel color mask in B
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
820 andb #$FC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
821 orb ,s+
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
822 ldx PD.RGS,y get caller's regs
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
823 stb R$A,x place pixel color in A
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
824 ldd <V.GCrsX,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
825 std R$Y,x cursor X/Y pos in Y,
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
826 ldd <V.SBAdd,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
827 std R$X,x and screen addr in X
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
828 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
829 L050E rts
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
830
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
831 * Entry: A = X coor, B = Y coor
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
832 XY2Addr pshs y,b,a save off regs
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
833 ldb <V.Mode,u get video mode
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
834 bpl L0517 branch if 128x192 (divide A by 4)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
835 lsra else divide by 8
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
836 L0517 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
837 lsra
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
838 pshs a save on stack
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
839 ldb #191 get max Y
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
840 subb $02,s sutract from Y on stack
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
841 lda #32 byte sper line
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
842 mul
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
843 addb ,s+ add offset on stack
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
844 adca #$00
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
845 ldy <V.SBAdd,u get base address
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
846 leay d,y move D bytes into address
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
847 lda ,s pick up original X coor
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
848 sty ,s put offset addr on stack
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
849 anda <V.PixBt,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
850 ldx <V.MTabl,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
851 lda a,x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
852 puls pc,y,x X = offset address, Y = base
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
853
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
854 * SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
855 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
856 * Entry:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
857 * A = function code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
858 * Y = address of path descriptor
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
859 * U = address of device memory area
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
860 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
861 * Exit:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
862 * CC = carry set on error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
863 * B = error code
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
864 *
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
865 SetStat sta <V.WrChr,u save function code
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
866 ldx PD.RGS,y get caller's regs
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
867 cmpa #SS.ComSt
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
868 lbeq SSCOMST
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
869 cmpa #SS.AAGBf
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
870 beq SSAAGBF
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
871 cmpa #SS.SLGBf
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
872 beq SSSLGBF
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
873 cmpa #SS.KySns
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
874 bne CoGetStt
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
875 ldd R$X,x get caller's key sense set data
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
876 beq L0558 branch if zero
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
877 ldb #$FF else set all bits
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
878 L0558 stb <V.KySnsF,u store value in KySnsFlag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
879 L055B clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
880 L055C rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
881
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
882 CoGetStt ldb #$09 CO-module setstat
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
883 JmpCO pshs b
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
884 lda <V.CurCo,u get CO-module in use
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
885 lbsr CallCO
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
886 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
887 bcc L055B
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
888 tst <V.GRFOE,u GRFO linked?
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
889 beq L055C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
890 tfr a,b
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
891 clra GRFO address offset in statics
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
892 lbra CallCO call it
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
893
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
894 * Reserve an additional graphics buffer (up to 2)
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
895 SSAAGBF ldb <V.Rdy,u was initial buffer allocated with $0F?
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
896 lbeq NotReady branch if not
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
897 pshs b save buffer number
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
898 leay <V.AGBuf,u point to additional graphics buffers
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
899 ldd ,y first entry empty?
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
900 beq L058E branch if so
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
901 leay $02,y else move to next entry
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
902 inc ,s increment B on stack
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
903 ldd ,y second entry empty?
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
904 bne L059E if not, no room for more... error out
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
905 L058E lbsr GetMem allocate graphics buffer memory
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
906 bcs L05A1 branch if error
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
907 std ,y save new buffer pointer at ,Y
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
908 std R$X,x and in caller's X
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
909 puls b get buffer number off stack
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
910 clra clear hi byte of D
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
911 std R$Y,x and put in caller's Y (buffer number)
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
912 clrb call is ok
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
913 rts and return
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
914 L059E ldb #E$BMode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
915 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
916 L05A1 puls pc,a
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
917
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
918 * Select a graphics buffer
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
919 SSSLGBF ldb <V.Rdy,u was initial buffer allocated with $0F?
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
920 lbeq NotReady branch if not
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
921 ldd R$Y,x else get buffer number from caller
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
922 cmpd #$0002 compare against high
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
923 bhi BadMode branch if error
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
924 leay <V.GBuff,u point to base graphics buffer address
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
925 lslb multiply by 2
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
926 ldd b,y get pointer
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
927 beq BadMode branch if error
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
928 std <V.SBAdd,u else save in current
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
929 ldd R$X,x get select flag
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
930 beq L05C3 if zero, do nothing
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
931 ldb #$01 else set display flag
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
932 L05C3 stb <V.CFlg1,u save display flag
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
933 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
934 rts
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
935 BadMode comb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
936 ldb #E$BMode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
937 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
938
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
939 SSCOMST ldd R$Y,x Get caller's Y
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
940 SetupTerm
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
941 bita #ModCo32 CO80?
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
942 beq GoCO80 branch if so
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
943 ldb #$10 assume true lower case TRUE
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
944 bita #$01 true lowercase bit set?
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
945 bne GoCO32 branch if so
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
946 clrb true lower case FALSE
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
947
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
948 GoCO32 stb <V.CFlag,u save flag for later
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
949 lda #ModCo32 CO32 is loaded bit
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
950 ldx #$2010 32x16
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
951 pshs u,y,x,a
164
20f0878b4a7f Added more verbosity to source
boisy
parents: 0
diff changeset
952 leax >CO32,pcr
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
953 bra SetupCoModule
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
954
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
955 GoCO80 bita #ModCo80 ; Co80 needed ?
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
956 beq GoCO51
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
957 lda #ModCO80 'CO80 is loaded' bit
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
958 ldx #$5018 80x24
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
959 pshs u,y,x,a
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
960 leax >CO80,pcr
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
961
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
962 SetupCoModule
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
963 bsr LoadCoModule load CO-module if not already loaded
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
964 puls u,y,x,a
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
965 bcs L0600
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
966 stx <V.Col,u save screen size
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
967 sta <V.CurCo,u current module in use? ($02=CO32, $04=C080)
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
968 L0600 rts
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
969
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
970 GOCo51 ldx #$3318 51x24
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
971 pshs u,y,x,a
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
972 leax >CO51,pcr
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
973 bra SetupCoModule
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
974
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
975 LoadCoModule
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
976 bita <V.COLoad,u module loaded?
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
977 beq L0608 branch if not
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
978 L0606 clrb else clear carry
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
979 rts and return
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
980
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
981 L0608 pshs y,x,a
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
982 lbsr LinkSub
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
983 bcc L061F branch if link was successful
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
984 ldx $01,s get pointer to name on stack
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
985 pshs u
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
986 os9 F$Load try to load subroutine I/O module
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
987 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
988 bcc L061F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
989 puls y,x,a
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
990 lbra NoIOMod
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
991 L061F leax <V.GRFOE,u get base pointer to CO-entries
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
992 lda ,s
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
993 bsr GetModOffset ; Get offset in table
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
994 sty a,x ; Save address
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
995
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
996 puls y,x,a
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
997 ldb #$00 CO-module init offset
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
998 lbra CallCO call it
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
999
1736
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1000 ;
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1001 ; Get module offset from V.GRFOE into A reg.
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1002 ; I had to do this because the previous system would only work
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1003 ; properly for 2 entries !
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1004 ;
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1005
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1006 GetModOffset
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1007 pshs b
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1008 clrb ; Calculate address offset
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1009 AddrFind
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1010 bita #$01 ; Done all shifts ?
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1011 bne AddrDone
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1012 addb #$2 ; increment addr offset ptr
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1013 lsra
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1014 bra AddrFind ; Test again
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1015 AddrDone
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1016 tfr b,a ; output in a
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1017 puls b,pc
fd288a57f6ab CO51 additions by Phill
boisy
parents: 1735
diff changeset
1018
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1019 * Link to subroutine
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1020 LinkSub pshs u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1021 lda #Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1022 os9 F$Link
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1023 puls pc,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1024
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1025 * 128x192 4 color pixel table
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1026 Mode1Clr fdb $0055,$aaff
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1027
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1028 GfxDispatch
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1029 cmpa #$15 GRFO-handled code?
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1030 bcc GoGrfo branch if so
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1031 cmpa #$0F display graphics code?
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1032 beq Do0F branch if so
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1033 suba #$10
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1034 bsr GfxActv check if first gfx screen was alloc'ed
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1035 bcs L0663 if not, return with error
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1036 leax <gfxtbl,pcr else point to jump table
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1037 lsla multiply by two
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1038 ldd a,x get address of routine
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1039 jmp d,x jump to it
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1040
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1041 * Jump table for graphics codes $10-$14
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1042 gfxtbl fdb Do10-gfxtbl $10 - Preset Screen
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1043 fdb Do11-gfxtbl $11 - Set Color
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1044 fdb Do12-gfxtbl $12 - End Graphics
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1045 fdb Do13-gfxtbl $13 - Erase Graphics
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1046 fdb Do14-gfxtbl $14 - Home Graphics Cursor
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1047
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1048 GfxActv ldb <V.Rdy,u gfx screen allocated?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1049 bne L0606 branch if so
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1050 NotReady comb
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1051 ldb #E$NotRdy
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1052 L0663 rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1053
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1054 GoGrfo bsr GfxActv
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1055 bcs L0663
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1056 ldx <V.GRFOE,u get GRFO entry point
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1057 bne L0681 branch if not zero
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1058 pshs y,a else preserve regs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1059 bne L067F
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1060 leax >GRFO,pcr get pointer to name string
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1061 bsr LinkSub link to GRFO
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1062 bcc L067B branch if ok
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1063 puls pc,y,a else exit with error
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1064 L067B sty <V.GRFOE,u save module entry pointer
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1065 L067F puls y,a restore regs
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1066 L0681 clra A = GRFO address offset in statics
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1067 lbra CoWrite
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1068
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1069 * Allocate GFX mem -- we must allocate on a 512 byte page boundary
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1070 GetMem pshs u save static pointer
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1071 ldd #6144+256 allocate graphics memory + 1 page
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1072 os9 F$SRqMem do it
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1073 bcc L0691 branch if ok
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1074 puls pc,u else return with error
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1075 L0691 tfr u,d move mem ptr to D
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1076 puls u restore statics
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1077 tfr a,b move high 8 bits to lower
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1078 bita #$01 odd page?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1079 beq L069F branch if not
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1080 adda #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1081 bra L06A1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1082 L069F addb #$18
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1083 L06A1 pshs u,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1084 tfr b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1085 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1086 tfr d,u
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
1087 ldd #256
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1088 os9 F$SRtMem return page
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1089 puls u,a
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1090 bcs L06B3 branch if error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1091 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1092 L06B3 rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1093
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1094 * $0F - display graphics
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1095 Do0F leax <DispGfx,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1096 ldb #$02
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1097 lbra L03BF
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1098
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1099 DispGfx ldb <V.Rdy,u already allocated initial buffer?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1100 bne L06D1 branch if so
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1101 bsr GetMem else get graphics memory
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1102 bcs L06EF branch if error
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1103 std <V.SBAdd,u save memory
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1104 std <V.GBuff,u and GBuff
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1105 inc <V.Rdy,u ok, we're ready
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1106 lbsr EraseGfx clear gfx mem
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1107 L06D1 lda <V.NChr2,u get character after next
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1108 sta <V.PMask,u save color set (0-3)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1109 anda #$03 mask out all but lower 2 bits
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1110 leax >Mode1Clr,pcr point to mask byte table
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1111 lda a,x get byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1112 sta <V.Msk1,u save mask byte here
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1113 sta <V.Msk2,u and here
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1114 lda <V.NChar,u get next char, mode byte (0-1)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1115 cmpa #$01 compare against max
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1116 bls L06F0 branch if valid
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1117 comb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1118 ldb #E$BMode else invalid mode specified, send error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1119 L06EF rts
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1120
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1121 L06F0 tsta test user supplied mode byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1122 beq L0710 branch if 256x192
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1123 ldd #$C003
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1124 std <V.MCol,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1125 lda #$01
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1126 sta <V.Mode,u 128x192 mode
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1127 lda #$E0
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1128 ldb <V.NChr2,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1129 andb #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1130 beq L0709
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1131 lda #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1132 L0709 ldb #$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1133 leax <L0742,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1134 bra L072D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1135 L0710 ldd #$8001
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1136 std <V.MCol,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1137 lda #$FF
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1138 tst <V.Msk1,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1139 beq L0723
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1140 sta <V.Msk1,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1141 sta <V.Msk2,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1142 L0723 sta <V.Mode,u 256x192 mode
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1143 lda #$F0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1144 ldb #$07
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1145 leax <L0746,pcr
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1146 L072D stb <V.PixBt,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1147 stx <V.MTabl,u
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1148 ldb <V.NChr2,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1149 andb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1150 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1151 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1152 ora ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1153 ldb #$01
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1154 * Indicate screen is current
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
1155 lbra SetDsply
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1156
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1157 L0742 fcb $c0,$30,$0c,$03
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1158 L0746 fcb $80,$40,$20,$10,$08,$04,$02,$01
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1159
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1160 * $11 - set color
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1161 Do11 leax <SetColor,pcr set up return address
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1162 lbra L03BD
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1163
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1164 SetColor clr <V.NChar,u get next char
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1165 lda <V.Mode,u which mode?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1166 bmi L075F branch if 256x192
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1167 inc <V.NChar,u
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1168 L075F lbra L06D1
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1169
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1170 * $12 - end graphics
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1171 Do12 leax <V.GBuff,u point to first buffer
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1172 ldy #$0000 Y = 0
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1173 ldb #$03 free 3 gfx screens max
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1174 pshs u,b
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
1175 L076D ldd #6144 size of graphics screen
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1176 ldu ,x++ get address of graphics screen
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1177 beq L077A branch if zero
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1178 sty -$02,x else clear entry
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1179 os9 F$SRtMem and return memory
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1180 L077A dec ,s decrement counter
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1181 bgt L076D keep going if not end
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1182 ldu ,x flood fill buffer?
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1183 beq L0788 branch if not allocated
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1184 ldd #512 else get size
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1185 os9 F$SRtMem and free memory
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1186 L0788 puls u,b restore regs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1187 clra
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1188 sta <V.Rdy,u gfx mem no longer alloced
1584
0e3a28789196 Source comments updated
boisy
parents: 1583
diff changeset
1189 lbra SetDsply
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1190
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1191 Do10 leax <Preset,pcr set up return address
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1192 lbra L03BD
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1193
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1194 * NOTE! Shouldn't this be lda <V.NChar,u ??
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1195 Preset lda <V.NChr2,u get next char
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1196 tst <V.Mode,u which mode?
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1197 bpl L07A7 branch if 128x192 4 color
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1198 ldb #$FF assume we will clear with $FF
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1199 anda #$01 mask out all but 1 bit (2 colors)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1200 beq EraseGfx erase graphic screen with color $00
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1201 bra L07B2 else erase screen with color $FF
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1202 L07A7 anda #$03 mask out all but 2 bits (4 colors)
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1203 leax >Mode1Clr,pcr point to color table
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1204 ldb a,x get appropriate byte
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1205 bra L07B2 and start the clearing
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1206
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1207 * Erase graphics screen
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1208 Do13
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
1209 EraseGfx clrb value to clear screen with
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1210 L07B2 ldx <V.SBAdd,u
1586
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
1211 leax >6144+1,x point to end of gfx mem + 1
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
1212 L07B9 stb ,-x clear
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
1213 cmpx <V.SBAdd,u X = to start?
e26f7d2e40df source updated
boisy
parents: 1585
diff changeset
1214 bhi L07B9 if not, continue
1583
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1215 * Home Graphics cursor
2d73cd04596b More comments
boisy
parents: 1582
diff changeset
1216 Do14 clra
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1217 clrb
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1584
diff changeset
1218 std <V.GCrsX,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1219 rts
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1220
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1221 *
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1222 * Ding - tickle CoCo's PIA to emit a sound
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1223 *
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1224 Ding pshs b,a
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1225 lda >PIA0Base+1
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1226 ldb >PIA0Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1227 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1228 anda #$F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1229 andb #$F7
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1230 sta >PIA0Base+1
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1231 stb >PIA0Base+3
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1232 lda >PIA1Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1233 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1234 ora #$08
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1235 sta >PIA1Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1236 ldb #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1237 L07E6 lda #$FE
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1238 bsr DingDuration
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1239 lda #$02
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1240 bsr DingDuration
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1241 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1242 bne L07E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1243 puls a
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1244 sta >PIA1Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1245 puls b,a
1213
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1246 sta >PIA0Base+1
4e235f213651 Lots of changes: bootscripts and bootlists added, sources massaged...
boisy
parents: 317
diff changeset
1247 stb >PIA0Base+3
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1248 puls pc,b,a
307
1580bbd1e2fc Added more comments and source symbolics in ccio.asm
boisy
parents: 257
diff changeset
1249
1582
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1250 DingDuration
e19a38f50c3a More commments added
boisy
parents: 1340
diff changeset
1251 sta >PIA1Base
317
e6dcf1ac92b2 Modified ccio.asm for better comments, init.asm simplified
boisy
parents: 307
diff changeset
1252 lda #128
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1253 L0805 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1254 bne L0805
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1255 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1256
1826
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
1257 * Dummy flash cursor routine, can be replaced by COxx module.
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
1258
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
1259 FlashCursor
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
1260 rts
316b175a40e4 Added call to AltIRQ, to call a cursor flash routine in COxx module
afra
parents: 1795
diff changeset
1261
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1262 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1263 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1264 end