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