Mercurial > hg > Members > kono > nitros9-code
annotate level2/modules/keydrv_cc3.asm @ 1938:14e43c3ec661
Reset editions
author | boisy |
---|---|
date | Sat, 26 Nov 2005 22:07:06 +0000 |
parents | 1e312b144f4d |
children | b8c7b7fbf3c9 |
rev | line source |
---|---|
1254 | 1 ******************************************************************** |
2 * KeyDrv - Keyboard Driver for CoCo 3 | |
3 * | |
4 * $Id$ | |
5 * | |
1263 | 6 * Edt/Rev YYYY/MM/DD Modified by |
7 * Comment | |
1254 | 8 * ------------------------------------------------------------------ |
1263 | 9 * 4 1998/10/10 Robert Gault |
10 * L2 Upgrade distribution version with annotations by Robert Gault. | |
1254 | 11 |
1327 | 12 nam KeyDrv |
1254 | 13 ttl Keyboard Driver for CoCo 3 |
14 | |
15 * Disassembled 98/09/09 09:02:10 by Disasm v1.6 (C) 1988 by RML | |
16 | |
1327 | 17 ifp1 |
18 use defsfile | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
19 ENDC |
1254 | 20 |
21 tylg set Systm+Objct | |
1327 | 22 atrv set ReEnt+rev |
23 rev set $00 | |
24 edition equ 4 | |
1254 | 25 |
1327 | 26 mod eom,name,tylg,atrv,entry,size |
27 size equ . | |
1254 | 28 |
1327 | 29 name fcs /KeyDrv/ |
30 fcb edition | |
31 | |
32 entry equ * | |
1254 | 33 |
1327 | 34 * Init - Initialize keyboard |
35 lbra Init | |
36 | |
37 * Term - Terminate keyboard | |
38 lbra Term | |
1254 | 39 |
1327 | 40 * Function - Test for function keys |
41 lbra FuncKeys | |
42 | |
43 * Read - read keys if pressed | |
1360 | 44 * Exit: A = key pressed |
1933 | 45 ReadKys ldu <D.CCMem Get VTIO global memory into U |
1360 | 46 ldx #PIA0Base base address of PIA #0 |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
47 ldb #$FF |
1360 | 48 stb $02,x clear all row strobes |
49 ldb ,x read Joystick buttons | |
50 comb invert bits so 1=pressed | |
51 andb #%00001111 keep only buttons | |
52 bne L0059 branch if button pushed; error routine | |
53 clr $02,x enable all strobe lines | |
54 lda ,x read PIA #0 | |
1327 | 55 coma |
1360 | 56 * Check to see if ANY key is down |
57 anda #%01111111 mask only the joystick comparator | |
58 beq NoKey branch if no keys pressed | |
59 * Here, a key is down on the keyboard | |
60 pshs dp save our DP | |
61 tfr u,d move statics ptr to D | |
62 tfr a,dp set DP to the address in regU | |
63 bsr EvalMatrix evaluate the found key matrix | |
64 puls dp return to system DP | |
65 bpl L005B valid key | |
66 NoKey clra regA would have been the found key | |
67 ldb <G.CapLok,u CapsLock/SysRq key down flag | |
68 bne L0056 branch if down | |
69 clr <G.KTblLC,u Key table entry# last checked (1-3) | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
70 IFNE H6309 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
71 comd |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
72 ELSE |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
73 coma |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
74 comb |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
75 ENDC |
1360 | 76 sta <G.LKeyCd,u last keyboard code |
77 sta <G.2Key1,u 2nd key table storage; $FF=none | |
78 std <G.2Key2,u format (Row/Column) | |
79 L0056 clr <G.CapLok,u see above | |
1327 | 80 L0059 ldb #$FF |
81 L005B rts | |
1254 | 82 |
1360 | 83 |
84 * Evaluates the keyboard matrix for a key | |
85 EvalMatrix | |
86 ldx #PIA0Base base value of PIA #0 | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
87 IFNE H6309 |
1327 | 88 clrd |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
89 ELSE |
1327 | 90 clra |
91 clrb | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
92 ENDC |
1360 | 93 std <G.ShftDn shift/CTRL flag; 0=NO $FF=YES |
94 std <G.KeyFlg PIA bits/ALT flag | |
1254 | 95 * %00000111-Column # (Output, 0-7) |
96 * %00111000-Row # (Input, 0-6) | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
97 IFNE H6309 |
1360 | 98 comd set D to $FFFF |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
99 ELSE |
1327 | 100 coma |
1360 | 101 comb set primary key table |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
102 ENDC |
1360 | 103 std <G.Key1 key 1&2 flags $FF=none |
104 sta <G.Key3 key 3 " | |
105 deca ie. lda #%11111110 | |
106 sta $02,x strobe one column | |
107 L006E lda ,x read PIA #0 row states | |
108 coma invert bits so 1=key pressed | |
109 anda #$7F keep only keys, bit 0=off 1=on | |
110 beq L0082 no keys pressed, try next column | |
111 ldb #$FF preset counter to -1 | |
1327 | 112 L0077 incb |
1360 | 113 lsra bit test regA |
114 bcc L007E no key so branch | |
115 lbsr L010E convert column/row to matrix value and store it | |
116 L007E cmpb #$06 max counter | |
117 blo L0077 loop if more bits to test | |
118 L0082 inc <G.KeyFlg counter; used here for column | |
119 orcc #Carry bit marker; disable strobe | |
120 rol $02,x shift to next column | |
121 bcs L006E not finished with columns so loop | |
122 lbsr L0166 simultaneous check; recover key matrix value | |
123 bmi L00F5 invalid so go | |
124 cmpa <G.LKeyCd last keyboard code | |
1327 | 125 bne L0095 |
1360 | 126 inc <G.KySame same key flag ?counter? |
127 L0095 sta <G.LKeyCd setup for last key pressed | |
128 beq L00B5 if @ key, use lookup table | |
129 suba #$1A the key value (matrix) of Z | |
130 bhi L00B5 not a letter so go | |
131 adda #$1A restore regA | |
132 ldb <G.CntlDn CTRL flag | |
133 bne L00E0 CTRL is down so go | |
134 adda #$40 convert to ASCII value; all caps | |
135 ldb <G.ShftDn shift key flag | |
136 ldy <G.CurDev get current device static memory pointer | |
1415
76137b27060d
cc3io.asm: fixed issue with keyboard mouse being reset when CLEARing, still
boisy
parents:
1360
diff
changeset
|
137 eorb <V.ULCase,y caps lock and keyboard mouse flags |
1360 | 138 andb #CapsLck test caps flag |
139 bne L00E0 not shifted so go | |
140 adda #$20 convert to ASCII lower case | |
1327 | 141 bra L00E0 |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
142 * not a letter key, use the special keycode lookup table at L01DC. |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
143 * Entry: regA = table index (matrix scancode-26) |
1360 | 144 L00B5 ldb #$03 three entries per key (normal,shift,ctrl) |
145 mul convert index to table offset | |
146 lda <G.ShftDn shift key flag | |
147 beq L00BF not shifted so go | |
148 incb adjust offset for SHIFTed entry | |
1327 | 149 bra L00C5 |
1360 | 150 L00BF lda <G.CntlDn CTRL flag |
151 beq L00C5 adjust offset for CONTROL entry | |
1327 | 152 addb #$02 |
1360 | 153 L00C5 ldx <G.CurDev point X to device's static memory |
1592 | 154 lda <V.KySnsFlg,x key sense flag |
1360 | 155 beq L00D0 not set so go |
156 cmpb #$11 spacebar | |
157 ble L00F3 must be an arrow so go | |
158 L00D0 cmpb #$4B ALT key? (was cmpb #$4C) | |
159 blt L00D8 not ALT, CTRL, F1, F2, or SHIFT so go | |
160 inc <G.AltDwn flag special keys (ALT,CTRL) | |
161 subb #$06 and adjust offset to skip them | |
162 L00D8 leax >L01DC,pcr decode table | |
1327 | 163 lda b,x |
1360 | 164 bmi L00F6 if regA = $81 - $84, special key |
1254 | 165 * several entries to this routine from any key press; regA is already ASCII |
1360 | 166 L00E0 ldb <G.AltDwn was ALT flagged? |
167 beq L00F0 no so go | |
168 cmpa #$3F ? | |
169 bls L00EE # or code | |
170 cmpa #$5B [ | |
171 bhs L00EE capital letter so go | |
172 ora #$20 convert to lower case | |
173 L00EE ora #$80 set for ALT characters | |
174 L00F0 andcc #^Negative not negative | |
1327 | 175 rts |
1360 | 176 L00F3 orcc #Negative set negative |
1327 | 177 L00F5 rts |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
178 * Flag that a special key was hit |
1360 | 179 L00F6 inc <G.CapLok caps lock/SysRq |
180 inc <G.Clear one shot caps lock/SysRq | |
1327 | 181 bra L00F0 |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
182 * Calculate arrow keys for key sense byte |
1360 | 183 L00FC pshs b,a convert column into power of 2 |
1327 | 184 clrb |
185 orcc #Carry | |
186 inca | |
187 L0102 rolb | |
188 deca | |
189 bne L0102 | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
190 * bra L0108 WHY IS THIS HERE?? |
1360 | 191 L0108 orb <G.KySns previous value of column |
1327 | 192 stb <G.KySns |
193 puls pc,b,a | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
194 * Check special keys (Shift, Cntrl, Alt) |
1327 | 195 L010E pshs b,a |
1360 | 196 cmpb #$03 is it row 3? |
1327 | 197 bne L011C |
1360 | 198 lda <G.KeyFlg get column # |
199 cmpa #$03 is it column 3?; ie up arrow | |
200 blt L011C if lt must be a letter | |
201 bsr L00FC its a non letter so bsr | |
202 L011C lslb B*8 8 keys per row | |
1327 | 203 lslb |
204 lslb | |
1360 | 205 addb <G.KeyFlg add in the column # |
206 cmpb #$33 ALT | |
1327 | 207 bne L012B |
1360 | 208 inc <G.AltDwn ALT down flag |
1327 | 209 ldb #$04 |
210 bra L0108 | |
1360 | 211 L012B cmpb #$34 CTRL |
1327 | 212 bne L0135 |
1360 | 213 inc <G.CntlDn CTRL down flag |
1327 | 214 ldb #$02 |
215 bra L0108 | |
1360 | 216 L0135 cmpb #$37 SHIFT key |
1327 | 217 bne L013F |
1360 | 218 com <G.ShftDn SHIFT down flag |
1327 | 219 ldb #$01 |
220 bra L0108 | |
1254 | 221 * check how many key (1-3) are currently being pressed |
1327 | 222 L013F pshs x |
1360 | 223 leax <$2D,u 1st key table |
1327 | 224 bsr L014A |
225 puls x | |
226 puls pc,b,a | |
227 L014A pshs a | |
228 lda ,x | |
229 bpl L0156 | |
230 stb ,x | |
231 ldb #$01 | |
232 puls pc,a | |
233 L0156 lda $01,x | |
234 bpl L0160 | |
235 stb $01,x | |
236 ldb #$02 | |
237 puls pc,a | |
238 L0160 stb $02,x | |
239 ldb #$03 | |
240 puls pc,a | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
241 * simultaneous key test |
1327 | 242 L0166 pshs y,x,b |
1360 | 243 ldb <G.KTblLC key table entry # |
1327 | 244 beq L019D |
1360 | 245 leax <$2A,u point to 2nd key table |
1327 | 246 pshs b |
1360 | 247 L0171 leay <$2D,u 1st key table |
1327 | 248 ldb #$03 |
1360 | 249 lda ,x get key #1 |
250 bmi L018F go if invalid? (no key) | |
251 L017A cmpa ,y is it a match? | |
252 bne L0184 go if not a matched key | |
1327 | 253 clr ,y |
1360 | 254 com ,y set value to $FF |
1327 | 255 bra L018F |
256 L0184 leay $01,y | |
257 decb | |
258 bne L017A | |
259 lda #$FF | |
260 sta ,x | |
1360 | 261 dec <G.KTblLC key table entry# |
1327 | 262 L018F leax $01,x |
1360 | 263 dec ,s column counter |
1327 | 264 bne L0171 |
265 leas $01,s | |
1360 | 266 ldb <G.KTblLC key table entry (can test for 3 simul keys) |
1327 | 267 beq L019D |
268 bsr L01C4 | |
1360 | 269 L019D leax <$2D,u 1st key table |
1327 | 270 lda #$03 |
271 L01A2 ldb ,x+ | |
272 bpl L01B5 | |
273 deca | |
274 bne L01A2 | |
1360 | 275 ldb <G.KTblLC key table entry (can test for 3 simul keys) |
1327 | 276 beq L01C0 |
277 decb | |
1360 | 278 leax <$2A,u 2nd key table |
1327 | 279 lda b,x |
280 bra L01BE | |
281 L01B5 tfr b,a | |
1360 | 282 leax <$2A,u 2nd key table |
1327 | 283 bsr L014A |
284 stb <G.KTblLC | |
285 L01BE puls pc,y,x,b | |
1360 | 286 L01C0 orcc #Negative flag negative |
1327 | 287 puls pc,y,x,b |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
288 * Sort 3 byte packet @ G.2Key1 according to sign of each byte |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
289 * so that positive #'s are at beginning & negative #'s at end |
1360 | 290 L01C4 leax <$2A,u 2nd key table |
291 bsr L01CF sort bytes 1 & 2 | |
1327 | 292 leax $01,x |
1360 | 293 bsr L01CF sort bytes 2 & 3 |
294 leax -$01,x sort 1 & 2 again (fall thru for third pass) | |
295 L01CF ldb ,x get current byte | |
296 bpl L01DB positive - no swap | |
297 lda $01,x get next byte | |
298 bmi L01DB negative - no swap | |
299 std ,x swap the bytes | |
1327 | 300 L01DB rts |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
301 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
302 * Special Key Codes Table : 3 entries per key - Normal, Shift, Control |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
303 * They are in COCO keyboard scan matrix order; the alphabetic and meta |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
304 * control keys are handled elsewhere. See INSIDE OS9 LEVEL II p.4-1-7 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
305 L01DC fcb $40,$60,$00 '@,'`,null |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
306 fcb $0c,$1c,$13 UP ARROW: FF, FS,DC3 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
307 fcb $0a,$1a,$12 DOWN ARROW: LF,SUB,DC2 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
308 fcb $08,$18,$10 LEFT ARROW: BS,CAN,DLE |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
309 fcb $09,$19,$11 RIGHT ARROW: HT, EM,DC1 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
310 fcb $20,$20,$20 SPACEBAR |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
311 fcb $30,$30,$81 '0,'0,$81 (caps lock toggle) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
312 fcb $31,$21,$7c '1,'!,'| |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
313 fcb $32,$22,$00 '2,'",null |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
314 fcb $33,$23,$7e '3,'#,'~ |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
315 fcb $34,$24,$1d '4,'$,GS (was null) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
316 fcb $35,$25,$1e '5,'%,RS (was null) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
317 fcb $36,$26,$1f '6,'&,US (was null) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
318 fcb $37,$27,$5e '7,'','^ |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
319 fcb $38,$28,$5b '8,'(,'[ |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
320 fcb $39,$29,$5d '9,'),'] |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
321 fcb $3a,$2a,$00 ':,'*,null |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
322 fcb $3b,$2b,$7f ';,'+,DEL |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
323 fcb $2c,$3c,$7b ',,'<,'{ |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
324 fcb $2d,$3d,$5f '-,'=,'_ |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
325 fcb $2e,$3e,$7d '.,'>,'} |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
326 fcb $2f,$3f,$5c '/,'?,'\ |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
327 fcb $0d,$0d,$0d ENTER key |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
328 fcb $82,$83,$84 CLEAR key (NextWin, PrevWin, KbdMouse toggle) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
329 fcb $05,$03,$1b BREAK key (ENQ,ETX,ESC) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
330 fcb $31,$33,$35 F1 key (converts to $B1,$B3,$B5) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
331 fcb $32,$34,$36 F2 key (converts to $B2,$B4,$B6) |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
332 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
333 *L01DC fdb $4060,$000c,$1c13,$0a1a,$1208,$1810,$0919,$1120 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
334 * fdb $2020,$3030,$8131,$217c,$3222,$0033,$237e,$3424 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
335 * fdb $0035,$2500,$3626,$0037,$275e,$3828,$5b39,$295d |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
336 * fdb $3a2a,$003b,$2b7f,$2c3c,$7b2d,$3d5f,$2e3e,$7d2f |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
337 * fdb $3f5c,$0d0d,$0d82,$8384,$0503,$1b31,$3335,$3234 |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
338 * fcb $36 |
1254 | 339 |
1327 | 340 * Init and Term do nothing for this CoCo keyboard subroutine module |
341 Init | |
342 Term clrb | |
343 rts | |
1254 | 344 |
1327 | 345 * This entry point tests for the F1/F2 function keys on a CoCo 3 |
346 * keyboard. | |
347 * Exit: A = Function keys pressed (Bit 0 = F1, Bit 2 = F2) | |
1933 | 348 FuncKeys ldu <D.CCMem get VTIO global mem pointer into U |
1360 | 349 ldx #PIA0Base get address of PIA #0 |
350 clra clear A | |
351 ldb #%11011111 strobe column #6 of PIA #0 | |
1327 | 352 stb $02,x |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
353 IFNE H6309 |
1360 | 354 tim #%01000000,0,x F1 down? |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
355 ELSE |
1360 | 356 ldb ,x read PIA #0 |
357 bitb #%01000000 test for F1 function key | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
358 ENDC |
1360 | 359 bne CheckF2 branch if set (key not down) |
360 inca flag F1 as down | |
361 CheckF2 ldb #%10111111 strobe column #7 PIA #0 | |
1327 | 362 stb $02,x |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
363 IFNE H6309 |
1360 | 364 tim #%01000000,0,x F2 down? |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
365 ELSE |
1360 | 366 ldb ,x read PIA #0 |
367 bitb #%01000000 test for F2 function key | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
368 ENDC |
1327 | 369 bne L024C |
1360 | 370 ora #$04 flag F2 as down |
1327 | 371 L024C rts |
372 | |
1338
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
373 emod |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
374 eom equ * |
b3caa1b456ed
Additional comments and some changes by the Rodney man!
boisy
parents:
1328
diff
changeset
|
375 end |