Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | - | 1 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 1 |
2 | |||
3 | |||
4 | LOC OBJECT CODE LINE SOURCE TEXT |
||
5 | VALUE |
||
6 | |||
7 | 00001 |
||
8 | 00002 list p=18f4420 |
||
9 | 00003 #include p18f4420.inc |
||
10 | 00001 LIST |
||
11 | 00002 |
||
12 | 00003 ;========================================================================== |
||
13 | 00004 ; Build date : May 15 2016 |
||
14 | 00005 ; MPASM PIC18F4420 processor include |
||
15 | 00006 ; |
||
16 | 00007 ; (c) Copyright 1999-2016 Microchip Technology, All rights reserved |
||
17 | 00008 ;========================================================================== |
||
18 | 00009 |
||
19 | 01447 LIST |
||
20 | 00004 #include defs.inc |
||
21 | 00327 LIST |
||
22 | 00005 #include equ.inc |
||
23 | 00145 LIST |
||
24 | 00006 |
||
25 | 00007 |
||
26 | 00008 Startup code 0x0000 |
||
27 | 000000 EF?? F??? 00009 goto Start |
||
28 | 000004 0000 00010 nop |
||
29 | 00011 |
||
30 | 00012 HighISR code 0x0008 |
||
31 | 000008 B2F2 00013 btfsc INTCON, INT0IF |
||
32 | 00000A D??? 00014 rcall KbdInt ; INT0 -> dato da tastiera |
||
33 | 00000C B2F0 00015 btfsc INTCON3, INT2IF |
||
34 | 00000E 00FF 00016 reset ; INT2 -> reset |
||
35 | 000010 92F2 00017 bcf INTCON, INT0IF ; resetta flag INT0 |
||
36 | 000012 0011 00018 retfie FAST |
||
37 | 00019 |
||
38 | 00020 LowISR code 0x0018 |
||
39 | 000018 A0F0 00021 btfss INTCON3, INT1IF |
||
40 | 00001A 0010 00022 retfie ; INT non generato da INT1 (linea DRQ) |
||
41 | 00001C 90F0 00023 bcf INTCON3, INT1IF |
||
42 | 00001E 8E?? 00024 bsf KFRFlag, KFRFULL ; segnala registri da leggere |
||
43 | 000020 0010 00025 retfie |
||
44 | 00026 |
||
45 | 00027 |
||
46 | 00028 code |
||
47 | 00029 |
||
48 | 000000 00030 KbdInt: |
||
49 | 000000 D??? 00031 rcall RxKeyb ; riceve byte da tastiera |
||
50 | 00032 SCLOCKL ; disabilita TX da tastiera |
||
51 | 000002 988A M bcf LATB, KCLKO |
||
52 | 000004 B0?? 00033 btfsc KStatus, KRESET ; test reset |
||
53 | 000006 00FF 00034 reset ; ricevuto reset in -> reset |
||
54 | 000008 B2?? 00035 btfsc KStatus, KTIMEO ; test timeout |
||
55 | 00000A 0012 00036 return ; scarta dato ricevuto se timeout |
||
56 | 00000C AE?? 00037 btfss KStatus, KBRX ; test ricezione full |
||
57 | 00000E 0012 00038 return ; ricezione incompleta -> scarta dato |
||
58 | 00039 ldw KStatus ; test errore ricezione |
||
59 | 000010 50?? M movf KStatus, w |
||
60 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 2 |
||
61 | |||
62 | |||
63 | LOC OBJECT CODE LINE SOURCE TEXT |
||
64 | VALUE |
||
65 | |||
66 | 000012 0B0C 00040 andlw KBRXERR |
||
67 | 000014 E0?? 00041 bz KbdInt10 ; dato ricevuto OK |
||
68 | 000016 0EFE 00042 movlw KBD_RESEND ; richiesta di re-invio alla tastiera |
||
69 | 000018 D??? 00043 rcall TxKeyb |
||
70 | 00001A B0?? 00044 btfsc KStatus, KRESET ; test reset |
||
71 | 00001C 00FF 00045 reset ; ricevuto reset in -> reset |
||
72 | 00001E 0012 00046 return ; ignora altri errori |
||
73 | 00047 |
||
74 | 000020 00048 KbdInt10: |
||
75 | 000020 0E00 00049 movlw 0x00 ; scarta codice 00 (overrun) |
||
76 | 000022 5C?? 00050 subwf KBuf, W |
||
77 | 000024 E0?? 00051 bz KbdInt99 |
||
78 | 000026 0EFF 00052 movlw 0xFF ; scarta codice FF (overrun/error) |
||
79 | 000028 5C?? 00053 subwf KBuf, W |
||
80 | 00002A E0?? 00054 bz KbdInt99 |
||
81 | 00002C 0EFE 00055 movlw KBD_RESEND ; scarta richiesta resend |
||
82 | 00002E 5C?? 00056 subwf KBuf, W |
||
83 | 000030 E0?? 00057 bz KbdInt99 |
||
84 | 000032 0EFA 00058 movlw KBD_ACK ; scarta ACK |
||
85 | 000034 5C?? 00059 subwf KBuf, W |
||
86 | 000036 E0?? 00060 bz KbdInt99 |
||
87 | 000038 0EAA 00061 movlw KBD_BAT ; scarta BAT |
||
88 | 00003A 5C?? 00062 subwf KBuf, W |
||
89 | 00003C E1?? 00063 bnz KbdInt11 |
||
90 | 00003E 8C?? 00064 bsf KbdFlag, KBBAT |
||
91 | 000040 88?? 00065 bsf KbdFlag, KBBAT2 |
||
92 | 000042 9E?? 00066 bcf KbdFlag2, KBNOBAT |
||
93 | 000044 D??? 00067 bra KbdInt99 |
||
94 | 00068 |
||
95 | 000046 00069 KbdInt11: |
||
96 | 000046 0EFC 00070 movlw KBD_NOBAT ; scarta BAT failure |
||
97 | 000048 5C?? 00071 subwf KBuf, W |
||
98 | 00004A E1?? 00072 bnz KbdInt12 |
||
99 | 00004C 9C?? 00073 bcf KbdFlag, KBBAT |
||
100 | 00004E 98?? 00074 bcf KbdFlag, KBBAT2 |
||
101 | 000050 8E?? 00075 bsf KbdFlag2, KBNOBAT |
||
102 | 00076 |
||
103 | 000052 00077 KbdInt99: |
||
104 | 00078 SCLOCKH ; abilita TX da tastiera |
||
105 | 000052 888A M bsf LATB, KCLKO |
||
106 | 000054 0012 00079 return |
||
107 | 00080 |
||
108 | 000056 00081 KbdInt12: ; inserisce byte in coda |
||
109 | 000056 0EF5 00082 movlw (RXBUFLEN - 9) ; lascia un limite di guardia di 8 bytes |
||
110 | 000058 5C?? 00083 subwf RxCnt,W ; RxCnt - (RXBUFLEN - 9)) |
||
111 | 00005A B0D8 00084 btfsc STATUS, C ; C = 0 -> OK - spazio disponibile in coda |
||
112 | 00005C 8E?? 00085 bsf RxFlag, RXOVR ; segnala condizione overrun |
||
113 | 00086 ldw KBuf ; memorizza byte in coda |
||
114 | 00005E 50?? M movf KBuf, w |
||
115 | 000060 6EDE 00087 movwf POSTINC2 |
||
116 | 000062 2A?? 00088 incf RxCnt, f ; incrementa contatore bytes in coda |
||
117 | 000064 0E3E 00089 movlw LOW(RxBufEnd) ; coda circolare - test puntatore |
||
118 | 000066 5CD9 00090 subwf FSR2L, W ; FSR2L - LOW(RxBufEnd) |
||
119 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 3 |
||
120 | |||
121 | |||
122 | LOC OBJECT CODE LINE SOURCE TEXT |
||
123 | VALUE |
||
124 | |||
125 | 000068 0E01 00091 movlw HIGH(RxBufEnd) ; limite superiore H |
||
126 | 00006A 58DA 00092 subwfb FSR2H, W ; FSR2H - HIGH(RxBufEnd) |
||
127 | 00006C B0D8 00093 btfsc STATUS, C ; C = 0 se FSR2 < RxBufEnd |
||
128 | 00006E EE20 F040 00094 lfsr FSR2, RxBuffer ; reimposta puntatore a inizio buffer |
||
129 | 00095 |
||
130 | 000072 00096 KbdInt20: |
||
131 | 000072 AE?? 00097 btfss RxFlag, RXOVR ; se in condizioni di overrun disabilita TX |
||
132 | 000074 D??? 00098 bra KbdInt99 ; riabilita trasmissione da tastiera |
||
133 | 000076 0012 00099 return ; esce con CLK OUT LOW |
||
134 | 00100 |
||
135 | 000078 00101 RxKeyb: |
||
136 | 000078 6A?? 00102 clrf KStatus ; azzera status |
||
137 | 00007A 0E08 00103 movlw D'8' ; contatore 8 bit |
||
138 | 00007C 6E?? 00104 movwf KCnt |
||
139 | 00007E 0E01 00105 movlw D'1' ; parity bit (odd) |
||
140 | 000080 6E?? 00106 movwf KPar |
||
141 | 000082 0E01 00107 movlw TMR0P4 ; TMR0 stop, prescaler = 4 |
||
142 | 000084 6ED5 00108 movwf T0CON ; modo 16 bit |
||
143 | 000086 94F2 00109 bcf INTCON, TMR0IF ; azzera flag timeout |
||
144 | 000088 0E9E 00110 movlw HIGH(T20MS) ; imposta timeout |
||
145 | 00008A 6ED7 00111 movwf TMR0H ; caricare prima TMR0H |
||
146 | 00008C 6E?? 00112 movwf T0CntH |
||
147 | 00008E 0E58 00113 movlw LOW(T20MS) |
||
148 | 000090 6ED6 00114 movwf TMR0L ; carica TMR0L/H |
||
149 | 000092 6E?? 00115 movwf T0CntL |
||
150 | 000094 8ED5 00116 bsf T0CON, TMR0ON ; start Timer 0 |
||
151 | 00117 |
||
152 | 000096 00118 RxKeyb1: ; attesa CLK IN -> LOW |
||
153 | 000096 D??? 00119 rcall GetLine |
||
154 | 000098 E6?? 00120 bmi RxKeyb1 ; CLK IN = HIGH - loop |
||
155 | 00121 |
||
156 | 00009A 00122 RxKeyb2: ; loop attesa CLK IN -> HIGH |
||
157 | 00009A D??? 00123 rcall GetLine |
||
158 | 00009C E7?? 00124 bpl RxKeyb2 ; CLK IN = LOW - loop |
||
159 | 00125 |
||
160 | 00009E 00126 RxKeyb3: ; loop attesa CLK IN -> LOW |
||
161 | 00009E D??? 00127 rcall GetLine |
||
162 | 0000A0 E6?? 00128 bmi RxKeyb3 ; CLK IN = HIGH - loop |
||
163 | 0000A2 E3?? 00129 bnc RxKeyb4 ; no parity se DATA IN = LOW |
||
164 | 0000A4 2A?? 00130 incf KPar, f ; incrementa parity |
||
165 | 0000A6 80D8 00131 bsf STATUS, C ; forza CARRY = 1 (DATA IN = HIGH) |
||
166 | 00132 |
||
167 | 0000A8 00133 RxKeyb4: ; aggiorna KBuf |
||
168 | 0000A8 32?? 00134 rrcf KBuf, f ; KBuf<7> = CARRY |
||
169 | 0000AA 2E?? 00135 decfsz KCnt, f ; decrementa contatore 8 bit |
||
170 | 0000AC D??? 00136 bra RxKeyb2 ; loop 8 bit |
||
171 | 00137 |
||
172 | 0000AE 00138 RxKeyb5: ; attesa CLK IN -> HIGH |
||
173 | 0000AE D??? 00139 rcall GetLine |
||
174 | 0000B0 E7?? 00140 bpl RxKeyb5 ; CLK IN = LOW - loop |
||
175 | 00141 |
||
176 | 0000B2 00142 RxKeyb6: ; attesa CLK IN -> LOW |
||
177 | 0000B2 D??? 00143 rcall GetLine |
||
178 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 4 |
||
179 | |||
180 | |||
181 | LOC OBJECT CODE LINE SOURCE TEXT |
||
182 | VALUE |
||
183 | |||
184 | 0000B4 E6?? 00144 bmi RxKeyb6 ; CLK IN = HIGH - loop |
||
185 | 0000B6 34?? 00145 rlcf KCnt, W ; C = parity bit -> W<0> = parity bit |
||
186 | 0000B8 1A?? 00146 xorwf KPar, f ; confronto parity ricevuta con parity calcolata |
||
187 | 0000BA 30?? 00147 rrcf KPar, W ; C = confronto parity |
||
188 | 0000BC E3?? 00148 bnc RxKeyb7 ; C = 0 -> parity OK |
||
189 | 0000BE 84?? 00149 bsf KStatus, KPARY ; imposta errore parity |
||
190 | 00150 |
||
191 | 0000C0 00151 RxKeyb7: ; attesa CLK IN -> HIGH |
||
192 | 0000C0 D??? 00152 rcall GetLine |
||
193 | 0000C2 E7?? 00153 bpl RxKeyb7 ; CLK IN = LOW - loop |
||
194 | 00154 |
||
195 | 0000C4 00155 RxKeyb8: ; attesa CLK IN -> LOW |
||
196 | 0000C4 D??? 00156 rcall GetLine |
||
197 | 0000C6 E6?? 00157 bmi RxKeyb8 ; CLK IN = HIGH - loop |
||
198 | 0000C8 E2?? 00158 bc RxKeyb9 ; C = 1 -> stop bit OK |
||
199 | 0000CA 86?? 00159 bsf KStatus, KSTOP ; segnala errore bit stop errato |
||
200 | 00160 |
||
201 | 0000CC 00161 RxKeyb9: ; attesa CLK IN -> HIGH - fine trasmissione |
||
202 | 0000CC D??? 00162 rcall GetLine |
||
203 | 0000CE E7?? 00163 bpl RxKeyb9 ; CLK IN = LOW - loop |
||
204 | 0000D0 8E?? 00164 bsf KStatus, KBRX ; segnala ricezione completata |
||
205 | 0000D2 9ED5 00165 bcf T0CON, TMR0ON ; stop Timer 0 |
||
206 | 0000D4 94F2 00166 bcf INTCON, TMR0IF ; azzera flag timeout |
||
207 | 0000D6 0012 00167 return |
||
208 | 00168 |
||
209 | 0000D8 00169 GetLine: |
||
210 | 0000D8 B4F2 00170 btfsc INTCON, TMR0IF ; test timeout |
||
211 | 0000DA D??? 00171 bra GetLine2 ; timeout |
||
212 | 00172 ldw PORTB |
||
213 | 0000DC 5081 M movf PORTB, w |
||
214 | 0000DE 0B0D 00173 andlw RBMASK ; maschera bit utili |
||
215 | 0000E0 6E?? 00174 movwf TmpB ; salva temporaneo |
||
216 | 00175 ldw PORTB |
||
217 | 0000E2 5081 M movf PORTB, w |
||
218 | 0000E4 0B0D 00176 andlw RBMASK ; maschera bit utili |
||
219 | 0000E6 62?? 00177 cpfseq TmpB ; confronta con lettura precedente |
||
220 | 0000E8 D??? 00178 bra GetLine ; attesa linee stabili o timeout |
||
221 | 0000EA A4?? 00179 btfss TmpB, RESIN ; test asserzione reset da host |
||
222 | 0000EC D??? 00180 bra GetLine1 ; reset da host |
||
223 | 0000EE 98D8 00181 bcf STATUS, N ; N = 0 se CLK IN = LOW |
||
224 | 0000F0 B6?? 00182 btfsc TmpB, KCLKIN |
||
225 | 0000F2 88D8 00183 bsf STATUS, N ; N = 1 se CLK IN = HIGH |
||
226 | 0000F4 90D8 00184 bcf STATUS, C ; C = 0 se DATA IN = LOW |
||
227 | 0000F6 B0?? 00185 btfsc TmpB, KDATAIN |
||
228 | 0000F8 80D8 00186 bsf STATUS, C ; C = 1 se DATA IN = HIGH |
||
229 | 0000FA 0012 00187 return ; C = DATA IN, N = CLK IN |
||
230 | 00188 |
||
231 | 0000FC 00189 GetLine1: |
||
232 | 0000FC 80?? 00190 bsf KStatus, KRESET ; segnala reset |
||
233 | 0000FE 0006 00191 pop ; scarta indirizzo di ritorno |
||
234 | 000100 0012 00192 return ; uscita |
||
235 | 00193 |
||
236 | 000102 00194 GetLine2: |
||
237 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 5 |
||
238 | |||
239 | |||
240 | LOC OBJECT CODE LINE SOURCE TEXT |
||
241 | VALUE |
||
242 | |||
243 | 000102 82?? 00195 bsf KStatus, KTIMEO ; segnala timeout |
||
244 | 000104 9ED5 00196 bcf T0CON, TMR0ON ; stop Timer 0 |
||
245 | 000106 94F2 00197 bcf INTCON, TMR0IF ; azzera flag timeout |
||
246 | 000108 0006 00198 pop ; scarta indirizzo di ritorno |
||
247 | 00010A 0012 00199 return ; uscita |
||
248 | 00200 |
||
249 | 00201 |
||
250 | 00010C 00202 TxKeyb: |
||
251 | 00010C 6E?? 00203 movwf KBuf ; salva dato da trasmettere |
||
252 | 00010E 6A?? 00204 clrf KStatus ; azzera status |
||
253 | 000110 0E08 00205 movlw TMR0P0 ; TMR0 stop, no prescaler, modo 16 bit |
||
254 | 000112 6ED5 00206 movwf T0CON |
||
255 | 000114 94F2 00207 bcf INTCON, TMR0IF ; azzera flag timeout |
||
256 | 000116 0EFE 00208 movlw HIGH(T100US) ; imposta timeout 100us |
||
257 | 000118 6ED7 00209 movwf TMR0H ; caricare prima TMR0H |
||
258 | 00011A 0E0C 00210 movlw LOW(T100US) |
||
259 | 00011C 6ED6 00211 movwf TMR0L ; carica TMR0L/H |
||
260 | 00011E 0E08 00212 movlw D'8' ; contatore 8 bit |
||
261 | 000120 6E?? 00213 movwf KCnt |
||
262 | 000122 0E01 00214 movlw D'1' ; parity bit (odd) |
||
263 | 000124 6E?? 00215 movwf KPar |
||
264 | 00216 SCLOCKL ; CLK OUT -> LOW - request to send |
||
265 | 000126 988A M bcf LATB, KCLKO |
||
266 | 000128 8ED5 00217 bsf T0CON, TMR0ON ; start Timer 0 |
||
267 | 00218 |
||
268 | 00012A 00219 TxKeyb1: ; ritardo 100us |
||
269 | 00012A A4F2 00220 btfss INTCON, TMR0IF |
||
270 | 00012C D??? 00221 bra TxKeyb1 ; loop ritardo |
||
271 | 00222 SDATAL ; DATA OUT -> LOW (start bit) |
||
272 | 00012E 9A8A M bcf LATB, KDATAO |
||
273 | 000130 9ED5 00223 bcf T0CON, TMR0ON ; stop Timer 0 |
||
274 | 000132 94F2 00224 bcf INTCON, TMR0IF ; azzera flag timeout |
||
275 | 000134 0E01 00225 movlw TMR0P4 ; TMR0 stop, prescaler = 4 |
||
276 | 000136 6ED5 00226 movwf T0CON ; modo 16 bit |
||
277 | 000138 0E9E 00227 movlw HIGH(T20MS) ; imposta timeout |
||
278 | 00013A 6ED7 00228 movwf TMR0H ; caricare prima TMR0H |
||
279 | 00013C 0E58 00229 movlw LOW(T20MS) |
||
280 | 00013E 6ED6 00230 movwf TMR0L ; carica TMR0L/H |
||
281 | 000140 8ED5 00231 bsf T0CON, TMR0ON ; start Timer 0 |
||
282 | 00232 SCLOCKH ; CLK OUT -> HIGH (rilascia clock) |
||
283 | 000142 888A M bsf LATB, KCLKO |
||
284 | 00233 |
||
285 | 000144 00234 TxKeyb2: ; attesa CLK IN -> LOW |
||
286 | 000144 D??? 00235 rcall GetLine |
||
287 | 000146 E6?? 00236 bmi TxKeyb2 ; CLK IN = HIGH -> loop |
||
288 | 00237 |
||
289 | 000148 00238 TxKeyb3: ; loop 8 bit |
||
290 | 000148 32?? 00239 rrcf KBuf ; C = KBuf<0> - bit da inviare |
||
291 | 00014A E3?? 00240 bnc TxKeyb4 ; C = 0 -> DATA OUT = LOW |
||
292 | 00014C 2A?? 00241 incf KPar, f ; C = 1 -> aggiorna parity |
||
293 | 00242 SDATAH ; DATA OUT = HIGH |
||
294 | 00014E 8A8A M bsf LATB, KDATAO |
||
295 | 000150 D??? 00243 bra TxKeyb5 |
||
296 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 6 |
||
297 | |||
298 | |||
299 | LOC OBJECT CODE LINE SOURCE TEXT |
||
300 | VALUE |
||
301 | |||
302 | 00244 |
||
303 | 000152 00245 TxKeyb4: |
||
304 | 00246 SDATAL ; DATA OUT = LOW |
||
305 | 000152 9A8A M bcf LATB, KDATAO |
||
306 | 00247 |
||
307 | 000154 00248 TxKeyb5: ; invia bit |
||
308 | 000154 D??? 00249 rcall GetLine ; attende CLK IN -> HIGH |
||
309 | 000156 E7?? 00250 bpl TxKeyb5 ; CLK IN = LOW -> loop |
||
310 | 00251 |
||
311 | 000158 00252 TxKeyb6: |
||
312 | 000158 D??? 00253 rcall GetLine ; attende CLK IN -> LOW |
||
313 | 00015A E6?? 00254 bmi TxKeyb6 ; CLK IN = HIGH -> loop |
||
314 | 00015C 2E?? 00255 decfsz KCnt, f ; decrementa contatore 8 bit |
||
315 | 00015E D??? 00256 bra TxKeyb3 ; loop 8 bit |
||
316 | 000160 32?? 00257 rrcf KPar, f ; C = KPar<0> -> parity bit |
||
317 | 000162 E3?? 00258 bnc TxKeyb7 ; C = 0 -> DATA OUT = LOW |
||
318 | 00259 SDATAH ; DATA OUT = HIGH |
||
319 | 000164 8A8A M bsf LATB, KDATAO |
||
320 | 000166 D??? 00260 bra TxKeyb8 |
||
321 | 00261 |
||
322 | 000168 00262 TxKeyb7: |
||
323 | 00263 SDATAL ; DATA OUT = LOW |
||
324 | 000168 9A8A M bcf LATB, KDATAO |
||
325 | 00264 |
||
326 | 00016A 00265 TxKeyb8: |
||
327 | 00016A D??? 00266 rcall GetLine ; attende CLK IN -> HIGH |
||
328 | 00016C E7?? 00267 bpl TxKeyb8 ; CLK IN = LOW -> loop |
||
329 | 00268 |
||
330 | 00016E 00269 TxKeyb9: |
||
331 | 00016E D??? 00270 rcall GetLine ; attende CLK IN -> LOW |
||
332 | 000170 E6?? 00271 bmi TxKeyb9 ; CLK IN = HIGH -> loop |
||
333 | 00272 SDATAH ; DATA OUT -> HIGH - stop bit |
||
334 | 000172 8A8A M bsf LATB, KDATAO |
||
335 | 00273 |
||
336 | 000174 00274 TxKeyb10: |
||
337 | 000174 D??? 00275 rcall GetLine ; attende CLK IN -> HIGH |
||
338 | 000176 E7?? 00276 bpl TxKeyb10 ; CLK IN = LOW -> loop |
||
339 | 00277 |
||
340 | 000178 00278 TxKeyb11: |
||
341 | 000178 D??? 00279 rcall GetLine ; attende CLK IN -> LOW |
||
342 | 00017A E6?? 00280 bmi TxKeyb11 ; CLK IN = HIGH -> loop |
||
343 | 00017C E3?? 00281 bnc TxKeyb12 ; C = 0 -> DATA IN = LOW - ack bit ok |
||
344 | 00017E 88?? 00282 bsf KStatus, KBACK ; segnala errore ack bit |
||
345 | 00283 |
||
346 | 000180 00284 TxKeyb12: |
||
347 | 000180 D??? 00285 rcall GetLine ; attende CLK IN -> HIGH |
||
348 | 000182 E7?? 00286 bpl TxKeyb12 ; CLK IN = LOW -> loop |
||
349 | 000184 8C?? 00287 bsf KStatus, KBTX ; segnala trasmissione completata |
||
350 | 000186 9ED5 00288 bcf T0CON, TMR0ON ; stop Timer 0 |
||
351 | 000188 94F2 00289 bcf INTCON, TMR0IF ; azzera flag timeout |
||
352 | 00018A 0012 00290 return |
||
353 | 00291 |
||
354 | 00018C 00292 GetKbd: |
||
355 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 7 |
||
356 | |||
357 | |||
358 | LOC OBJECT CODE LINE SOURCE TEXT |
||
359 | VALUE |
||
360 | |||
361 | 00018C EC?? F??? 00293 call RxKeyb ; ricezione entro timeout |
||
362 | 000190 B0?? 00294 btfsc KStatus, KRESET ; test reset |
||
363 | 000192 00FF 00295 reset ; ricevuto reset in -> reset |
||
364 | 000194 B2?? 00296 btfsc KStatus, KTIMEO ; test timeout |
||
365 | 000196 D??? 00297 bra GetKbd10 ; errore ricezione |
||
366 | 00298 ldw KStatus ; test errore ricezione |
||
367 | 000198 50?? M movf KStatus, w |
||
368 | 00019A 0B0C 00299 andlw KBRXERR |
||
369 | 00019C E1?? 00300 bnz GetKbd10 ; dato ricevuto errato |
||
370 | 00019E 90D8 00301 bcf STATUS, C ; C = = -> OK |
||
371 | 0001A0 0012 00302 return |
||
372 | 0001A2 00303 GetKbd10: |
||
373 | 0001A2 80D8 00304 bsf STATUS, C ; C = 1 -> errore |
||
374 | 0001A4 0012 00305 return |
||
375 | 00306 |
||
376 | 0001A6 00307 SendLed: |
||
377 | 0001A6 0EED 00308 movlw KBD_SETLED |
||
378 | 0001A8 D??? 00309 rcall SendKbd |
||
379 | 0001AA E2?? 00310 bc SendKbd10 |
||
380 | 00311 ldw LedSt |
||
381 | 0001AC 50?? M movf LedSt, w |
||
382 | 00312 |
||
383 | 0001AE 00313 SendKbd: |
||
384 | 0001AE D??? 00314 rcall TxKeyb |
||
385 | 0001B0 B0?? 00315 btfsc KStatus, KRESET ; test reset |
||
386 | 0001B2 00FF 00316 reset ; ricevuto reset in -> reset |
||
387 | 0001B4 B2?? 00317 btfsc KStatus, KTIMEO ; test timeout |
||
388 | 0001B6 D??? 00318 bra SendKbd10 ; errore |
||
389 | 0001B8 AC?? 00319 btfss KStatus, KBTX ; test trasmissione OK |
||
390 | 0001BA D??? 00320 bra SendKbd10 ; trasmissione fallita - errore |
||
391 | 0001BC AC?? 00321 btfss KStatus, KBTX ; test trasmissione OK |
||
392 | 0001BE D??? 00322 bra SendKbd10 ; trasmissione fallita - errore |
||
393 | 0001C0 B8?? 00323 btfsc KStatus, KBACK ; test errore ACK |
||
394 | 0001C2 D??? 00324 bra SendKbd10 ; errore ACK |
||
395 | 0001C4 D??? 00325 rcall GetKbd ; ricezione da tastiera |
||
396 | 0001C6 E2?? 00326 bc SendKbd10 ; errore ricezione |
||
397 | 0001C8 0EFA 00327 movlw KBD_ACK ; test ACK tastiera |
||
398 | 0001CA 62?? 00328 cpfseq KBuf |
||
399 | 0001CC D??? 00329 bra SendKbd10 ; errore |
||
400 | 0001CE 90D8 00330 bcf STATUS, C ; C = = -> OK |
||
401 | 0001D0 0012 00331 return |
||
402 | 0001D2 00332 SendKbd10: |
||
403 | 0001D2 80D8 00333 bsf STATUS, C ; C = 1 -> errore |
||
404 | 0001D4 0012 00334 return |
||
405 | 00335 |
||
406 | 0001D6 00336 InitIO: |
||
407 | 0001D6 9CD0 00337 bcf RCON, 6 |
||
408 | 0001D8 82D0 00338 bsf RCON, 1 |
||
409 | 0001DA 6AF2 00339 clrf INTCON ; disabilita interrupt |
||
410 | 0001DC 6AF1 00340 clrf INTCON2 ; RB0, RB1, RB2 int su fronte negativo |
||
411 | 0001DE 6AF0 00341 clrf INTCON3 |
||
412 | 0001E0 6A9E 00342 clrf PIR1 |
||
413 | 0001E2 6AA1 00343 clrf PIR2 |
||
414 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 8 |
||
415 | |||
416 | |||
417 | LOC OBJECT CODE LINE SOURCE TEXT |
||
418 | VALUE |
||
419 | |||
420 | 0001E4 6A9D 00344 clrf PIE1 |
||
421 | 0001E6 6AA0 00345 clrf PIE2 |
||
422 | 0001E8 6AC2 00346 clrf ADCON0 ; disabilita modulo A/D |
||
423 | 0001EA 6892 00347 setf DDRA ; tutte le porte in input |
||
424 | 0001EC 6893 00348 setf DDRB |
||
425 | 0001EE 6894 00349 setf DDRC |
||
426 | 0001F0 6895 00350 setf DDRD |
||
427 | 0001F2 6896 00351 setf DDRE |
||
428 | 0001F4 0E0F 00352 movlw B'00001111' ; tutte le porte I/O sono digitali |
||
429 | 0001F6 6EC1 00353 movwf ADCON1 |
||
430 | 0001F8 6889 00354 setf LATA ; tutte le porte I/O a livello alto |
||
431 | 0001FA 688A 00355 setf LATB |
||
432 | 0001FC 688B 00356 setf LATC |
||
433 | 0001FE 688C 00357 setf LATD |
||
434 | 000200 6A8D 00358 clrf LATE ; porta RE a livello basso in uscita |
||
435 | 000202 0EC3 00359 movlw B'11000011' ; RA<0:1> input, le altre output |
||
436 | 000204 6E92 00360 movwf DDRA |
||
437 | 000206 0ECF 00361 movlw B'11001111' ; RB<4:5> in output, le altre in input |
||
438 | 000208 6E93 00362 movwf DDRB |
||
439 | 00020A 6A94 00363 clrf DDRC ; porta C in uscita |
||
440 | 00020C 9C8B 00364 bcf LATC, KBVOFF ; resetta alimentazione tastiera |
||
441 | 00020E 6A96 00365 clrf DDRE ; porta E in uscita |
||
442 | 000210 6AF8 00366 clrf TBLPTRU ; FLASH solo < 64K |
||
443 | 000212 D??? 00367 rcall InitData ; inizializza variabili |
||
444 | 00368 |
||
445 | 000214 00369 Init1: ; attesa linea reset in alta |
||
446 | 000214 A481 00370 btfss PORTB, RESIN |
||
447 | 000216 D??? 00371 bra Init1 |
||
448 | 00372 |
||
449 | 000218 8ED0 00373 bsf RCON, IPEN ; abilita int. priorizzati |
||
450 | 00021A 9EF1 00374 bcf INTCON2, RBPU ; disabilita pull-up su porta B |
||
451 | 00021C 8EF0 00375 bsf INTCON3, INT2IP ; alta priority per INT2 su RB2 (reset in) |
||
452 | 00021E 9CF0 00376 bcf INTCON3, INT1IP ; bassa priority per INT1 su RB1 (linea DRQ) |
||
453 | 000220 88F2 00377 bsf INTCON, INT0IE ; abilita INT0 su RB0 high priority (DATA IN) |
||
454 | 000222 86F0 00378 bsf INTCON3, INT1IE ; abilita INT1 su RB1 (linea DRQ) |
||
455 | 000224 88F0 00379 bsf INTCON3, INT2IE ; abilita INT2 su RB2 (linea reset in) |
||
456 | 000226 8C8B 00380 bsf LATC, KBVOFF ; termina impulso negativo VCC tastiera |
||
457 | 000228 0E0C 00381 movlw LOW(T100US) ; imposta ritardo 100us |
||
458 | 00022A 6E?? 00382 movwf T0CntL |
||
459 | 00022C 0EFE 00383 movlw HIGH(T100US) |
||
460 | 00022E 6E?? 00384 movwf T0CntH |
||
461 | 000230 D??? 00385 rcall Delay_us ; ritardo 100us |
||
462 | 000232 9E8B 00386 bcf LATC, KBVON ; attiva alimentazione tastiera |
||
463 | 000234 0E9C 00387 movlw LOW(T20US) ; imposta ritardo 20us |
||
464 | 000236 6E?? 00388 movwf T0CntL |
||
465 | 000238 0EFF 00389 movlw HIGH(T20US) |
||
466 | 00023A 6E?? 00390 movwf T0CntH |
||
467 | 00023C D??? 00391 rcall Delay_us ; ritardo 20us |
||
468 | 00023E 8E8B 00392 bsf LATC, KBVON ; termina impulso negativo |
||
469 | 000240 0EB0 00393 movlw LOW(T40MS) ; imposta ritardo 40ms per stabilizzare VCC |
||
470 | 000242 6E?? 00394 movwf T0CntL |
||
471 | 000244 0E3C 00395 movlw HIGH(T40MS) |
||
472 | 000246 6E?? 00396 movwf T0CntH |
||
473 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 9 |
||
474 | |||
475 | |||
476 | LOC OBJECT CODE LINE SOURCE TEXT |
||
477 | VALUE |
||
478 | |||
479 | 000248 D??? 00397 rcall Delay_ms ; ritardo 40ms |
||
480 | 00024A 92F2 00398 bcf INTCON, INT0IF ; resetta flag INT0 (eventuali impulsi spuri) |
||
481 | 00024C 0E07 00399 movlw TMR0P256 ; TMR0 stop, prescaler = 256, modo 16 bit |
||
482 | 00024E 6ED5 00400 movwf T0CON |
||
483 | 000250 94F2 00401 bcf INTCON, TMR0IF ; azzera flag timeout |
||
484 | 000252 0E8D 00402 movlw HIGH(T1500MS) ; imposta timeout 1500ms |
||
485 | 000254 6ED7 00403 movwf TMR0H ; caricare prima TMR0H |
||
486 | 000256 0E90 00404 movlw LOW(T1500MS) |
||
487 | 000258 6ED6 00405 movwf TMR0L ; carica TMR0L/H |
||
488 | 00025A 8ED5 00406 bsf T0CON, TMR0ON ; start Timer 0 |
||
489 | 00407 |
||
490 | 00025C 00408 Init2: ; loop attesa tastiera entro timeout 1500ms |
||
491 | 00025C B4F2 00409 btfsc INTCON, TMR0IF |
||
492 | 00025E D??? 00410 bra Init4 ; timeout |
||
493 | 000260 B2F0 00411 btfsc INTCON3, INT2IF |
||
494 | 000262 00FF 00412 reset ; INT2 -> reset |
||
495 | 000264 A2F2 00413 btfss INTCON, INT0IF |
||
496 | 000266 D??? 00414 bra Init2 ; loop |
||
497 | 000268 9ED5 00415 bcf T0CON, TMR0ON ; stop Timer 0 |
||
498 | 00026A 94F2 00416 bcf INTCON, TMR0IF ; azzera flag timeout |
||
499 | 00026C EC?? F??? 00417 call RxKeyb ; INT0 -> riceve dato da tastiera |
||
500 | 000270 B0?? 00418 btfsc KStatus, KRESET ; test reset |
||
501 | 000272 00FF 00419 reset ; ricevuto reset in -> reset |
||
502 | 000274 B2?? 00420 btfsc KStatus, KTIMEO ; test timeout |
||
503 | 000276 D??? 00421 bra Init4 ; scarta dato ricevuto se timeout |
||
504 | 000278 AE?? 00422 btfss KStatus, KBRX ; test ricezione full |
||
505 | 00027A D??? 00423 bra Init4 ; ricezione incompleta -> scarta dato |
||
506 | 00424 ldw KStatus ; test errore ricezione |
||
507 | 00027C 50?? M movf KStatus, w |
||
508 | 00027E 0B0C 00425 andlw KBRXERR |
||
509 | 000280 E1?? 00426 bnz Init4 ; dato ricevuto errato |
||
510 | 000282 0EAA 00427 movlw KBD_BAT ; test BAT OK |
||
511 | 000284 62?? 00428 cpfseq KBuf |
||
512 | 000286 D??? 00429 bra KNoBAT ; no BAT OK ! |
||
513 | 000288 8C?? 00430 bsf KbdFlag, KBBAT ; imposta flag BAT OK |
||
514 | 00028A 88?? 00431 bsf KbdFlag, KBBAT2 ; imposta flag BAT OK |
||
515 | 00028C D??? 00432 bra Init3 |
||
516 | 00433 |
||
517 | 00028E 00434 KNoBAT: |
||
518 | 00028E 0EFC 00435 movlw KBD_NOBAT ; test BAT failure |
||
519 | 000290 62?? 00436 cpfseq KBuf |
||
520 | 000292 D??? 00437 bra Init3 |
||
521 | 000294 8E?? 00438 bsf KbdFlag2, KBNOBAT ; imposta flag BAT FAILURE |
||
522 | 00439 |
||
523 | 000296 00440 Init3: |
||
524 | 000296 8E?? 00441 bsf KbdFlag, KBFND ; imposta flag tastiera presente |
||
525 | 00442 |
||
526 | 000298 00443 Init4: ; KBFND indica tastiera prsente - se il flag e' resettato |
||
527 | 00444 ; occorre fare ulteriore verifica della tastiera |
||
528 | 000298 9ED5 00445 bcf T0CON, TMR0ON ; stop Timer 0 |
||
529 | 00029A 94F2 00446 bcf INTCON, TMR0IF ; azzera flag timeout |
||
530 | 00029C 92F2 00447 bcf INTCON, INT0IF ; resetta flag INT0 |
||
531 | 00029E AE?? 00448 btfss KbdFlag, KBFND ; se tastiera presente salta ulteriore verifica |
||
532 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 10 |
||
533 | |||
534 | |||
535 | LOC OBJECT CODE LINE SOURCE TEXT |
||
536 | VALUE |
||
537 | |||
538 | 0002A0 D??? 00449 rcall KbVerf ; verifica tastiera |
||
539 | 0002A2 92F2 00450 bcf INTCON, INT0IF ; resetta flag INT0 |
||
540 | 0002A4 AE?? 00451 btfss KbdFlag, KBFND ; se tastiera presente la inizializza |
||
541 | 0002A6 D??? 00452 bra Init10 ; altrimenti esce |
||
542 | 0002A8 AC?? 00453 btfss KbdFlag, KBBAT ; tastiera ok ? |
||
543 | 0002AA D??? 00454 bra Init10 ; no -> esce |
||
544 | 00455 |
||
545 | 00456 ; a questo punto tastiera presente e funzionante |
||
546 | 00457 ; si legge ID tastiera |
||
547 | 0002AC 92F2 00458 bcf INTCON, INT0IF ; resetta flag INT0 |
||
548 | 0002AE 0EF2 00459 movlw KBD_GETID |
||
549 | 0002B0 EC?? F??? 00460 call SendKbd |
||
550 | 0002B4 E2?? 00461 bc Init6 ; errore |
||
551 | 0002B6 EC?? F??? 00462 call GetKbd ; riceve ID LOW |
||
552 | 0002BA E2?? 00463 bc Init6 ; errore |
||
553 | 00464 ldw KBuf |
||
554 | 0002BC 50?? M movf KBuf, w |
||
555 | 0002BE 6E?? 00465 movwf KbdIDL ; salva ID LOW |
||
556 | 0002C0 EC?? F??? 00466 call GetKbd ; riceve ID LOW |
||
557 | 0002C4 E2?? 00467 bc Init6 ; errore |
||
558 | 00468 ldw KBuf |
||
559 | 0002C6 50?? M movf KBuf, w |
||
560 | 0002C8 6E?? 00469 movwf KbdIDH ; salva ID HIGH |
||
561 | 0002CA 0EAB 00470 movlw KBD_IDL ; test ID |
||
562 | 0002CC 62?? 00471 cpfseq KbdIDL |
||
563 | 0002CE D??? 00472 bra Init6 ; ID LOW errato |
||
564 | 0002D0 0E83 00473 movlw KBD_IDH ; test ID |
||
565 | 0002D2 62?? 00474 cpfseq KbdIDH |
||
566 | 0002D4 D??? 00475 bra Init6 ; ID HIGH errato |
||
567 | 0002D6 8A?? 00476 bsf KbdFlag, KBVID ; imposta flag ID valido |
||
568 | 00477 |
||
569 | 0002D8 00478 Init6: |
||
570 | 0002D8 92F2 00479 bcf INTCON, INT0IF ; resetta flag INT0 |
||
571 | 0002DA 0EED 00480 movlw KBD_SETLED ; spegne LED |
||
572 | 0002DC EC?? F??? 00481 call SendKbd |
||
573 | 0002E0 E2?? 00482 bc Init61 |
||
574 | 0002E2 0E00 00483 movlw 0x00 |
||
575 | 0002E4 EC?? F??? 00484 call SendKbd |
||
576 | 0002E8 E2?? 00485 bc Init61 |
||
577 | 0002EA 80?? 00486 bsf KbdFlag, KBLEDOK |
||
578 | 00487 |
||
579 | 0002EC 00488 Init61: |
||
580 | 0002EC 92F2 00489 bcf INTCON, INT0IF ; resetta flag INT0 |
||
581 | 0002EE 0EF0 00490 movlw KBD_SETSC ; imposta scancode 02 |
||
582 | 0002F0 EC?? F??? 00491 call SendKbd |
||
583 | 0002F4 E2?? 00492 bc Init62 |
||
584 | 0002F6 0E02 00493 movlw 0x02 |
||
585 | 0002F8 EC?? F??? 00494 call SendKbd |
||
586 | 0002FC E2?? 00495 bc Init62 |
||
587 | 0002FE 82?? 00496 bsf KbdFlag, KBSCOK |
||
588 | 00497 |
||
589 | 000300 00498 Init62: |
||
590 | 000300 92F2 00499 bcf INTCON, INT0IF ; resetta flag INT0 |
||
591 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 11 |
||
592 | |||
593 | |||
594 | LOC OBJECT CODE LINE SOURCE TEXT |
||
595 | VALUE |
||
596 | |||
597 | 000302 0EF3 00500 movlw KBD_TYPERATE ; imposta typerate |
||
598 | 000304 EC?? F??? 00501 call SendKbd |
||
599 | 000308 E2?? 00502 bc Init63 |
||
600 | 00030A 0E0B 00503 movlw KBD_DEFRATE |
||
601 | 00030C EC?? F??? 00504 call SendKbd |
||
602 | 000310 E2?? 00505 bc Init63 |
||
603 | 000312 86?? 00506 bsf KbdFlag, KBRATE |
||
604 | 00507 |
||
605 | 000314 00508 Init63: |
||
606 | 000314 92F2 00509 bcf INTCON, INT0IF ; resetta flag INT0 |
||
607 | 000316 0EF4 00510 movlw KBD_ENABLE ; abilita scanning tastiera |
||
608 | 000318 EC?? F??? 00511 call SendKbd |
||
609 | 00031C E2?? 00512 bc Init10 |
||
610 | 00031E 84?? 00513 bsf KbdFlag, KBENABLE |
||
611 | 00514 |
||
612 | 000320 00515 Init10: |
||
613 | 00516 SCLOCKL ; disabilita TX da tastiera |
||
614 | 000320 988A M bcf LATB, KCLKO |
||
615 | 000322 0E03 00517 movlw 0x03 ; registro KFR 3 |
||
616 | 000324 6E8D 00518 movwf LATE |
||
617 | 00519 ldw KbdFlag |
||
618 | 000326 50?? M movf KbdFlag, w |
||
619 | 000328 EC?? F??? 00520 call KFRWrite |
||
620 | 00032C 92F2 00521 bcf INTCON, INT0IF ; resetta flag INT0 |
||
621 | 00032E 90F0 00522 bcf INTCON3, INT1IF ; resetta flag INT1 |
||
622 | 000330 92F0 00523 bcf INTCON3, INT2IF ; resetta flag INT2 |
||
623 | 000332 8EF2 00524 bsf INTCON, GIEH ; abilita INT high priority |
||
624 | 000334 8CF2 00525 bsf INTCON, GIEL ; abilita INT low priority |
||
625 | 000336 0012 00526 return |
||
626 | 00527 |
||
627 | 000338 00528 InitData: |
||
628 | 000338 EE00 F000 00529 lfsr FSR0, 0x0 ; azzera RAM banco 0, 1 & 2 |
||
629 | 00033C 0E03 00530 movlw 0x03 ; banco 3 non esiste ! |
||
630 | 00531 |
||
631 | 00033E 00532 InitData1: |
||
632 | 00033E 6AEE 00533 clrf POSTINC0 |
||
633 | 000340 62EA 00534 cpfseq FSR0H |
||
634 | 000342 D??? 00535 bra InitData1 |
||
635 | 00536 |
||
636 | 000344 0E04 00537 movlw 0x04 ; contatore registri |
||
637 | 000346 6E?? 00538 movwf KFRRdCnt |
||
638 | 000348 6A8D 00539 clrf LATE ; azzera indirizzo KFR |
||
639 | 00034A 6A95 00540 clrf DDRD ; porta D in uscita |
||
640 | 00034C 6A8C 00541 clrf LATD ; porta D tutti i bit bassi |
||
641 | 00542 |
||
642 | 00034E 00543 InitData2: |
||
643 | 00034E 0000 00544 nop ; scrittura su registro |
||
644 | 000350 0000 00545 nop |
||
645 | 000352 928B 00546 bcf LATC, KFRWE ; impulso write |
||
646 | 000354 0000 00547 nop |
||
647 | 000356 828B 00548 bsf LATC, KFRWE |
||
648 | 000358 0000 00549 nop |
||
649 | 00035A 2A8D 00550 incf LATE,f ; incrementa indirizzo |
||
650 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 12 |
||
651 | |||
652 | |||
653 | LOC OBJECT CODE LINE SOURCE TEXT |
||
654 | VALUE |
||
655 | |||
656 | 00035C 2E?? 00551 decfsz KFRRdCnt, f ; loop |
||
657 | 00035E D??? 00552 bra InitData2 |
||
658 | 000360 EE20 F040 00553 lfsr FSR2, RxBuffer ; imposta puntatore iniziale testa buffer RX |
||
659 | 000364 EE10 F040 00554 lfsr FSR1, RxBuffer ; imposta puntatore iniziale coda buffer RX |
||
660 | 000368 0E3E 00555 movlw LOW(TxBuffer) ; imposta puntatore Head, Tail TX a inizio buffer |
||
661 | 00036A 6E?? 00556 movwf TxHeadL |
||
662 | 00036C 6E?? 00557 movwf TxTailL |
||
663 | 00036E 0E01 00558 movlw HIGH(TxBuffer) |
||
664 | 000370 6E?? 00559 movwf TxHeadH |
||
665 | 000372 6E?? 00560 movwf TxTailH |
||
666 | 000374 0012 00561 return |
||
667 | 00562 |
||
668 | 000376 00563 Delay_ms: |
||
669 | 000376 0E01 00564 movlw TMR0P4 ; TMR0 stop, prescaler = 4, modo 16 bit |
||
670 | 000378 D??? 00565 bra Delay_xx |
||
671 | 00566 |
||
672 | 00037A 00567 Delay_us: |
||
673 | 00037A 0E08 00568 movlw TMR0P0 ; TMR0 stop, no prescaler, modo 16 bit |
||
674 | 00037C 00569 Delay_xx: |
||
675 | 00037C 6ED5 00570 movwf T0CON |
||
676 | 00037E 94F2 00571 bcf INTCON, TMR0IF ; azzera flag timeout |
||
677 | 00572 ldw T0CntH ; imposta timeout high |
||
678 | 000380 50?? M movf T0CntH, w |
||
679 | 000382 6ED7 00573 movwf TMR0H ; caricare prima TMR0H |
||
680 | 00574 ldw T0CntL |
||
681 | 000384 50?? M movf T0CntL, w |
||
682 | 000386 6ED6 00575 movwf TMR0L ; carica TMR0L/H |
||
683 | 000388 8ED5 00576 bsf T0CON, TMR0ON ; start Timer 0 |
||
684 | 00577 |
||
685 | 00038A 00578 Delay_xx1: ; loop |
||
686 | 00038A A4F2 00579 btfss INTCON, TMR0IF ; attende flag overflow |
||
687 | 00038C D??? 00580 bra Delay_xx1 ; loop ritardo |
||
688 | 00038E 9ED5 00581 bcf T0CON, TMR0ON ; stop Timer 0 |
||
689 | 000390 94F2 00582 bcf INTCON, TMR0IF ; azzera flag timeout |
||
690 | 000392 0012 00583 return |
||
691 | 00584 |
||
692 | 000394 00585 KbVerf: |
||
693 | 000394 0EEE 00586 movlw KBD_ECHO ; test tastiera tramite ECHO |
||
694 | 000396 EC?? F??? 00587 call TxKeyb |
||
695 | 00039A B0?? 00588 btfsc KStatus, KRESET ; test reset |
||
696 | 00039C 00FF 00589 reset ; ricevuto reset in -> reset |
||
697 | 00039E B2?? 00590 btfsc KStatus, KTIMEO ; test timeout |
||
698 | 0003A0 0012 00591 return ; tastiera non presente |
||
699 | 0003A2 AC?? 00592 btfss KStatus, KBTX ; test trasmissione OK |
||
700 | 0003A4 0012 00593 return ; trasmissione fallita - si assume NO tastiera |
||
701 | 0003A6 EC?? F??? 00594 call RxKeyb ; ricezione ECHO entro timeout |
||
702 | 0003AA B0?? 00595 btfsc KStatus, KRESET ; test reset |
||
703 | 0003AC 00FF 00596 reset ; ricevuto reset in -> reset |
||
704 | 0003AE B2?? 00597 btfsc KStatus, KTIMEO ; test timeout |
||
705 | 0003B0 0012 00598 return ; tastiera non presente |
||
706 | 0003B2 8E?? 00599 bsf KbdFlag, KBFND ; si assume tastiera presente |
||
707 | 0003B4 AE?? 00600 btfss KStatus, KBRX ; test ricezione full |
||
708 | 0003B6 0012 00601 return ; ricezione incompleta -> failure tastiera |
||
709 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 13 |
||
710 | |||
711 | |||
712 | LOC OBJECT CODE LINE SOURCE TEXT |
||
713 | VALUE |
||
714 | |||
715 | 00602 ldw KStatus ; test errore ricezione |
||
716 | 0003B8 50?? M movf KStatus, w |
||
717 | 0003BA 0B0C 00603 andlw KBRXERR |
||
718 | 0003BC E1?? 00604 bnz KbVerf2 ; dato ricevuto errato -> failure tastiera |
||
719 | 0003BE 0EEE 00605 movlw KBD_ECHO ; test ECHO |
||
720 | 0003C0 62?? 00606 cpfseq KBuf |
||
721 | 0003C2 0012 00607 return ; failure tastiera |
||
722 | 0003C4 8C?? 00608 bsf KbdFlag, KBBAT ; imposta flag BAT OK |
||
723 | 0003C6 00609 KbVerf2: |
||
724 | 0003C6 0012 00610 return |
||
725 | 00611 |
||
726 | 0003C8 00612 KbdProc: |
||
727 | 0003C8 0E00 00613 movlw 0x00 ; test presenza bytes nella coda di ricezione |
||
728 | 0003CA 5C?? 00614 subwf RxCnt, W |
||
729 | 0003CC E1?? 00615 bnz KbdProc0 ; coda non vuota |
||
730 | 0003CE 9E?? 00616 bcf RxFlag, RXOVR ; rimuove blocco TX (coda vuota) |
||
731 | 00617 SCLOCKH ; abilita TX da tastiera |
||
732 | 0003D0 888A M bsf LATB, KCLKO |
||
733 | 0003D2 0012 00618 return |
||
734 | 0003D4 00619 KbdProc0: |
||
735 | 0003D4 BE?? 00620 btfsc TxFlag, TXOVR ; buffer TX pronto ? |
||
736 | 0003D6 0012 00621 return ; NO - attende posto |
||
737 | 00622 ldw POSTINC1 ; legge byte da coda -> FSR1 ptr coda di ricezio |
||
738 | ne |
||
739 | 0003D8 50E6 M movf POSTINC1, w |
||
740 | 0003DA 6E?? 00623 movwf RxData |
||
741 | 0003DC 9EF2 00624 bcf INTCON, GIEH ; disabilita INT |
||
742 | 0003DE 9CF2 00625 bcf INTCON, GIEL |
||
743 | 0003E0 06?? 00626 decf RxCnt, F ; aggiorna contatore bytes in coda |
||
744 | 0003E2 9E?? 00627 bcf RxFlag, RXOVR ; rimuove blocco TX (coda vuota) |
||
745 | 00628 SCLOCKH ; abilita TX da tastiera |
||
746 | 0003E4 888A M bsf LATB, KCLKO |
||
747 | 0003E6 8EF2 00629 bsf INTCON, GIEH ; abilita INT |
||
748 | 0003E8 8CF2 00630 bsf INTCON, GIEL |
||
749 | 00631 ; si assume che TBLPTR non cambia entro il ciclo |
||
750 | 0003EA A8?? 00632 btfss RxFlag, RXEXT1 ; sequenza E1 pending ? |
||
751 | 0003EC D??? 00633 bra KbdProc1 ; NO |
||
752 | 0003EE 0009 00634 tblrd *+ ; legge byte da memoria ed incrementa ptr |
||
753 | 00635 ldw TABLAT |
||
754 | 0003F0 50F5 M movf TABLAT, w |
||
755 | 0003F2 5C?? 00636 subwf RxData, W ; confronta con dato ricevuto |
||
756 | 0003F4 A4D8 00637 btfss STATUS, Z ; Z = 1 se coincide |
||
757 | 0003F6 86?? 00638 bsf RxFlag, RXE1ERR ; segnala errore in sequenza E1 |
||
758 | 0003F8 2E?? 00639 decfsz E1Cnt, F ; decrementa contatore |
||
759 | 0003FA D??? 00640 bra UpdBufPtr |
||
760 | 0003FC 00641 E1Test: |
||
761 | 0003FC A6?? 00642 btfss RxFlag, RXE1ERR ; errore nella sequenza E1 ? |
||
762 | 0003FE D??? 00643 bra PauseKey ; NO - tasto PAUSE premuto |
||
763 | 000400 00644 ClrRX: ; termina scansione corrente - inizio nuova |
||
764 | 000400 0E80 00645 movlw RXMASK ; azzera tutti i flag ricezione |
||
765 | 000402 16?? 00646 andwf RxFlag, F |
||
766 | 000404 00647 UpdBufPtr: |
||
767 | 000404 0E3E 00648 movlw LOW(RxBufEnd) ; coda circolare - test puntatore |
||
768 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 14 |
||
769 | |||
770 | |||
771 | LOC OBJECT CODE LINE SOURCE TEXT |
||
772 | VALUE |
||
773 | |||
774 | 000406 5CE1 00649 subwf FSR1L, W ; FSR1L - LOW(RxBufEnd) |
||
775 | 000408 0E01 00650 movlw HIGH(RxBufEnd) ; FSR1H - HIGH(RxBufEnd) |
||
776 | 00040A 58E2 00651 subwfb FSR1H, W ; C = 0 se FSR1 < RxBufEnd |
||
777 | 00040C B0D8 00652 btfsc STATUS, C ; OK |
||
778 | 00040E EE10 F040 00653 lfsr FSR1, RxBuffer ; reimposta puntatore a inizio buffer |
||
779 | 000412 0012 00654 return |
||
780 | 000414 00655 PauseKey: |
||
781 | 000414 0E09 00656 movlw PAUSECODE ; imposta codice tasto PAUSE |
||
782 | 000416 6E?? 00657 movwf RxCode |
||
783 | 000418 D??? 00658 rcall GetKeyTbl |
||
784 | 00041A D??? 00659 bra KbdProc14 ; gestione tasti toggle |
||
785 | 00041C 00660 KbdProc1: |
||
786 | 00041C 0EF0 00661 movlw KBD_BRK ; test break |
||
787 | 00041E 5C?? 00662 subwf RxData, W |
||
788 | 000420 E1?? 00663 bnz KbdProc2 |
||
789 | 000422 8C?? 00664 bsf RxFlag, RXBRK ; F0 break pending |
||
790 | 000424 D??? 00665 bra UpdBufPtr |
||
791 | 000426 00666 KbdProc2: |
||
792 | 000426 0EE0 00667 movlw KBD_EXT ; test codice esteso |
||
793 | 000428 5C?? 00668 subwf RxData, W |
||
794 | 00042A E1?? 00669 bnz KbdProc3 |
||
795 | 00042C 0E80 00670 movlw RXMASK ; azzera tutti i flag ricezione |
||
796 | 00042E 16?? 00671 andwf RxFlag, F |
||
797 | 000430 8A?? 00672 bsf RxFlag, RXEXT ; imposta E0 pending |
||
798 | 000432 D??? 00673 bra UpdBufPtr |
||
799 | 000434 00674 KbdProc3: |
||
800 | 000434 0EE1 00675 movlw KBD_EXT1 ; test codice esteso |
||
801 | 000436 5C?? 00676 subwf RxData, W |
||
802 | 000438 E1?? 00677 bnz KbdProc4 |
||
803 | 00043A 0E80 00678 movlw RXMASK ; azzera tutti i flag ricezione |
||
804 | 00043C 16?? 00679 andwf RxFlag, F |
||
805 | 00043E 88?? 00680 bsf RxFlag, RXEXT1 ; imposta E1 pending |
||
806 | 000440 0E?? 00681 movlw LOW EXT1TBL ; imposta ptr tabella sequenza E1 |
||
807 | 000442 6EF6 00682 movwf TBLPTRL |
||
808 | 000444 0E?? 00683 movlw HIGH EXT1TBL |
||
809 | 000446 6EF7 00684 movwf TBLPTRH |
||
810 | 000448 0E07 00685 movlw E1SEQCNT ; imposta numero bytes sequenza E1 |
||
811 | 00044A 6E?? 00686 movwf E1Cnt |
||
812 | 00044C D??? 00687 bra UpdBufPtr |
||
813 | 00044E 00688 KbdProc4: |
||
814 | 00044E AA?? 00689 btfss RxFlag, RXEXT ; codice esteso E0 pending ? |
||
815 | 000450 D??? 00690 bra KbdProc6 ; NO - codice normale o break |
||
816 | 000452 0E?? 00691 movlw LOW EXTTBL ; imposta ptr tabella sequenza E0 |
||
817 | 000454 6EF6 00692 movwf TBLPTRL |
||
818 | 000456 0E?? 00693 movlw HIGH EXTTBL |
||
819 | 000458 6EF7 00694 movwf TBLPTRH |
||
820 | 00045A 68?? 00695 setf E1Cnt ; indice tabella E0 (inizializzato a 0xFF) |
||
821 | 00045C 00696 KbdProc5: |
||
822 | 00045C 2A?? 00697 incf E1Cnt, F ; update indice |
||
823 | 00045E 0009 00698 tblrd *+ ; legge byte da memoria ed incrementa ptr |
||
824 | 000460 0EFF 00699 movlw 0xFF ; test fine tabella |
||
825 | 000462 5CF5 00700 subwf TABLAT, W |
||
826 | 000464 E0?? 00701 bz ClrRX ; termina sequenza |
||
827 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 15 |
||
828 | |||
829 | |||
830 | LOC OBJECT CODE LINE SOURCE TEXT |
||
831 | VALUE |
||
832 | |||
833 | 00702 ldw TABLAT |
||
834 | 000466 50F5 M movf TABLAT, w |
||
835 | 000468 5C?? 00703 subwf RxData, W ; confronta con dato ricevuto |
||
836 | 00046A E1?? 00704 bnz KbdProc5 ; loop next |
||
837 | 00705 ; trovato codice esteso |
||
838 | 00046C 0E?? 00706 movlw LOW EXTRLTBL ; imposta ptr tabella rilocazione E0 |
||
839 | 00046E 24?? 00707 addwf E1Cnt, W ; aggiunge indice |
||
840 | 000470 6EF6 00708 movwf TBLPTRL |
||
841 | 000472 0E?? 00709 movlw HIGH EXTRLTBL |
||
842 | 000474 6EF7 00710 movwf TBLPTRH |
||
843 | 000476 6AE8 00711 clrf WREG |
||
844 | 000478 22F7 00712 addwfc TBLPTRH, F |
||
845 | 00047A 0009 00713 tblrd *+ ; codice rilocato |
||
846 | 00714 ldw TABLAT |
||
847 | 00047C 50F5 M movf TABLAT, w |
||
848 | 00047E D??? 00715 bra KbdProc10 |
||
849 | 000480 00716 KbdProc6: ; codice normale |
||
850 | 000480 0E?? 00717 movlw LOW DEFTBL ; imposta ptr tabella sequenza normale |
||
851 | 000482 6EF6 00718 movwf TBLPTRL |
||
852 | 000484 0E?? 00719 movlw HIGH DEFTBL |
||
853 | 000486 6EF7 00720 movwf TBLPTRH |
||
854 | 000488 68?? 00721 setf E1Cnt ; indice tabella (inizializzato a 0xFF) |
||
855 | 00048A 00722 KbdProc7: |
||
856 | 00048A 2A?? 00723 incf E1Cnt, F ; update indice |
||
857 | 00048C 0009 00724 tblrd *+ ; legge byte da memoria ed incrementa ptr |
||
858 | 00048E 0EFF 00725 movlw 0xFF ; test fine tabella |
||
859 | 000490 5CF5 00726 subwf TABLAT, W |
||
860 | 000492 E0?? 00727 bz KbdProc8 ; codice da non rilocare |
||
861 | 00728 ldw TABLAT |
||
862 | 000494 50F5 M movf TABLAT, w |
||
863 | 000496 5C?? 00729 subwf RxData, W ; confronta con dato ricevuto |
||
864 | 000498 E1?? 00730 bnz KbdProc7 ; loop next |
||
865 | 00731 ; trovato codice da rilocare |
||
866 | 00049A 0E?? 00732 movlw LOW DEFRLTBL ; imposta ptr tabella rilocazione |
||
867 | 00049C 24?? 00733 addwf E1Cnt, W ; aggiunge indice |
||
868 | 00049E 6EF6 00734 movwf TBLPTRL |
||
869 | 0004A0 0E?? 00735 movlw HIGH DEFRLTBL |
||
870 | 0004A2 6EF7 00736 movwf TBLPTRH |
||
871 | 0004A4 6AE8 00737 clrf WREG |
||
872 | 0004A6 22F7 00738 addwfc TBLPTRH, F |
||
873 | 0004A8 0009 00739 tblrd *+ ; codice rilocato |
||
874 | 00740 ldw TABLAT |
||
875 | 0004AA 50F5 M movf TABLAT, w |
||
876 | 0004AC D??? 00741 bra KbdProc10 |
||
877 | 0004AE 00742 KbdProc8: ; rilocazione degli scan code 70..7E in 60..6E |
||
878 | 0004AE 0E70 00743 movlw 0x70 |
||
879 | 0004B0 5C?? 00744 subwf RxData, W |
||
880 | 00745 ldw RxData ; W = codice non rilocato |
||
881 | 0004B2 50?? M movf RxData, w |
||
882 | 0004B4 E3?? 00746 bnc KbdProc10 ; OK (< 70) |
||
883 | 0004B6 0E7F 00747 movlw 0x7F ; max. codice di scansione 0x7E |
||
884 | 0004B8 5C?? 00748 subwf RxData, W |
||
885 | 0004BA E2?? 00749 bc ClrRX ; codice non valido (>= 7F) - azzera ed esce |
||
886 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 16 |
||
887 | |||
888 | |||
889 | LOC OBJECT CODE LINE SOURCE TEXT |
||
890 | VALUE |
||
891 | |||
892 | 0004BC 0E10 00750 movlw 0x10 ; rilocazione codice in 60..6E |
||
893 | 0004BE 5C?? 00751 subwf RxData, W ; W = codice rilocato |
||
894 | 0004C0 00752 KbdProc10: ; IN -> W = codice |
||
895 | 0004C0 6E?? 00753 movwf E1Cnt ; codice |
||
896 | 0004C2 0E?? 00754 movlw LOW CVTTBL ; imposta ptr tabella conversione |
||
897 | 0004C4 24?? 00755 addwf E1Cnt, W ; aggiunge indice |
||
898 | 0004C6 6EF6 00756 movwf TBLPTRL |
||
899 | 0004C8 0E?? 00757 movlw HIGH CVTTBL |
||
900 | 0004CA 6EF7 00758 movwf TBLPTRH |
||
901 | 0004CC 6AE8 00759 clrf WREG |
||
902 | 0004CE 22F7 00760 addwfc TBLPTRH, F |
||
903 | 0004D0 0009 00761 tblrd *+ ; codice rilocato |
||
904 | 00762 ldw TABLAT |
||
905 | 0004D2 50F5 M movf TABLAT, w |
||
906 | 0004D4 6E?? 00763 movwf RxCode ; nuovo codice |
||
907 | 0004D6 E6?? 00764 bmi ClrRX ; codice non valido - azzera flag ed esce |
||
908 | 0004D8 0E7B 00765 movlw ('z' + 1) ; massimo codice 7A ('z') |
||
909 | 0004DA 5C?? 00766 subwf RxCode, W |
||
910 | 0004DC E2?? 00767 bc ClrRX ; codice non valido |
||
911 | 00768 |
||
912 | 00769 ; RxCode contiene ora un codice compreso tra 00 e 7A |
||
913 | 00770 ; codici 00 - 41 utilizzati per accesso tabella KEYTBL |
||
914 | 00771 ; codici 42 - 56 utilizzati per accesso mappe US/IT |
||
915 | 00772 ; codici 57 - 60 non validi |
||
916 | 00773 ; codici 61 - 7A lettere 'a'..'z' |
||
917 | 00774 ; codici 00 - 05 -> flag shift/alt/ctrl |
||
918 | 00775 ; codici 06 - 09 -> tasti toggle (LOCK e PAUSE) |
||
919 | 00776 |
||
920 | 0004DE 9C?? 00777 bcf TxFlag, SKPCTLB ; azzera flag skip SHIFT/ALT/CTL |
||
921 | 0004E0 9A?? 00778 bcf TxFlag, SKPALTB |
||
922 | 0004E2 98?? 00779 bcf TxFlag, SKPSHFB |
||
923 | 0004E4 9C?? 00780 bcf MapCfg, MAPALPHA ; tasto non alfabetico |
||
924 | 0004E6 0E61 00781 movlw 'a' ; test carattere alfabetico |
||
925 | 0004E8 5C?? 00782 subwf RxCode, W |
||
926 | 0004EA E3?? 00783 bnc MKeyTst ; no alpha - test codice mappe US/IT |
||
927 | 0004EC 6A?? 00784 clrf TxData0 ; flag codice ASCII |
||
928 | 00785 ldw RxCode ; 'a'..'z' |
||
929 | 0004EE 50?? M movf RxCode, w |
||
930 | 0004F0 6E?? 00786 movwf TxData1 ; codice ASCII tasto |
||
931 | 0004F2 0E20 00787 movlw 0x20 ; converte in maiuscolo |
||
932 | 0004F4 5C?? 00788 subwf RxCode, W ; 'A'..'Z' |
||
933 | 0004F6 6E?? 00789 movwf Caps |
||
934 | 0004F8 8C?? 00790 bsf MapCfg, MAPALPHA ; tasto alfabetico |
||
935 | 0004FA D??? 00791 bra KbdProc40 ; gestione tasto alpha |
||
936 | 00792 |
||
937 | 0004FC 00793 MKeyTst: |
||
938 | 0004FC 0E42 00794 movlw MAPCODE ; test codice in 42..56 (mappe US/IT) |
||
939 | 0004FE 5C?? 00795 subwf RxCode, W |
||
940 | 000500 E3?? 00796 bnc NKeyTst ; CODE < MAPCODE - no tasto mappe US/IT |
||
941 | 000502 6E?? 00797 movwf RxData ; salva CODE - MAPCODE (indice 0) |
||
942 | 000504 0E57 00798 movlw (MAPCODEMAX + 1) |
||
943 | 000506 5C?? 00799 subwf RxCode, W |
||
944 | 000508 E3?? 00800 bnc MapTst ; CODE < MAPCODEMAX + 1 - tasto mappe US/IT |
||
945 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 17 |
||
946 | |||
947 | |||
948 | LOC OBJECT CODE LINE SOURCE TEXT |
||
949 | VALUE |
||
950 | |||
951 | 00050A D??? 00801 bra ClrRX ; codice non valido |
||
952 | 00050C 00802 MapTst: |
||
953 | 00803 ; gestione mappe US/IT |
||
954 | 00050C 90D8 00804 bcf STATUS, C ; azzera carry |
||
955 | 00050E 36?? 00805 rlcf RxData, f ; * 2 |
||
956 | 000510 88?? 00806 bsf TxFlag, SKPSHFB ; skip test SHIFT |
||
957 | 000512 BE?? 00807 btfsc MapCfg, MAPITB ; configurazione mappa IT ? |
||
958 | 000514 D??? 00808 bra ITMap ; SI |
||
959 | 000516 BE?? 00809 btfsc ShfSt, ASHFB ; SHIFT ? |
||
960 | 000518 2A?? 00810 incf RxData, F ; SI - incrementa indice |
||
961 | 00051A 0E?? 00811 movlw LOW USTBL ; imposta ptr tabella conversione mappa US |
||
962 | 00051C 24?? 00812 addwf RxData, W ; aggiunge indice |
||
963 | 00051E 6EF6 00813 movwf TBLPTRL |
||
964 | 000520 0E?? 00814 movlw HIGH USTBL |
||
965 | 000522 6EF7 00815 movwf TBLPTRH |
||
966 | 000524 6AE8 00816 clrf WREG |
||
967 | 000526 22F7 00817 addwfc TBLPTRH, F |
||
968 | 000528 0008 00818 tblrd * ; codice tasto |
||
969 | 00819 ldw TABLAT |
||
970 | 00052A 50F5 M movf TABLAT, w |
||
971 | 00052C 6E?? 00820 movwf TxData1 ; codice tasto |
||
972 | 00052E 6A?? 00821 clrf TxData0 ; flag ASCII |
||
973 | 000530 D??? 00822 bra KbdProc41 ; gestione tasto |
||
974 | 000532 00823 ITMap: |
||
975 | 000532 0E00 00824 movlw 0x00 |
||
976 | 000534 6E?? 00825 movwf TxData1 |
||
977 | 000536 6A?? 00826 clrf TxData0 |
||
978 | 000538 D??? 00827 bra KbdProc41 ; gestione tasto |
||
979 | 00828 |
||
980 | 00053A 00829 NKeyTst: |
||
981 | 00830 ; gestione tasti NO-REPEAT: PWR, SLEEP, WAKEUP, APP |
||
982 | 00831 ; L-GUI, R-GUI, ESC, PRINT SCRN |
||
983 | 00053A 0E18 00832 movlw WAKECODE |
||
984 | 00053C 5C?? 00833 subwf RxCode, W |
||
985 | 00053E E3?? 00834 bnc NMITst ; RxCode < WAKECODE |
||
986 | 000540 6E?? 00835 movwf RxData ; RxData = RxCode - WAKECODE |
||
987 | 000542 0E20 00836 movlw (ESCCODE + 1) |
||
988 | 000544 5C?? 00837 subwf RxCode, W |
||
989 | 000546 E2?? 00838 bc NMITst ; RxCode >= (ESCCODE + 1) |
||
990 | 000548 0E?? 00839 movlw LOW RPTTBL ; imposta ptr tabella flag RPTTBL |
||
991 | 00054A 24?? 00840 addwf RxData, W ; aggiunge indice |
||
992 | 00054C 6EF6 00841 movwf TBLPTRL |
||
993 | 00054E 0E?? 00842 movlw HIGH RPTTBL |
||
994 | 000550 6EF7 00843 movwf TBLPTRH |
||
995 | 000552 6AE8 00844 clrf WREG |
||
996 | 000554 22F7 00845 addwfc TBLPTRH, F |
||
997 | 000556 0008 00846 tblrd * ; flag tasto |
||
998 | 00847 ldw TABLAT |
||
999 | 000558 50F5 M movf TABLAT, w |
||
1000 | 00055A 6E?? 00848 movwf RxData ; flag |
||
1001 | 00055C BC?? 00849 btfsc RxFlag, RXBRK ; test tasto rilasciato |
||
1002 | 00055E D??? 00850 bra NKeyRls ; SI |
||
1003 | 000560 14?? 00851 andwf RptSt, W ; flag tasto premuto attivo ? |
||
1004 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 18 |
||
1005 | |||
1006 | |||
1007 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1008 | VALUE |
||
1009 | |||
1010 | 000562 E0?? 00852 bz NKeySet ; NO - prima attivazione |
||
1011 | 000564 D??? 00853 bra ClrRX ; tasto repeat - scarta codice |
||
1012 | 000566 00854 NKeySet: |
||
1013 | 00855 ldw RxData ; set bit in RptSt |
||
1014 | 000566 50?? M movf RxData, w |
||
1015 | 000568 12?? 00856 iorwf RptSt, F |
||
1016 | 00056A E1?? 00857 bnz NMITst |
||
1017 | 00056C 00858 NKeyRls: |
||
1018 | 00056C 1C?? 00859 comf RxData, W ; complementa maschera per azzerare bit |
||
1019 | 00056E 16?? 00860 andwf RptSt, F ; azzera bit |
||
1020 | 00861 |
||
1021 | 000570 00862 NMITst: |
||
1022 | 00863 ; CTRL + BREAK, ALT + SYSREQ, WAKE UP, PWR, SLEEP sono tasti NMI |
||
1023 | 00864 ; vengono rilevati solo dopo il loro rilascio |
||
1024 | 000570 D??? 00865 rcall GetKeyTbl |
||
1025 | 000572 52?? 00866 movf TxData1, F ; test se codice = 0 |
||
1026 | 000574 E1?? 00867 bnz NMITst1 |
||
1027 | 000576 D??? 00868 bra ClrRX ; tasto nullo - scarta codice |
||
1028 | 000578 00869 NMITst1: |
||
1029 | 000578 0EC0 00870 movlw 0xC0 ; test tasto NMI |
||
1030 | 00057A 5C?? 00871 subwf TxData0, W ; flag tasto |
||
1031 | 00057C E1?? 00872 bnz KbdProc12 ; no tasto NMI |
||
1032 | 00057E AC?? 00873 btfss RxFlag, RXBRK ; codice break ? |
||
1033 | 000580 D??? 00874 bra ClrRX ; NO - scarta codice |
||
1034 | 000582 9C?? 00875 bcf RxFlag, RXBRK ; azzera flag |
||
1035 | 000584 D??? 00876 bra KbdProc60 ; gestione tasto NMI |
||
1036 | 00877 |
||
1037 | 000586 00878 KbdProc12: |
||
1038 | 00879 ; gestione tasti SHIFT/ALT/CTRL |
||
1039 | 00880 ; TxData0 = flag tasto |
||
1040 | 00881 ; TxData1 = codice tasto |
||
1041 | 000586 0E80 00882 movlw 0x80 ; test invio status flag |
||
1042 | 000588 5C?? 00883 subwf TxData0, W |
||
1043 | 00058A E1?? 00884 bnz KbdProc14 ; no SHIFT/ALT/CTRL |
||
1044 | 00885 ldw CtlSt ; salva flag attuali |
||
1045 | 00058C 50?? M movf CtlSt, w |
||
1046 | 00058E 6E?? 00886 movwf TCtlSt |
||
1047 | 000590 0EC0 00887 movlw (ASHFM | ALTCTLM) ; maschera bit necessari |
||
1048 | 000592 14?? 00888 andwf ShfSt, W |
||
1049 | 000594 6E?? 00889 movwf TShfSt |
||
1050 | 00890 ldw TxData1 ; flag tasto |
||
1051 | 000596 50?? M movf TxData1, w |
||
1052 | 000598 6E?? 00891 movwf RxData ; flag attuale |
||
1053 | 00059A 1C?? 00892 comf RxData, W ; complementa maschera per azzerare bit |
||
1054 | 00059C 16?? 00893 andwf CtlSt, F ; azzera bit |
||
1055 | 00894 ldw RxData ; carica maschera bit attivi |
||
1056 | 00059E 50?? M movf RxData, w |
||
1057 | 0005A0 AC?? 00895 btfss RxFlag, RXBRK ; lascia bit azzerati se tasto rilasciato |
||
1058 | 0005A2 12?? 00896 iorwf CtlSt, F ; tasto premuto: imposta bit |
||
1059 | 0005A4 9E?? 00897 bcf CtlSt, AALTB ; azzera bit di ALT e CTRL |
||
1060 | 0005A6 9C?? 00898 bcf CtlSt, ACTLB |
||
1061 | 0005A8 0E24 00899 movlw ALTKM ; test L-ALT OR R-ALT |
||
1062 | 0005AA 14?? 00900 andwf CtlSt, W |
||
1063 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 19 |
||
1064 | |||
1065 | |||
1066 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1067 | VALUE |
||
1068 | |||
1069 | 0005AC A4D8 00901 btfss STATUS, Z ; Z = 1 -> no ALT |
||
1070 | 0005AE 8E?? 00902 bsf CtlSt, AALTB ; imposta bit ALT (L o R) |
||
1071 | 0005B0 0E12 00903 movlw CTRLKM ; test L-CTRL OR R-CTRL |
||
1072 | 0005B2 14?? 00904 andwf CtlSt, W |
||
1073 | 0005B4 A4D8 00905 btfss STATUS, Z ; Z = 1 -> no CTRL |
||
1074 | 0005B6 8C?? 00906 bsf CtlSt, ACTLB ; imposta bit CTRL (L o R) |
||
1075 | 0005B8 9E?? 00907 bcf ShfSt, ASHFB ; azzera bit SHIFT |
||
1076 | 0005BA 9C?? 00908 bcf ShfSt, ALTCTLB ; azzera bit ALT OR CTRL |
||
1077 | 0005BC 0E09 00909 movlw SHIFTKM ; test L-SHIFT OR R-SHIFT |
||
1078 | 0005BE 14?? 00910 andwf CtlSt, W |
||
1079 | 0005C0 A4D8 00911 btfss STATUS, Z ; Z = 1 -> no SHIFT |
||
1080 | 0005C2 8E?? 00912 bsf ShfSt, ASHFB ; imposta bit SHIFT (L o R) |
||
1081 | 0005C4 0EC0 00913 movlw ALLALTCTLM ; test ALT OR CTRL |
||
1082 | 0005C6 14?? 00914 andwf CtlSt, W |
||
1083 | 0005C8 A4D8 00915 btfss STATUS, Z ; Z = 1 -> no ALT OR CTRL |
||
1084 | 0005CA 8C?? 00916 bsf ShfSt, ALTCTLB ; imposta bit ALT OR CTRL (L o R) |
||
1085 | 00917 ldw CtlSt ; confronta flag attuali con flag precedenti |
||
1086 | 0005CC 50?? M movf CtlSt, w |
||
1087 | 0005CE 62?? 00918 cpfseq TCtlSt |
||
1088 | 0005D0 D??? 00919 bra KbdProc13 ; flag cambiato |
||
1089 | 0005D2 0EC0 00920 movlw (ASHFM | ALTCTLM) |
||
1090 | 0005D4 14?? 00921 andwf ShfSt, W ; maschera bit necessari |
||
1091 | 0005D6 5C?? 00922 subwf TShfSt, W ; confronta con vecchio flag |
||
1092 | 0005D8 E1?? 00923 bnz KbdProc13 ; flag cambiato |
||
1093 | 0005DA D??? 00924 bra ClrRX ; flag non cambiati -> scarta codice |
||
1094 | 0005DC 00925 KbdProc13: ; invia nuovi flag all' host |
||
1095 | 00926 ; formato -> 100000<76-ShfSt> + CtlSt |
||
1096 | 00927 ldw CtlSt |
||
1097 | 0005DC 50?? M movf CtlSt, w |
||
1098 | 0005DE 6E?? 00928 movwf TxData1 |
||
1099 | 00929 ldw ShfSt ; trasla bit 7 e 6 in bit 1 e 0 |
||
1100 | 0005E0 50?? M movf ShfSt, w |
||
1101 | 0005E2 6E?? 00930 movwf RxData |
||
1102 | 0005E4 42?? 00931 rrncf RxData, F ; bit 6 |
||
1103 | 0005E6 42?? 00932 rrncf RxData, F ; bit 5 |
||
1104 | 0005E8 42?? 00933 rrncf RxData, F ; bit 4 |
||
1105 | 0005EA 42?? 00934 rrncf RxData, F ; bit 3 |
||
1106 | 0005EC 42?? 00935 rrncf RxData, F ; bit 2 |
||
1107 | 0005EE 40?? 00936 rrncf RxData, W ; bit 1 -> W |
||
1108 | 0005F0 0B03 00937 andlw B'00000011' |
||
1109 | 0005F2 12?? 00938 iorwf TxData0, F |
||
1110 | 00939 |
||
1111 | 0005F4 00940 PutKey: ; inserisce word codice tasto nella coda TX |
||
1112 | 0005F4 0EE0 00941 movlw (TXMAXCNT - 1) ; test spazio disponibile |
||
1113 | 0005F6 5C?? 00942 subwf TxCnt, W ; W = TxCnt - (TMAXCNT - 1) |
||
1114 | 0005F8 B0D8 00943 btfsc STATUS, C ; W >= 0 -> C = 1 |
||
1115 | 0005FA 8E?? 00944 bsf TxFlag, TXOVR ; segnala overrun buffer TX |
||
1116 | 00945 ldw TxHeadL ; imposta ptr head al buffer |
||
1117 | 0005FC 50?? M movf TxHeadL, w |
||
1118 | 0005FE 6EE9 00946 movwf FSR0L |
||
1119 | 00947 ldw TxHeadH |
||
1120 | 000600 50?? M movf TxHeadH, w |
||
1121 | 000602 6EEA 00948 movwf FSR0H |
||
1122 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 20 |
||
1123 | |||
1124 | |||
1125 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1126 | VALUE |
||
1127 | |||
1128 | 00949 ldw TxData0 ; primo byte in coda |
||
1129 | 000604 50?? M movf TxData0, w |
||
1130 | 000606 6EEE 00950 movwf POSTINC0 |
||
1131 | 00951 ldw TxData1 ; secondo byte in coda |
||
1132 | 000608 50?? M movf TxData1, w |
||
1133 | 00060A 6EEE 00952 movwf POSTINC0 |
||
1134 | 00060C 2A?? 00953 incf TxCnt, F ; aggiorna contatore word nel buffer TX |
||
1135 | 00954 ldw FSR0L ; aggiorna ptr |
||
1136 | 00060E 50E9 M movf FSR0L, w |
||
1137 | 000610 6E?? 00955 movwf TxHeadL |
||
1138 | 00956 ldw FSR0H |
||
1139 | 000612 50EA M movf FSR0H, w |
||
1140 | 000614 6E?? 00957 movwf TxHeadH |
||
1141 | 000616 0E00 00958 movlw LOW(TxBufEnd) ; coda circolare - test puntatore |
||
1142 | 000618 5C?? 00959 subwf TxHeadL, W ; TxHeadL - LOW(TxBufEnd) |
||
1143 | 00061A 0E03 00960 movlw HIGH(TxBufEnd) ; TxHeadH - HIGH(TxBufEnd) |
||
1144 | 00061C 58?? 00961 subwfb TxHeadH, W ; C = 0 se TxHead < TxBufEnd |
||
1145 | 00061E A0D8 00962 btfss STATUS, C ; test buffer |
||
1146 | 000620 D??? 00963 bra ClrRX ; C = 0 -> OK |
||
1147 | 000622 0E3E 00964 movlw LOW(TxBuffer) ; reimposta puntatore a inizio buffer |
||
1148 | 000624 6E?? 00965 movwf TxHeadL |
||
1149 | 000626 0E01 00966 movlw HIGH(TxBuffer) |
||
1150 | 000628 6E?? 00967 movwf TxHeadH |
||
1151 | 00062A D??? 00968 bra ClrRX ; azzera flag ed esce |
||
1152 | 00969 |
||
1153 | 00062C 00970 KbdProc14: |
||
1154 | 00971 ; gestione tasti TOGGLE |
||
1155 | 00062C 0E90 00972 movlw 0x90 ; test invio toggle |
||
1156 | 00062E 5C?? 00973 subwf TxData0, W ; test tasti LOCK o PAUSE |
||
1157 | 000630 E1?? 00974 bnz KbdProc16 |
||
1158 | 00975 ldw TglSt ; salva flag toggle attuali |
||
1159 | 000632 50?? M movf TglSt, w |
||
1160 | 000634 6E?? 00976 movwf TTglSt |
||
1161 | 00977 ldw LockSt |
||
1162 | 000636 50?? M movf LockSt, w |
||
1163 | 000638 6E?? 00978 movwf TLockSt |
||
1164 | 00063A 0E09 00979 movlw PAUSECODE ; test PAUSE |
||
1165 | 00063C 5C?? 00980 subwf RxCode, W |
||
1166 | 00063E E1?? 00981 bnz NoPause ; no tasto PAUSE |
||
1167 | 000640 78?? 00982 btg TglSt, PAUSB ; toggle bit ad ogni pressione PAUSE |
||
1168 | 000642 D??? 00983 bra KbdProc15 |
||
1169 | 000644 00984 NoPause: |
||
1170 | 000644 BC?? 00985 btfsc RxFlag, RXBRK ; test tasto rilasciato |
||
1171 | 000646 D??? 00986 bra ToggleRls ; SI |
||
1172 | 000648 14?? 00987 andwf LockSt, W ; flag tasto premuto attivo ? |
||
1173 | 00064A E0?? 00988 bz ToggleBit ; NO - prima attivazione |
||
1174 | 00064C D??? 00989 bra ClrRX ; tasto repeat - scarta codice |
||
1175 | 00064E 00990 ToggleBit: |
||
1176 | 00991 ldw TxData1 ; toggle bit in TglSt |
||
1177 | 00064E 50?? M movf TxData1, w |
||
1178 | 000650 1A?? 00992 xorwf TglSt, F |
||
1179 | 000652 12?? 00993 iorwf LockSt, F ; setta bit in LockSt |
||
1180 | 000654 E1?? 00994 bnz TstLock |
||
1181 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 21 |
||
1182 | |||
1183 | |||
1184 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1185 | VALUE |
||
1186 | |||
1187 | 000656 00995 ToggleRls: |
||
1188 | 000656 1C?? 00996 comf TxData1, W ; complementa maschera per azzerare bit |
||
1189 | 000658 16?? 00997 andwf LockSt, F ; azzera bit |
||
1190 | 00065A 00998 TstLock: |
||
1191 | 00999 ldw TglSt ; confronta con toggle precedente |
||
1192 | 00065A 50?? M movf TglSt, w |
||
1193 | 00065C 5C?? 01000 subwf TTglSt, W |
||
1194 | 00065E E1?? 01001 bnz LedUpd |
||
1195 | 000660 D??? 01002 bra ClrRX ; toggle non modificato - scarta codice |
||
1196 | 000662 01003 LedUpd: |
||
1197 | 000662 EC?? F??? 01004 call SetLed1 |
||
1198 | 000666 A0?? 01005 btfss KbdFlag, KBLEDOK ; comando LED riuscito |
||
1199 | 000668 D??? 01006 bra ClrRX ; ignora tasto ed esce |
||
1200 | 00066A 01007 KbdProc15: ; invia toggle ad host |
||
1201 | 01008 ; formato -> 10010000 + TglSt |
||
1202 | 01009 ldw TglSt |
||
1203 | 00066A 50?? M movf TglSt, w |
||
1204 | 00066C 6E?? 01010 movwf TxData1 |
||
1205 | 00066E D??? 01011 bra PutKey |
||
1206 | 01012 |
||
1207 | 000670 01013 KbdProc16: |
||
1208 | 01014 ; gestione tasti tastierino numerico (KP) |
||
1209 | 000670 0E20 01015 movlw KP0CODE |
||
1210 | 000672 5C?? 01016 subwf RxCode, W |
||
1211 | 000674 E3?? 01017 bnc KbdProc20 ; no tasto numerico |
||
1212 | 000676 0E2B 01018 movlw INSCODE |
||
1213 | 000678 5C?? 01019 subwf RxCode, W |
||
1214 | 00067A E2?? 01020 bc KbdProc20 ; no tasto numerico |
||
1215 | 01021 ; se NUM-LOCK OFF i tasti numerici diventano tasti cursore (escluso 5) |
||
1216 | 00067C AC?? 01022 btfss TglSt, NUMLB |
||
1217 | 00067E D??? 01023 bra KbdProc18 ; NUM-LOCK OFF -> converte in codice cursore |
||
1218 | 01024 ; se NUM-LOCK ON e premuto il solo tasto SHIFT converte in codice cursore |
||
1219 | 000680 AE?? 01025 btfss ShfSt, ASHFB |
||
1220 | 000682 D??? 01026 bra KbdProc20 ; no SHIFT -> tasto numerico |
||
1221 | 000684 BC?? 01027 btfsc ShfSt, ALTCTLB ; premuti ALT e/o CTRL ? |
||
1222 | 000686 D??? 01028 bra KbdProc20 ; si - tasto numerico |
||
1223 | 000688 88?? 01029 bsf TxFlag, SKPSHFB ; flag skip test SHIFT |
||
1224 | 00068A 8A?? 01030 bsf TxFlag, SKPALTB ; flag skip test ALT |
||
1225 | 00068C 8C?? 01031 bsf TxFlag, SKPCTLB ; flag skip test CTRL |
||
1226 | 01032 |
||
1227 | 00068E 01033 KbdProc18: |
||
1228 | 00068E 0E0B 01034 movlw CRSLEN ; converte in codice tasto cursore |
||
1229 | 000690 26?? 01035 addwf RxCode, F |
||
1230 | 000692 D??? 01036 rcall GetKeyTbl ; legge nuovamente codice/flag tasto |
||
1231 | 000694 52?? 01037 movf TxData1, F ; test se codice tasto = 0 |
||
1232 | 000696 E1?? 01038 bnz KbdProc20 |
||
1233 | 000698 D??? 01039 bra ClrRX ; scarta codice nullo |
||
1234 | 01040 |
||
1235 | 00069A 01041 KbdProc20: |
||
1236 | 01042 ; toggle tasto INSERT - soltanto senza SHIFT/ALT/CTRL |
||
1237 | 00069A 0E2B 01043 movlw INSCODE |
||
1238 | 00069C 5C?? 01044 subwf RxCode, W |
||
1239 | 00069E E1?? 01045 bnz KbdProc22 |
||
1240 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 22 |
||
1241 | |||
1242 | |||
1243 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1244 | VALUE |
||
1245 | |||
1246 | 0006A0 B8?? 01046 btfsc TxFlag, SKPSHFB ; INSERT su tastierino numerico ? |
||
1247 | 0006A2 D??? 01047 bra KbdProc21 ; si - non testa SHIFT |
||
1248 | 0006A4 0EC0 01048 movlw SHFALL |
||
1249 | 0006A6 14?? 01049 andwf ShfSt, W ; test SHIFT/ALT/CTRL |
||
1250 | 0006A8 E1?? 01050 bnz KbdProc22 ; no toggle |
||
1251 | 0006AA 01051 KbdProc21: |
||
1252 | 0006AA BC?? 01052 btfsc RxFlag, RXBRK ; test tasto rilasciato |
||
1253 | 0006AC D??? 01053 bra KbdProc22 |
||
1254 | 0006AE 74?? 01054 btg TglSt, INSTB ; toggle bit INSERT |
||
1255 | 01055 |
||
1256 | 0006B0 01056 KbdProc22: |
||
1257 | 01057 ; imposta flag in TglSt per ESC e PRINT SCRN |
||
1258 | 0006B0 0E1E 01058 movlw PRTCODE |
||
1259 | 0006B2 5C?? 01059 subwf RxCode, W |
||
1260 | 0006B4 E0?? 01060 bz KbdProc23 |
||
1261 | 0006B6 0E1F 01061 movlw ESCCODE |
||
1262 | 0006B8 5C?? 01062 subwf RxCode, W |
||
1263 | 0006BA E1?? 01063 bnz KbdProc24 |
||
1264 | 0006BC 01064 KbdProc23: |
||
1265 | 0006BC 0E03 01065 movlw ESCPRNM ; imposta flag ESC e PRINT SCRN |
||
1266 | 0006BE 14?? 01066 andwf RptSt, W ; da RptSt a TglSt |
||
1267 | 0006C0 12?? 01067 iorwf TglSt, F |
||
1268 | 01068 |
||
1269 | 0006C2 01069 KbdProc24: |
||
1270 | 01070 ; gestione tasti CR, TAB, SHIFT-CR, SHIFT-TAB, '<' e '>' mappa IT |
||
1271 | 0006C2 0E0A 01071 movlw CRCODE |
||
1272 | 0006C4 5C?? 01072 subwf RxCode, W |
||
1273 | 0006C6 E3?? 01073 bnc KbdProc26 ; RxCode < CRCODE |
||
1274 | 0006C8 0E10 01074 movlw KPBARCODE |
||
1275 | 0006CA 5C?? 01075 subwf RxCode, W |
||
1276 | 0006CC E2?? 01076 bc KbdProc26 ; RxCode >= KPBARCODE |
||
1277 | 0006CE AE?? 01077 btfss ShfSt, ASHFB ; SHIFT ? |
||
1278 | 0006D0 D??? 01078 bra KbdProc25 ; NO |
||
1279 | 0006D2 BC?? 01079 btfsc ShfSt, ALTCTLB ; CTRL/ALT ? |
||
1280 | 0006D4 D??? 01080 bra KbdProc25 ; SI |
||
1281 | 0006D6 2A?? 01081 incf RxCode, F ; SHIFT -> increnmenta codice |
||
1282 | 0006D8 01082 KbdProc25: |
||
1283 | 0006D8 D??? 01083 rcall GetKeyTbl ; legge nuovamente codice/flag tasto |
||
1284 | 0006DA 52?? 01084 movf TxData1, F ; test se codice tasto = 0 |
||
1285 | 0006DC E1?? 01085 bnz KbdProc50 ; gestione tasto |
||
1286 | 0006DE D??? 01086 bra ClrRX ; scarta codice nullo |
||
1287 | 01087 |
||
1288 | 0006E0 01088 KbdProc26: |
||
1289 | 01089 ; tasti funzione - a questo punto CODE < MAPCODE (42) |
||
1290 | 0006E0 0E36 01090 movlw FNCCODE ; range tasti funzione 36..41 |
||
1291 | 0006E2 5C?? 01091 subwf RxCode, W |
||
1292 | 0006E4 E3?? 01092 bnc KbdProc50 ; gestione tasti per codici < FNCCODE (36) |
||
1293 | 01093 |
||
1294 | 01094 ; FX -> A0..AB |
||
1295 | 01095 ; SHIFT + FX -> AC..B7 |
||
1296 | 01096 ; CTL + FX -> B8..C3 |
||
1297 | 01097 ; ALT + FX -> C4..CF |
||
1298 | 01098 ; CTL + SHIFT + FX -> D0..DB |
||
1299 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 23 |
||
1300 | |||
1301 | |||
1302 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1303 | VALUE |
||
1304 | |||
1305 | 01099 ; CTL + ALT + FX -> DC..E7 |
||
1306 | 01100 ; ALT + SHIFT + FX -> E8..F3 |
||
1307 | 01101 ; CTL + ALT + SHIFT + FX -> F4..FF |
||
1308 | 01102 |
||
1309 | 0006E6 AE?? 01103 btfss ShfSt, ASHFB |
||
1310 | 0006E8 D??? 01104 bra FnNoShf |
||
1311 | 0006EA 0E0C 01105 movlw D'12' ; SHIFT + Fx |
||
1312 | 0006EC AC?? 01106 btfss ShfSt, ALTCTLB ; ALT o CTRL ? |
||
1313 | 0006EE D??? 01107 bra FnAdd ; no - SHIFT + FX |
||
1314 | 0006F0 0E30 01108 movlw D'48' |
||
1315 | 0006F2 AE?? 01109 btfss CtlSt, AALTB ; ALT ? |
||
1316 | 0006F4 D??? 01110 bra FnAdd ; no - SHIFT + CTRL + Fx |
||
1317 | 0006F6 0E48 01111 movlw D'72' |
||
1318 | 0006F8 AC?? 01112 btfss CtlSt, ACTLB ; CTRL ? |
||
1319 | 0006FA D??? 01113 bra FnAdd ; no - SHIFT + ALT + Fx |
||
1320 | 0006FC 0E54 01114 movlw D'84' ; SHIFT + ALT + CTRL + Fx |
||
1321 | 0006FE D??? 01115 bra FnAdd |
||
1322 | 000700 01116 FnNoShf: |
||
1323 | 000700 0E00 01117 movlw D'0' ; Fx |
||
1324 | 000702 AC?? 01118 btfss ShfSt, ALTCTLB ; ALT o CTRL ? |
||
1325 | 000704 D??? 01119 bra FnAdd ; no - FX |
||
1326 | 000706 0E18 01120 movlw D'24' |
||
1327 | 000708 AE?? 01121 btfss CtlSt, AALTB ; ALT ? |
||
1328 | 00070A D??? 01122 bra FnAdd ; no - CTRL + Fx |
||
1329 | 00070C 0E24 01123 movlw D'36' |
||
1330 | 00070E AC?? 01124 btfss CtlSt, ACTLB ; CTRL ? |
||
1331 | 000710 D??? 01125 bra FnAdd ; no - ALT + Fx |
||
1332 | 000712 0E3C 01126 movlw D'60' ; ALT + CTRL + Fx |
||
1333 | 000714 01127 FnAdd: |
||
1334 | 000714 26?? 01128 addwf TxData1, F |
||
1335 | 000716 D??? 01129 bra KeySnd ; tasti funzione inviati senza altri test |
||
1336 | 01130 |
||
1337 | 000718 01131 KbdProc40: ; gestione tasto alfabetico |
||
1338 | 01132 ldw Caps ; 'A'..'Z' |
||
1339 | 000718 50?? M movf Caps, w |
||
1340 | 00071A 01133 KbdProc41: ; gestione tasto ASCII non-alpha |
||
1341 | 00071A 6E?? 01134 movwf RxData ; codice tasto attuale (TxData1) |
||
1342 | 00071C 0E40 01135 movlw '@' |
||
1343 | 00071E 5C?? 01136 subwf RxData, W |
||
1344 | 000720 E3?? 01137 bnc KbdProc50 ; key < '@' (40) |
||
1345 | 000722 0E60 01138 movlw '`' |
||
1346 | 000724 5C?? 01139 subwf RxData, W |
||
1347 | 000726 E2?? 01140 bc KbdProc50 ; key >= '`' (60) |
||
1348 | 000728 AE?? 01141 btfss CtlSt, AALTB ; ALT ? |
||
1349 | 00072A D??? 01142 bra KbdProc42 ; NO |
||
1350 | 00072C 0E1F 01143 movlw 0x1F |
||
1351 | 00072E 14?? 01144 andwf RxData, W ; converte in 00..1F |
||
1352 | 000730 0F60 01145 addlw 0x60 ; converte in 60..7F |
||
1353 | 000732 6E?? 01146 movwf TxData1 ; codice controllo |
||
1354 | 000734 0EA0 01147 movlw 0xA0 ; flag codice controllo |
||
1355 | 000736 6E?? 01148 movwf TxData0 |
||
1356 | 000738 D??? 01149 bra KbdProc50 |
||
1357 | 00073A 01150 KbdProc42: |
||
1358 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 24 |
||
1359 | |||
1360 | |||
1361 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1362 | VALUE |
||
1363 | |||
1364 | 00073A AC?? 01151 btfss CtlSt, ACTLB ; CTRL ? |
||
1365 | 00073C D??? 01152 bra KbdProc43 ; NO |
||
1366 | 00073E 0E1F 01153 movlw 0x1F |
||
1367 | 000740 14?? 01154 andwf RxData, W ; converte in 00..1F |
||
1368 | 000742 6E?? 01155 movwf TxData1 ; codice ASCII |
||
1369 | 000744 6A?? 01156 clrf TxData0 ; flag codice ASCII |
||
1370 | 000746 D??? 01157 bra KbdProc50 |
||
1371 | 000748 01158 KbdProc43: |
||
1372 | 01159 ; test SHIFT / CAPS-LOCK per tasti alfabetici |
||
1373 | 000748 AC?? 01160 btfss MapCfg, MAPALPHA |
||
1374 | 00074A D??? 01161 bra KbdProc50 ; no tasto alfabetico |
||
1375 | 01162 ldw ShfSt ; SHIFT |
||
1376 | 00074C 50?? M movf ShfSt, w |
||
1377 | 00074E 18?? 01163 xorwf TglSt, W ; confronta con CAPS LOCK |
||
1378 | 000750 0B80 01164 andlw 0x80 ; interessa bit 7 soltanto |
||
1379 | 000752 E0?? 01165 bz KbdProc50 ; o NO SHIFT oppure CAPS LOCK + SHIFT -> a..z |
||
1380 | 01166 ldw Caps ; o SHIFT oppure CAPS LOCK -> A..Z |
||
1381 | 000754 50?? M movf Caps, w |
||
1382 | 000756 6E?? 01167 movwf TxData1 |
||
1383 | 01168 |
||
1384 | 000758 01169 KbdProc50: |
||
1385 | 01170 ; ALT 0..9 -> 30..39 |
||
1386 | 01171 ; CTRL 0..9 -> 40..49 |
||
1387 | 01172 ; CTRL + ALT 0..9 -> 50..59 |
||
1388 | 000758 BE?? 01173 btfsc TxData0, 7 |
||
1389 | 00075A D??? 01174 bra Key10 ; codice di controllo |
||
1390 | 00075C 0E30 01175 movlw '0' ; test tasto numerico |
||
1391 | 00075E 5C?? 01176 subwf TxData1, W |
||
1392 | 000760 6E?? 01177 movwf RxData ; 0..9 |
||
1393 | 000762 E3?? 01178 bnc Key06 |
||
1394 | 000764 0E3A 01179 movlw ('9' + 1) |
||
1395 | 000766 5C?? 01180 subwf TxData1, W |
||
1396 | 000768 E2?? 01181 bc Key06 |
||
1397 | 00076A AE?? 01182 btfss CtlSt, AALTB ; ALT ? |
||
1398 | 00076C D??? 01183 bra Key01 ; NO |
||
1399 | 00076E 0E30 01184 movlw ALTKEY0 ; ALT + 0..9 |
||
1400 | 000770 BC?? 01185 btfsc CtlSt, ACTLB ; CTRL + ALT ? |
||
1401 | 000772 0E50 01186 movlw ALTCTLKEY0 ; CTRL + ALT + 0..9 |
||
1402 | 000774 D??? 01187 bra Key02 |
||
1403 | 000776 01188 Key01: |
||
1404 | 000776 AC?? 01189 btfss CtlSt, ACTLB ; CTRL ? |
||
1405 | 000778 D??? 01190 bra KeySnd ; NO - lascia inalterato il tasto |
||
1406 | 00077A 0E40 01191 movlw CTLKEY0 ; CTRL + 0..9 |
||
1407 | 00077C 01192 Key02: |
||
1408 | 00077C 24?? 01193 addwf RxData, W |
||
1409 | 00077E 6E?? 01194 movwf TxData1 ; codice controllo |
||
1410 | 000780 0EA0 01195 movlw 0xA0 ; flag codice controllo |
||
1411 | 000782 6E?? 01196 movwf TxData0 |
||
1412 | 000784 D??? 01197 bra KeySnd ; invia tasto |
||
1413 | 000786 01198 Key06: |
||
1414 | 000786 0E1B 01199 movlw KB_ESCAPE ; ESC, TAB, +, - |
||
1415 | 000788 5C?? 01200 subwf TxData1, W |
||
1416 | 00078A E0?? 01201 bz Key10 |
||
1417 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 25 |
||
1418 | |||
1419 | |||
1420 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1421 | VALUE |
||
1422 | |||
1423 | 00078C 0E09 01202 movlw KB_TAB |
||
1424 | 00078E 5C?? 01203 subwf TxData1, W |
||
1425 | 000790 E0?? 01204 bz Key10 |
||
1426 | 000792 0E2B 01205 movlw '+' |
||
1427 | 000794 5C?? 01206 subwf TxData1, W |
||
1428 | 000796 E0?? 01207 bz Key10 |
||
1429 | 000798 0E2D 01208 movlw '-' |
||
1430 | 00079A 5C?? 01209 subwf TxData1, W |
||
1431 | 00079C E1?? 01210 bnz KeySnd |
||
1432 | 00079E 01211 Key10: |
||
1433 | 00079E 0E70 01212 movlw SKPALL ; tasti cursore da tastierino numerico |
||
1434 | 0007A0 14?? 01213 andwf TxFlag, W ; non vengono testati per SHIFT/CTRL/ALT |
||
1435 | 0007A2 0870 01214 sublw SKPALL |
||
1436 | 0007A4 E0?? 01215 bz KeySnd |
||
1437 | 0007A6 0E?? 01216 movlw LOW SPCKEY ; imposta ptr tabella tasti speciali |
||
1438 | 0007A8 6EF6 01217 movwf TBLPTRL |
||
1439 | 0007AA 0E?? 01218 movlw HIGH SPCKEY |
||
1440 | 0007AC 6EF7 01219 movwf TBLPTRH |
||
1441 | 0007AE 68?? 01220 setf E1Cnt ; indice tabella (inizializzato a 0xFF) |
||
1442 | 0007B0 01221 Key11: |
||
1443 | 0007B0 2A?? 01222 incf E1Cnt, F ; update indice |
||
1444 | 0007B2 0009 01223 tblrd *+ ; legge byte da memoria ed incrementa ptr |
||
1445 | 0007B4 0EFF 01224 movlw 0xFF ; test fine tabella |
||
1446 | 0007B6 5CF5 01225 subwf TABLAT, W |
||
1447 | 0007B8 E0?? 01226 bz KeySnd ; termina sequenza |
||
1448 | 01227 ldw TxData1 ; confronta con tasto |
||
1449 | 0007BA 50?? M movf TxData1, w |
||
1450 | 0007BC 5CF5 01228 subwf TABLAT, W |
||
1451 | 0007BE E1?? 01229 bnz Key11 ; loop |
||
1452 | 0007C0 0EC0 01230 movlw B'11000000' |
||
1453 | 0007C2 14?? 01231 andwf CtlSt, W ; test ALT e/o CTRL |
||
1454 | 0007C4 E0?? 01232 bz Key13 ; test SHIFT |
||
1455 | 0007C6 08C0 01233 sublw B'11000000' ; CTRL + ALT ? |
||
1456 | 0007C8 E1?? 01234 bnz Key12 ; NO |
||
1457 | 0007CA 0E03 01235 movlw 0x03 ; CTRL + ALT |
||
1458 | 0007CC D??? 01236 bra Key15 |
||
1459 | 0007CE 01237 Key12: |
||
1460 | 0007CE 0E01 01238 movlw 0x01 |
||
1461 | 0007D0 BE?? 01239 btfsc CtlSt, AALTB |
||
1462 | 0007D2 D??? 01240 bra Key15 ; ALT |
||
1463 | 0007D4 0E02 01241 movlw 0x02 |
||
1464 | 0007D6 D??? 01242 bra Key15 ; CTRL |
||
1465 | 0007D8 01243 Key13: |
||
1466 | 0007D8 AE?? 01244 btfss ShfSt, ASHFB |
||
1467 | 0007DA D??? 01245 bra KeySnd ; no SHIFT - non modifica tasto |
||
1468 | 0007DC 0E00 01246 movlw 0x00 |
||
1469 | 0007DE 01247 Key15: |
||
1470 | 0007DE 90D8 01248 bcf STATUS, C |
||
1471 | 0007E0 36?? 01249 rlcf E1Cnt, F |
||
1472 | 0007E2 36?? 01250 rlcf E1Cnt, F ; * 4 |
||
1473 | 0007E4 26?? 01251 addwf E1Cnt, F |
||
1474 | 0007E6 0E?? 01252 movlw LOW SPCKEY2 ; imposta ptr tabella SPCKEY2 |
||
1475 | 0007E8 24?? 01253 addwf E1Cnt, W ; aggiunge indice |
||
1476 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 26 |
||
1477 | |||
1478 | |||
1479 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1480 | VALUE |
||
1481 | |||
1482 | 0007EA 6EF6 01254 movwf TBLPTRL |
||
1483 | 0007EC 0E?? 01255 movlw HIGH SPCKEY2 |
||
1484 | 0007EE 6EF7 01256 movwf TBLPTRH |
||
1485 | 0007F0 6AE8 01257 clrf WREG |
||
1486 | 0007F2 22F7 01258 addwfc TBLPTRH, F |
||
1487 | 0007F4 0009 01259 tblrd *+ ; codice |
||
1488 | 01260 ldw TABLAT |
||
1489 | 0007F6 50F5 M movf TABLAT, w |
||
1490 | 0007F8 E0?? 01261 bz KeySnd ; tasto null |
||
1491 | 0007FA 6E?? 01262 movwf TxData1 |
||
1492 | 0007FC 0E?? 01263 movlw LOW SPCKEY3 ; imposta ptr tabella SPCKEY3 |
||
1493 | 0007FE 24?? 01264 addwf E1Cnt, W ; aggiunge indice |
||
1494 | 000800 6EF6 01265 movwf TBLPTRL |
||
1495 | 000802 0E?? 01266 movlw HIGH SPCKEY3 |
||
1496 | 000804 6EF7 01267 movwf TBLPTRH |
||
1497 | 000806 6AE8 01268 clrf WREG |
||
1498 | 000808 22F7 01269 addwfc TBLPTRH, F |
||
1499 | 00080A 0009 01270 tblrd *+ ; codice |
||
1500 | 01271 ldw TABLAT |
||
1501 | 00080C 50F5 M movf TABLAT, w |
||
1502 | 00080E 6E?? 01272 movwf TxData0 |
||
1503 | 000810 0EC0 01273 movlw 0xC0 |
||
1504 | 000812 5C?? 01274 subwf TxData0, W |
||
1505 | 000814 E0?? 01275 bz KbdProc60 |
||
1506 | 01276 |
||
1507 | 000816 01277 KeySnd: |
||
1508 | 000816 BC?? 01278 btfsc RxFlag, RXBRK ; test tasto rilasciato |
||
1509 | 000818 8C?? 01279 bsf TxData0, KEYRLS ; SI - imposta bit rilascio |
||
1510 | 00081A A8?? 01280 btfss TxData0, KEYTGL ; invia flag toggle low ? |
||
1511 | 00081C D??? 01281 bra PutKey ; NO |
||
1512 | 01282 ldw TglSt |
||
1513 | 00081E 50?? M movf TglSt, w |
||
1514 | 000820 0B0F 01283 andlw B'00001111' |
||
1515 | 000822 12?? 01284 iorwf TxData0, F ; 4 bit bassi corrispondono ai 4 bit di TglSt |
||
1516 | 000824 D??? 01285 bra PutKey |
||
1517 | 01286 |
||
1518 | 000826 01287 KbdProc60: |
||
1519 | 01288 ; setta NMI all' host |
||
1520 | 000826 6A?? 01289 clrf Caps ; contatore temporaneo |
||
1521 | 000828 01290 KbdProc61: |
||
1522 | 000828 A280 01291 btfss PORTA, HLNMI ; host busy |
||
1523 | 00082A D??? 01292 bra NMISnd ; NMI non attivo - attiva |
||
1524 | 00082C 3E?? 01293 incfsz Caps, F ; attende host libero |
||
1525 | 00082E D??? 01294 bra KbdProc61 |
||
1526 | 000830 EF?? F??? 01295 goto ClrRX ; scarta codice NMI |
||
1527 | 000834 01296 NMISnd: |
||
1528 | 000834 0E02 01297 movlw 0x02 ; porta NMI |
||
1529 | 000836 6E8D 01298 movwf LATE ; indirizzo KFR |
||
1530 | 01299 ldw TxData1 ; codice NMI |
||
1531 | 000838 50?? M movf TxData1, w |
||
1532 | 00083A D??? 01300 rcall KFRWrite ; codice in porta NMI |
||
1533 | 00083C 9882 01301 bcf PORTC, KFRSSN ; attiva NMI host |
||
1534 | 00083E 0000 01302 nop |
||
1535 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 27 |
||
1536 | |||
1537 | |||
1538 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1539 | VALUE |
||
1540 | |||
1541 | 000840 8882 01303 bsf PORTC, KFRSSN |
||
1542 | 000842 D??? 01304 bra ClrRX |
||
1543 | 01305 |
||
1544 | 000844 01306 GetKeyTbl: |
||
1545 | 000844 0E?? 01307 movlw LOW KEYTBL ; imposta ptr tabella conversione KEYTBL |
||
1546 | 000846 24?? 01308 addwf RxCode, W ; aggiunge indice |
||
1547 | 000848 6EF6 01309 movwf TBLPTRL |
||
1548 | 00084A 0E?? 01310 movlw HIGH KEYTBL |
||
1549 | 00084C 6EF7 01311 movwf TBLPTRH |
||
1550 | 00084E 6AE8 01312 clrf WREG |
||
1551 | 000850 22F7 01313 addwfc TBLPTRH, F |
||
1552 | 000852 0008 01314 tblrd * ; codice tasto |
||
1553 | 01315 ldw TABLAT |
||
1554 | 000854 50F5 M movf TABLAT, w |
||
1555 | 000856 6E?? 01316 movwf TxData1 ; codice tasto |
||
1556 | 000858 0E?? 01317 movlw LOW FLGTBL ; imposta ptr tabella conversione FLGTBL |
||
1557 | 00085A 24?? 01318 addwf RxCode, W ; aggiunge indice |
||
1558 | 00085C 6EF6 01319 movwf TBLPTRL |
||
1559 | 00085E 0E?? 01320 movlw HIGH FLGTBL |
||
1560 | 000860 6EF7 01321 movwf TBLPTRH |
||
1561 | 000862 6AE8 01322 clrf WREG |
||
1562 | 000864 22F7 01323 addwfc TBLPTRH, F |
||
1563 | 000866 0008 01324 tblrd * ; flag tasto |
||
1564 | 01325 ldw TABLAT |
||
1565 | 000868 50F5 M movf TABLAT, w |
||
1566 | 00086A 6E?? 01326 movwf TxData0 ; flag tasto |
||
1567 | 00086C 0012 01327 return |
||
1568 | 01328 |
||
1569 | 01329 |
||
1570 | 00086E 01330 KFRWrite: |
||
1571 | 00086E 6E8C 01331 movwf LATD ; byte da scrivere nel registro |
||
1572 | 000870 6A95 01332 clrf DDRD ; porta D in uscita |
||
1573 | 000872 0000 01333 nop |
||
1574 | 000874 0000 01334 nop ; dato stabile |
||
1575 | 000876 928B 01335 bcf LATC, KFRWE ; impulso write |
||
1576 | 000878 0000 01336 nop |
||
1577 | 00087A 828B 01337 bsf LATC, KFRWE |
||
1578 | 00087C 0000 01338 nop |
||
1579 | 00087E 0012 01339 return |
||
1580 | 01340 |
||
1581 | 000880 01341 KFRRead: |
||
1582 | 000880 6895 01342 setf DDRD ; Porta D input |
||
1583 | 000882 6A8D 01343 clrf LATE ; indirizzo file reg. = 0 |
||
1584 | 000884 0E04 01344 movlw 0x04 ; contatore registri |
||
1585 | 000886 6E?? 01345 movwf KFRRdCnt |
||
1586 | 000888 EE?? F0?? 01346 lfsr FSR0, KFRRd0 ; puntatore registro 0 |
||
1587 | 00088C 01347 KFRRead1: |
||
1588 | 00088C 908B 01348 bcf LATC, KFRRD ; lettura registro |
||
1589 | 00088E 0000 01349 nop |
||
1590 | 000890 0000 01350 nop |
||
1591 | 000892 01351 KFRRead2: |
||
1592 | 01352 ldw PORTD ; legge porta D |
||
1593 | 000892 5083 M movf PORTD, w |
||
1594 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 28 |
||
1595 | |||
1596 | |||
1597 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1598 | VALUE |
||
1599 | |||
1600 | 000894 6283 01353 cpfseq PORTD ; attende dato stabile |
||
1601 | 000896 D??? 01354 bra KFRRead2 |
||
1602 | 000898 808B 01355 bsf LATC, KFRRD ; linea lettura alta |
||
1603 | 00089A 6EEE 01356 movwf POSTINC0 ; memorizza dato registro |
||
1604 | 00089C 2A8D 01357 incf LATE, f ; incrementa indirizzo |
||
1605 | 00089E 2E?? 01358 decfsz KFRRdCnt, f ; loop |
||
1606 | 0008A0 D??? 01359 bra KFRRead1 |
||
1607 | 0008A2 6A8D 01360 clrf LATE |
||
1608 | 0008A4 9E?? 01361 bcf KFRFlag, KFRFULL ; azzera flag richiesta servizio |
||
1609 | 0008A6 0EE1 01362 movlw 0xE1 ; set lock led |
||
1610 | 0008A8 5C?? 01363 subwf KFRRd0, W |
||
1611 | 0008AA E1?? 01364 bnz Cmd0 |
||
1612 | 0008AC D??? 01365 rcall SetLed |
||
1613 | 0008AE 6A?? 01366 clrf KFRRd3 ; errore ? |
||
1614 | 0008B0 B0?? 01367 btfsc KbdFlag, KBLEDOK |
||
1615 | 0008B2 68?? 01368 setf KFRRd3 |
||
1616 | 0008B4 D??? 01369 bra CmdRsp |
||
1617 | 0008B6 01370 Cmd0: |
||
1618 | 0008B6 0EC1 01371 movlw 0xC1 ; start scanning |
||
1619 | 0008B8 5C?? 01372 subwf KFRRd0, W |
||
1620 | 0008BA E1?? 01373 bnz Cmd1 |
||
1621 | 01374 SCLOCKH |
||
1622 | 0008BC 888A M bsf LATB, KCLKO |
||
1623 | 0008BE D??? 01375 bra CmdEnd |
||
1624 | 0008C0 01376 Cmd1: |
||
1625 | 0008C0 0EC2 01377 movlw 0xC2 ; RESET |
||
1626 | 0008C2 5C?? 01378 subwf KFRRd0, W |
||
1627 | 0008C4 E1?? 01379 bnz Cmd2 |
||
1628 | 0008C6 9EF2 01380 bcf INTCON, GIEH ; disabilita INT high priority |
||
1629 | 0008C8 9CF2 01381 bcf INTCON, GIEL ; disabilita INT low priority |
||
1630 | 0008CA 9C8B 01382 bcf LATC, KBVOFF ; impulso negativo VCC tastiera |
||
1631 | 0008CC 0E07 01383 movlw TMR0P256 ; TMR0 stop, prescaler = 256, modo 16 bit |
||
1632 | 0008CE 6ED5 01384 movwf T0CON |
||
1633 | 0008D0 94F2 01385 bcf INTCON, TMR0IF ; azzera flag timeout |
||
1634 | 0008D2 0E8D 01386 movlw HIGH(T1500MS) ; imposta timeout 1500ms |
||
1635 | 0008D4 6ED7 01387 movwf TMR0H ; caricare prima TMR0H |
||
1636 | 0008D6 0E90 01388 movlw LOW(T1500MS) |
||
1637 | 0008D8 6ED6 01389 movwf TMR0L ; carica TMR0L/H |
||
1638 | 0008DA 8ED5 01390 bsf T0CON, TMR0ON ; start Timer 0 |
||
1639 | 0008DC 01391 Wait1: |
||
1640 | 0008DC A4F2 01392 btfss INTCON, TMR0IF |
||
1641 | 0008DE D??? 01393 bra Wait1 ; timeout |
||
1642 | 01394 |
||
1643 | 01395 ;bsf LATC, KBVOFF |
||
1644 | 0008E0 968B 01396 bcf LATC, KFRSRP ; azzera linea DRQ verso host |
||
1645 | 0008E2 0000 01397 nop |
||
1646 | 0008E4 0000 01398 nop |
||
1647 | 0008E6 868B 01399 bsf LATC, KFRSRP |
||
1648 | 0008E8 00FF 01400 reset |
||
1649 | 0008EA 01401 Cmd2: |
||
1650 | 0008EA D??? 01402 bra CmdEnd |
||
1651 | 0008EC 01403 CmdRsp: |
||
1652 | 0008EC 0E03 01404 movlw 0x03 |
||
1653 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 29 |
||
1654 | |||
1655 | |||
1656 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1657 | VALUE |
||
1658 | |||
1659 | 0008EE 6E8D 01405 movwf LATE |
||
1660 | 01406 ldw KFRRd3 |
||
1661 | 0008F0 50?? M movf KFRRd3, w |
||
1662 | 0008F2 D??? 01407 rcall KFRWrite |
||
1663 | 0008F4 D??? 01408 bra CmdEnd |
||
1664 | 01409 |
||
1665 | 0008F6 01410 CmdEnd: |
||
1666 | 0008F6 968B 01411 bcf LATC, KFRSRP ; azzera linea DRQ verso host |
||
1667 | 0008F8 0000 01412 nop |
||
1668 | 0008FA 0000 01413 nop |
||
1669 | 0008FC 868B 01414 bsf LATC, KFRSRP |
||
1670 | 0008FE 0012 01415 return |
||
1671 | 01416 |
||
1672 | 000900 01417 SetLed: |
||
1673 | 01418 ldw TglSt |
||
1674 | 000900 50?? M movf TglSt, w |
||
1675 | 000902 6E?? 01419 movwf TTglSt |
||
1676 | 01420 ldw KFRRd1 |
||
1677 | 000904 50?? M movf KFRRd1, w |
||
1678 | 000906 6E?? 01421 movwf TglSt |
||
1679 | 000908 01422 SetLed1: |
||
1680 | 01423 ldw TglSt |
||
1681 | 000908 50?? M movf TglSt, w |
||
1682 | 00090A 6E?? 01424 movwf LedSt |
||
1683 | 00090C 42?? 01425 rrncf LedSt, F |
||
1684 | 00090E 42?? 01426 rrncf LedSt, F |
||
1685 | 000910 42?? 01427 rrncf LedSt, F |
||
1686 | 000912 42?? 01428 rrncf LedSt, F |
||
1687 | 000914 40?? 01429 rrncf LedSt, W |
||
1688 | 000916 0B07 01430 andlw B'00000111' |
||
1689 | 000918 6E?? 01431 movwf LedSt |
||
1690 | 01432 ldw LATB ; salva porta B |
||
1691 | 00091A 508A M movf LATB, w |
||
1692 | 00091C 6E?? 01433 movwf TPortB |
||
1693 | 01434 SCLOCKL ; inibisce TX da tastiera |
||
1694 | 00091E 988A M bcf LATB, KCLKO |
||
1695 | 000920 9EF2 01435 bcf INTCON, GIEH ; disabilita INT high priority |
||
1696 | 000922 9CF2 01436 bcf INTCON, GIEL ; disabilita INT low priority |
||
1697 | 000924 EC?? F??? 01437 call SendLed |
||
1698 | 000928 A8?? 01438 btfss TPortB, KCLKO ; disabilita TX da tast. se era disabilitato |
||
1699 | 01439 SCLOCKL |
||
1700 | 00092A 988A M bcf LATB, KCLKO |
||
1701 | 00092C 92F2 01440 bcf INTCON, INT0IF ; resetta flag INT0 |
||
1702 | 00092E 8EF2 01441 bsf INTCON, GIEH ; abilita INT high priority |
||
1703 | 000930 8CF2 01442 bsf INTCON, GIEL ; abilita INT low priority |
||
1704 | 000932 E3?? 01443 bnc SetLed2 ; comando LED riuscito |
||
1705 | 01444 ldw TTglSt ; errore -> ignora tasto |
||
1706 | 000934 50?? M movf TTglSt, w |
||
1707 | 000936 6E?? 01445 movwf TglSt ; reimposta flag toggle precedente |
||
1708 | 01446 ldw TLockSt |
||
1709 | 000938 50?? M movf TLockSt, w |
||
1710 | 00093A 6E?? 01447 movwf LockSt |
||
1711 | 00093C 90?? 01448 bcf KbdFlag, KBLEDOK ; comando LED fallito |
||
1712 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 30 |
||
1713 | |||
1714 | |||
1715 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1716 | VALUE |
||
1717 | |||
1718 | 00093E 0012 01449 return ; fail |
||
1719 | 000940 01450 SetLed2: |
||
1720 | 000940 80?? 01451 bsf KbdFlag, KBLEDOK |
||
1721 | 000942 0012 01452 return |
||
1722 | 01453 |
||
1723 | 000944 01454 SndProc: ; invia word nella coda TX ad host |
||
1724 | 000944 B080 01455 btfsc PORTA, HLINT ; host busy ? |
||
1725 | 000946 0012 01456 return ; si |
||
1726 | 01457 ldw TxTailL ; imposta ptr head al buffer |
||
1727 | 000948 50?? M movf TxTailL, w |
||
1728 | 00094A 6EE9 01458 movwf FSR0L |
||
1729 | 01459 ldw TxTailH |
||
1730 | 00094C 50?? M movf TxTailH, w |
||
1731 | 00094E 6EEA 01460 movwf FSR0H |
||
1732 | 01461 ldw POSTINC0 |
||
1733 | 000950 50EE M movf POSTINC0, w |
||
1734 | 000952 6E?? 01462 movwf TxData0 |
||
1735 | 01463 ldw POSTINC0 |
||
1736 | 000954 50EE M movf POSTINC0, w |
||
1737 | 000956 6E?? 01464 movwf TxData1 |
||
1738 | 000958 6A8D 01465 clrf LATE ; indirizzo KFR = 0 |
||
1739 | 01466 ldw TxData0 ; flag tasto |
||
1740 | 00095A 50?? M movf TxData0, w |
||
1741 | 00095C D??? 01467 rcall KFRWrite |
||
1742 | 00095E 0E01 01468 movlw 0x01 ; indirizzo KFR = 1 |
||
1743 | 000960 6E8D 01469 movwf LATE |
||
1744 | 01470 ldw TxData1 ; codice tasto |
||
1745 | 000962 50?? M movf TxData1, w |
||
1746 | 000964 D??? 01471 rcall KFRWrite |
||
1747 | 000966 9A82 01472 bcf PORTC, KFRSSI ; attiva INT host |
||
1748 | 000968 0000 01473 nop |
||
1749 | 00096A 8A82 01474 bsf PORTC, KFRSSI |
||
1750 | 00096C 06?? 01475 decf TxCnt, F ; aggiorna contatore word nel buffer TX |
||
1751 | 01476 ldw FSR0L ; aggiorna ptr |
||
1752 | 00096E 50E9 M movf FSR0L, w |
||
1753 | 000970 6E?? 01477 movwf TxTailL |
||
1754 | 01478 ldw FSR0H |
||
1755 | 000972 50EA M movf FSR0H, w |
||
1756 | 000974 6E?? 01479 movwf TxTailH |
||
1757 | 000976 0E00 01480 movlw LOW(TxBufEnd) ; coda circolare - test puntatore |
||
1758 | 000978 5C?? 01481 subwf TxTailL, W ; TxTailL - LOW(TxBufEnd) |
||
1759 | 00097A 0E03 01482 movlw HIGH(TxBufEnd) ; TxTailH - HIGH(TxBufEnd) |
||
1760 | 00097C 58?? 01483 subwfb TxTailH, W ; C = 0 se TxTail < TxBufEnd |
||
1761 | 00097E A0D8 01484 btfss STATUS, C ; test buffer |
||
1762 | 000980 0012 01485 return ; C = 0 -> OK |
||
1763 | 000982 0E3E 01486 movlw LOW(TxBuffer) ; reimposta puntatore a inizio buffer |
||
1764 | 000984 6E?? 01487 movwf TxTailL |
||
1765 | 000986 0E01 01488 movlw HIGH(TxBuffer) |
||
1766 | 000988 6E?? 01489 movwf TxTailH |
||
1767 | 00098A 0012 01490 return |
||
1768 | 01491 |
||
1769 | 00098C 01492 Start: |
||
1770 | 00098C 0100 01493 movlb 0x00 |
||
1771 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 31 |
||
1772 | |||
1773 | |||
1774 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1775 | VALUE |
||
1776 | |||
1777 | 00098E EC?? F??? 01494 call InitIO |
||
1778 | 000992 9A89 01495 bcf LATA, RA5 ; bit READY |
||
1779 | 01496 |
||
1780 | 000994 01497 Main: |
||
1781 | 000994 A88A 01498 btfss LATB, KCLKO ; se TX disabilitato salta |
||
1782 | 000996 D??? 01499 bra Main2 |
||
1783 | 000998 EC?? F??? 01500 call KbdProc |
||
1784 | 00099C 66?? 01501 tstfsz TxCnt ; coda TX vuota |
||
1785 | 00099E D??? 01502 rcall SndProc ; invia word codice ad host |
||
1786 | 0009A0 01503 Main2: |
||
1787 | 0009A0 BE?? 01504 btfsc KFRFlag, KFRFULL ; host richiede servizio ? |
||
1788 | 0009A2 D??? 01505 rcall KFRRead ; si - lettura registro KFR |
||
1789 | 0009A4 D??? 01506 bra Main |
||
1790 | 01507 |
||
1791 | 01508 #include romtbl.inc |
||
1792 | 00001 |
||
1793 | 00002 ;NOLIST |
||
1794 | 00003 |
||
1795 | 00004 |
||
1796 | 00005 RomTbl code_pack |
||
1797 | 00006 ; Fill |
||
1798 | 000000 00 00 00 00 00 00007 dw 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 |
||
1799 | 00 00 00 00 00 |
||
1800 | 00 00 00 00 00 |
||
1801 | 00 |
||
1802 | 00008 |
||
1803 | 00009 ; mappa codici ASCII tastiera USA |
||
1804 | 000010 00010 USTBL: |
||
1805 | 000010 60 7E 00011 DB "`", "~" |
||
1806 | 000012 31 21 00012 DB "1", "!" |
||
1807 | 000014 32 40 00013 DB "2", "@" |
||
1808 | 000016 34 24 00014 DB "4", "$" |
||
1809 | 000018 33 23 00015 DB "3", "#" |
||
1810 | 00001A 35 25 00016 DB "5", "%" |
||
1811 | 00001C 36 5E 00017 DB "6", "^" |
||
1812 | 00001E 37 26 00018 DB "7", "&" |
||
1813 | 000020 38 2A 00019 DB "8", "*" |
||
1814 | 000022 2C 3C 00020 DB ",", "<" |
||
1815 | 000024 30 29 00021 DB "0", ")" |
||
1816 | 000026 39 28 00022 DB "9", "(" |
||
1817 | 000028 2E 3E 00023 DB ".", ">" |
||
1818 | 00002A 2F 3F 00024 DB "/", "?" |
||
1819 | 00002C 3B 3A 00025 DB ";", ":" |
||
1820 | 00002E 2D 5F 00026 DB "-", "_" |
||
1821 | 000030 27 22 00027 DB "'", "\"" |
||
1822 | 000032 5B 7B 00028 DB "[", "{" |
||
1823 | 000034 3D 2B 00029 DB "=", "+" |
||
1824 | 000036 5D 7D 00030 DB "]", "}" |
||
1825 | 000038 5C 7C 00031 DB "\\", "|" |
||
1826 | 00032 |
||
1827 | 00033 ; tabella tasti speciali SHIFT, ALT, CTRL, CTRL+ALT |
||
1828 | 00003A 00034 SPCKEY2: |
||
1829 | 00003A 01 02 03 04 00035 DB KB_SHIFTPRT, KB_ALTPRT, KB_CTLPRT, KB_ALTCTLPRT |
||
1830 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 32 |
||
1831 | |||
1832 | |||
1833 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1834 | VALUE |
||
1835 | |||
1836 | 00003E 05 06 07 08 00036 DB KB_SHIFTHOME, KB_ALTHOME, KB_CTLHOME, KB_ALTCTLHOME |
||
1837 | 000042 09 0A 0B 0C 00037 DB KB_SHIFTINS, KB_ALTINS, KB_CTLINS, KB_ALTCTLINS |
||
1838 | 000046 0D 0E 0F 10 00038 DB KB_SHIFTPGUP, KB_ALTPGUP, KB_CTLPGUP, KB_ALTCTLPGUP |
||
1839 | 00004A 11 12 13 14 00039 DB KB_SHIFTPGDWN, KB_ALTPGDWN, KB_CTLPGDWN, KB_ALTCTLPGDWN |
||
1840 | 00004E 15 16 17 80 00040 DB KB_SHIFTEND, KB_ALTEND, KB_CTLEND, KB_ALTCTLEND |
||
1841 | 000052 18 19 1A 81 00041 DB KB_SHIFTDEL, KB_ALTDEL, KB_CTLDEL, KB_ALTCTLDEL |
||
1842 | 000056 1B 1C 1D 82 00042 DB KB_SHIFTBKS, KB_ALTBKS, KB_CTLBKS, KB_ALTCTLBKS |
||
1843 | 00005A 00 1E 1F 88 00043 DB 0x00, KB_ALTESC, KB_CTLESC, KB_ALTCT |
||
1844 | LESC |
||
1845 | 00005E 00 20 21 22 00044 DB 0x00, KB_ALTTAB, KB_CTLTAB, KB_ALTCT |
||
1846 | LTAB |
||
1847 | 000062 00 23 24 25 00045 DB 0x00, KB_ALTPLUS, KB_CTLPLUS, KB_ALTCT |
||
1848 | LPLUS |
||
1849 | 000066 00 26 27 28 00046 DB 0x00, KB_ALTMINUS, KB_CTLMINUS, KB_ALTCTLMINUS |
||
1850 | 00047 |
||
1851 | 00048 ; tabella flag tasti speciali SHIFT, ALT, CTRL, CTRL+ALT |
||
1852 | 00006A 00049 SPCKEY3: |
||
1853 | 00006A A0 A0 A0 A0 00050 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1854 | 00006E A0 A0 A0 A0 00051 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1855 | 000072 A0 A0 A0 A0 00052 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1856 | 000076 A0 A0 A0 A0 00053 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1857 | 00007A A0 A0 A0 A0 00054 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1858 | 00007E A0 A0 A0 C0 00055 DB 0xA0, 0xA0, 0xA0, 0xC0 |
||
1859 | 000082 A0 A0 A0 C0 00056 DB 0xA0, 0xA0, 0xA0, 0xC0 |
||
1860 | 000086 A0 A0 A0 C0 00057 DB 0xA0, 0xA0, 0xA0, 0xC0 |
||
1861 | 00008A A0 A0 A0 C0 00058 DB 0xA0, 0xA0, 0xA0, 0xC0 |
||
1862 | 00008E A0 A0 A0 A0 00059 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1863 | 000092 A0 A0 A0 A0 00060 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1864 | 000096 A0 A0 A0 A0 00061 DB 0xA0, 0xA0, 0xA0, 0xA0 |
||
1865 | 00062 |
||
1866 | 00063 ; tabella tasti speciali |
||
1867 | 00009A 00064 SPCKEY: |
||
1868 | 00009A 83 00065 DB KB_PRTSCN |
||
1869 | 00009B 85 00066 DB KB_HOME |
||
1870 | 00009C 86 00067 DB KB_INSERT |
||
1871 | 00009D 88 00068 DB KB_PGUP |
||
1872 | 00009E 8A 00069 DB KB_PGDOWN |
||
1873 | 00009F 8C 00070 DB KB_END |
||
1874 | 0000A0 8E 00071 DB KB_DELETE |
||
1875 | 0000A1 90 00072 DB KB_BACKSPACE |
||
1876 | 0000A2 1B 00073 DB KB_ESCAPE |
||
1877 | 0000A3 09 00074 DB KB_TAB |
||
1878 | 0000A4 2B 00075 DB '+' |
||
1879 | 0000A5 2D 00076 DB '-' |
||
1880 | 0000A6 FF 00077 DB 0xFF |
||
1881 | 00078 |
||
1882 | 00079 ; SEQUENZA E0 12 E0 7C PRTSCR DOWN (SIMULA SHIFT *) |
||
1883 | 00080 ; SEQUENZA E0 F0 7C E0 F0 12 PRTSCR UP |
||
1884 | 00081 ; SEQUENXA E1 14 77 E1 F0 14 F0 77 PAUSE (SIMULA L-CTRL NUMLOCK) |
||
1885 | 00082 ; E1 indica tasti no-repeat |
||
1886 | 00083 |
||
1887 | 00084 ; PRIORITA' MODIFICATORI: ALT CTRL SHIFT CAPS/NUMLOCK |
||
1888 | 00085 |
||
1889 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 33 |
||
1890 | |||
1891 | |||
1892 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1893 | VALUE |
||
1894 | |||
1895 | 00086 ; Tabella codici prefissati da E1 - Tasto PAUSE (solo make) |
||
1896 | 00087 ; scan code: E1 14 77 E1 F0 14 F0 77 - di seguito la sequenza aspettata |
||
1897 | 0000A7 00088 EXT1TBL: |
||
1898 | 0000A7 14 77 E1 F0 14 00089 db 0x14, 0x77, 0xE1, 0xF0, 0x14, 0xF0, 0x77 |
||
1899 | F0 77 |
||
1900 | 00090 |
||
1901 | 00091 ; Tabella codici estesi (prefisso E0) |
||
1902 | 00092 ; NOTA: codice make PRNT -> E0 12 E0 7C (simula SHIFT *) |
||
1903 | 00093 ; codice break PRNT -> E0 F0 7C E0 F0 12 |
||
1904 | 00094 ; Tutte le sequenze E0 12 / E0 F0 12 / E0 59 / E0 F0 59 |
||
1905 | 00095 ; vengono scartate |
||
1906 | 00096 ; Per la combinazione CTRL BREAK (E0 7E E0 F0 7E) viene analizzata |
||
1907 | 00097 ; solo la parte che simula il rilascio (E0 F0 7E) |
||
1908 | 0000AE 00098 EXTTBL: |
||
1909 | 0000AE 7C 00099 DB 0x7C ; PRNT RILOCATO $00 |
||
1910 | 0000AF 11 00100 DB 0x11 ; R-ALT RILOCATO $10 |
||
1911 | 0000B0 14 00101 DB 0x14 ; R-CTRL RILOCATO $0F |
||
1912 | 0000B1 70 00102 DB 0x70 ; INS RILOCATO $13 |
||
1913 | 0000B2 71 00103 DB 0x71 ; DEL RILOCATO $08 |
||
1914 | 0000B3 6C 00104 DB 0x6C ; HOME RILOCATO $17 |
||
1915 | 0000B4 69 00105 DB 0x69 ; END RILOCATO $18 |
||
1916 | 0000B5 7A 00106 DB 0x7A ; PG-DOWN RILOCATO $19 |
||
1917 | 0000B6 7D 00107 DB 0x7D ; PG-UP RILOCATO $20 |
||
1918 | 0000B7 75 00108 DB 0x75 ; CSR-UP RILOCATO $28 |
||
1919 | 0000B8 6B 00109 DB 0x6B ; CSR-LEFT RILOCATO $30 |
||
1920 | 0000B9 72 00110 DB 0x72 ; CSR-DOWN RILOCATO $38 |
||
1921 | 0000BA 74 00111 DB 0x74 ; CSR-RIGHT RILOCATO $39 |
||
1922 | 0000BB 5A 00112 DB 0x5A ; KP-ENTER RILOCATO $5A |
||
1923 | 0000BC 4A 00113 DB 0x4A ; KP / RILOCATO $5F |
||
1924 | 0000BD 1F 00114 DB 0x1F ; L=GUI RILOCATO $1F |
||
1925 | 0000BE 27 00115 DB 0x27 ; R-GUI RILOCATO $27 |
||
1926 | 0000BF 2F 00116 DB 0x2F ; APPS RILOCATO $2F |
||
1927 | 0000C0 37 00117 DB 0x37 ; PWR RILOCATO $37 |
||
1928 | 0000C1 3F 00118 DB 0x3F ; SLEEP RILOCATO $3F |
||
1929 | 0000C2 5E 00119 DB 0x5E ; WAKE RILOCATO $5E |
||
1930 | 0000C3 7E 00120 DB 0x7E ; CTRL-BREAK RILOCATO $48 |
||
1931 | 0000C4 FF 00121 DB 0xFF ; FINE TABELLA |
||
1932 | 00122 |
||
1933 | 00123 ; Tabella rilocazione codici estesi (prefisso E0) |
||
1934 | 0000C5 00124 EXTRLTBL: |
||
1935 | 0000C5 00 00125 DB 0x00 ; PRNT RILOCATO $00 |
||
1936 | 0000C6 10 00126 DB 0x10 ; R-ALT RILOCATO $10 |
||
1937 | 0000C7 0F 00127 DB 0x0F ; R-CTRL RILOCATO $0F |
||
1938 | 0000C8 13 00128 DB 0x13 ; INS RILOCATO $13 |
||
1939 | 0000C9 08 00129 DB 0x08 ; DEL RILOCATO $08 |
||
1940 | 0000CA 17 00130 DB 0x17 ; HOME RILOCATO $17 |
||
1941 | 0000CB 18 00131 DB 0x18 ; END RILOCATO $18 |
||
1942 | 0000CC 19 00132 DB 0x19 ; PG-DOWN RILOCATO $19 |
||
1943 | 0000CD 20 00133 DB 0x20 ; PG-UP RILOCATO $20 |
||
1944 | 0000CE 28 00134 DB 0x28 ; CSR-UP RILOCATO $28 |
||
1945 | 0000CF 30 00135 DB 0x30 ; CSR-LEFT RILOCATO $30 |
||
1946 | 0000D0 38 00136 DB 0x38 ; CSR-DOWN RILOCATO $38 |
||
1947 | 0000D1 39 00137 DB 0x39 ; CSR-RIGHT RILOCATO $39 |
||
1948 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 34 |
||
1949 | |||
1950 | |||
1951 | LOC OBJECT CODE LINE SOURCE TEXT |
||
1952 | VALUE |
||
1953 | |||
1954 | 0000D2 5A 00138 DB 0x5A ; KP-ENTER RILOCATO $5A |
||
1955 | 0000D3 5F 00139 DB 0x5F ; KP / RILOCATO $5F |
||
1956 | 0000D4 1F 00140 DB 0x1F ; L=GUI RILOCATO $1F |
||
1957 | 0000D5 27 00141 DB 0x27 ; R-GUI RILOCATO $27 |
||
1958 | 0000D6 2F 00142 DB 0x2F ; APPS RILOCATO $2F |
||
1959 | 0000D7 37 00143 DB 0x37 ; PWR RILOCATO $37 |
||
1960 | 0000D8 3F 00144 DB 0x3F ; SLEEP RILOCATO $3F |
||
1961 | 0000D9 5E 00145 DB 0x5E ; WAKE RILOCATO $5E |
||
1962 | 0000DA 48 00146 DB 0x48 ; CTRL-BREAK RILOCATO $48 |
||
1963 | 00147 |
||
1964 | 00148 ; Codici normali da rilocare |
||
1965 | 00149 ; I codici da 70 a 7E vanno rilocati in 60 - 6E |
||
1966 | 0000DB 00150 DEFTBL: |
||
1967 | 0000DB 83 00151 DB 0x83 ; F7 RILOCATO $02 |
||
1968 | 0000DC 84 00152 DB 0x84 ; ALT SYSREQ RILOCATO $40 |
||
1969 | 0000DD 66 00153 DB 0x66 ; BACKSPACE RILOCATO $47 |
||
1970 | 0000DE 69 00154 DB 0x69 ; KP 1 RILOCATO $4F |
||
1971 | 0000DF 6B 00155 DB 0x6B ; KP 4 RILOCATO $50 |
||
1972 | 0000E0 6C 00156 DB 0x6C ; KP 7 RILOCATO $51 |
||
1973 | 0000E1 61 00157 DB 0x61 ; IT <> RILOCATO $53 (TASTO 45) |
||
1974 | 0000E2 FF 00158 DB 0xFF ; FINE TABELLA |
||
1975 | 00159 |
||
1976 | 00160 ; Tabella rilocazione codici normali |
||
1977 | 0000E3 00161 DEFRLTBL: |
||
1978 | 0000E3 02 00162 DB 0x02 ; F7 RILOCATO $02 |
||
1979 | 0000E4 40 00163 DB 0x40 ; ALT SYSREQ RILOCATO $40 |
||
1980 | 0000E5 47 00164 DB 0x47 ; BACKSPACE RILOCATO $47 |
||
1981 | 0000E6 4F 00165 DB 0x4F ; KP 1 RILOCATO $4F |
||
1982 | 0000E7 50 00166 DB 0x50 ; KP 4 RILOCATO $50 |
||
1983 | 0000E8 51 00167 DB 0x51 ; KP 7 RILOCATO $51 |
||
1984 | 0000E9 53 00168 DB 0x53 ; IT <> RILOCATO $53 |
||
1985 | 00169 |
||
1986 | 00170 ; seconda tabella di conversione (da codice scansione rilocato a semi ASCII) |
||
1987 | 00171 ; indice accesso da 00 a 6E |
||
1988 | 00172 ; la tabella ritorna un codice tra 00 e 7A esclusi 0B, 0F e range 57..60 |
||
1989 | 00173 ; i codici relativi alle lettere a..z vengono restituiti come 'a'..'z' |
||
1990 | 00174 ; i codici 42..56 sono quelli da distinguere tra mappa US e mappa IT |
||
1991 | 00175 ; i valori 0xFF indicano codice non valido |
||
1992 | 0000EA 00176 CVTTBL |
||
1993 | 0000EA 1E 00177 DB PRTCODE ; 00 *PRNT |
||
1994 | 0000EB 3E 00178 DB 0x3E ; 01 F9 |
||
1995 | 0000EC 3C 00179 DB 0x3C ; 02 *F7 |
||
1996 | 0000ED 3A 00180 DB 0x3A ; 03 F5 |
||
1997 | 0000EE 38 00181 DB 0x38 ; 04 F3 |
||
1998 | 0000EF 36 00182 DB FNCCODE ; 05 F1 |
||
1999 | 0000F0 37 00183 DB 0x37 ; 06 F2 |
||
2000 | 0000F1 41 00184 DB 0x41 ; 07 F12 |
||
2001 | 0000F2 35 00185 DB 0x35 ; 08 *DEL |
||
2002 | 0000F3 3F 00186 DB 0x3F ; 09 F10 |
||
2003 | 0000F4 3D 00187 DB 0x3D ; 0A F8 |
||
2004 | 0000F5 3B 00188 DB 0x3B ; 0B F6 |
||
2005 | 0000F6 39 00189 DB 0x39 ; 0C F4 |
||
2006 | 0000F7 0E 00190 DB 0x0E ; 0D TAB |
||
2007 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 35 |
||
2008 | |||
2009 | |||
2010 | LOC OBJECT CODE LINE SOURCE TEXT |
||
2011 | VALUE |
||
2012 | |||
2013 | 0000F8 42 00191 DB 0x42 ; 0E `~ IT \| |
||
2014 | 0000F9 04 00192 DB 0x04 ; 0F *R-CTRL |
||
2015 | 0000FA 05 00193 DB 0x05 ; 10 *R-ALT |
||
2016 | 0000FB 02 00194 DB 0x02 ; 11 L- ALT |
||
2017 | 0000FC 00 00195 DB 0x00 ; 12 L-SHIFT |
||
2018 | 0000FD 2B 00196 DB INSCODE ; 13 *INS |
||
2019 | 0000FE 01 00197 DB 0x01 ; 14 L-CTRL |
||
2020 | 0000FF 71 00198 DB 'q' ; 15 qQ |
||
2021 | 000100 43 00199 DB 0x43 ; 16 1! IT 1! |
||
2022 | 000101 32 00200 DB 0x32 ; 17 *HOME |
||
2023 | 000102 2C 00201 DB 0x2C ; 18 *END |
||
2024 | 000103 2E 00202 DB 0x2E ; 19 *PG-DOWN |
||
2025 | 000104 7A 00203 DB 'z' ; 1A zZ |
||
2026 | 000105 73 00204 DB 's' ; 1B sS |
||
2027 | 000106 61 00205 DB 'a' ; 1C aA |
||
2028 | 000107 77 00206 DB 'w' ; 1D wW |
||
2029 | 000108 44 00207 DB 0x44 ; 1E 2@ IT 2" |
||
2030 | 000109 1C 00208 DB 0x1C ; 1F *L-GUI |
||
2031 | 00010A 34 00209 DB 0x34 ; 20 *PG-UP |
||
2032 | 00010B 63 00210 DB 'c' ; 21 cC |
||
2033 | 00010C 78 00211 DB 'x' ; 22 xX |
||
2034 | 00010D 64 00212 DB 'd' ; 23 dD |
||
2035 | 00010E 65 00213 DB 'e' ; 24 eE |
||
2036 | 00010F 45 00214 DB 0x45 ; 25 4$ IT 4$ |
||
2037 | 000110 46 00215 DB 0x46 ; 26 3# IT 3 LIRA |
||
2038 | 000111 1B 00216 DB 0x1B ; 27 *R-GUI |
||
2039 | 000112 33 00217 DB 0x33 ; 28 *CSR-UP |
||
2040 | 000113 14 00218 DB 0x14 ; 29 SPACE |
||
2041 | 000114 76 00219 DB 'v' ; 2A vV |
||
2042 | 000115 66 00220 DB 'f' ; 2B fF |
||
2043 | 000116 74 00221 DB 't' ; 2C tT |
||
2044 | 000117 72 00222 DB 'r' ; 2D rR |
||
2045 | 000118 47 00223 DB 0x47 ; 2E 5% IT 5% (EURO) |
||
2046 | 000119 1D 00224 DB 0x1D ; 2F *APPS |
||
2047 | 00011A 2F 00225 DB 0x2F ; 30 *CSR-LEFT |
||
2048 | 00011B 6E 00226 DB 'n' ; 31 nN |
||
2049 | 00011C 62 00227 DB 'b' ; 32 bB |
||
2050 | 00011D 68 00228 DB 'h' ; 33 hH |
||
2051 | 00011E 67 00229 DB 'g' ; 34 gG |
||
2052 | 00011F 79 00230 DB 'y' ; 35 yY |
||
2053 | 000120 48 00231 DB 0x48 ; 36 6^ IT 6& |
||
2054 | 000121 1A 00232 DB 0x1A ; 37 *PWR |
||
2055 | 000122 2D 00233 DB 0x2D ; 38 *CSR-DOWN |
||
2056 | 000123 31 00234 DB 0x31 ; 39 *CSR-RIGHT |
||
2057 | 000124 6D 00235 DB 'm' ; 3A mM |
||
2058 | 000125 6A 00236 DB 'j' ; 3B jJ |
||
2059 | 000126 75 00237 DB 'u' ; 3C uU |
||
2060 | 000127 49 00238 DB 0x49 ; 3D 7& IT 7/ |
||
2061 | 000128 4A 00239 DB 0x4A ; 3E 8* IT 8( |
||
2062 | 000129 19 00240 DB 0x19 ; 3F *SLEEP |
||
2063 | 00012A 17 00241 DB SYSCODE ; 40 *ALT SYSREQ |
||
2064 | 00012B 4B 00242 DB 0x4B ; 41 ,< IT ,: |
||
2065 | 00012C 6B 00243 DB 'k' ; 42 kK |
||
2066 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 36 |
||
2067 | |||
2068 | |||
2069 | LOC OBJECT CODE LINE SOURCE TEXT |
||
2070 | VALUE |
||
2071 | |||
2072 | 00012D 69 00244 DB 'i' ; 43 iI |
||
2073 | 00012E 6F 00245 DB 'o' ; 44 oO |
||
2074 | 00012F 4C 00246 DB 0x4C ; 45 0) IT 0= |
||
2075 | 000130 4D 00247 DB 0x4D ; 46 9( IT 9) |
||
2076 | 000131 15 00248 DB 0x15 ; 47 *BACKSPACE |
||
2077 | 000132 16 00249 DB CBRKCODE ; 48 *CTRL-BREAK |
||
2078 | 000133 4E 00250 DB 0x4E ; 49 .> IT .: |
||
2079 | 000134 4F 00251 DB 0x4F ; 4A /? IT -_ |
||
2080 | 000135 6C 00252 DB 'l' ; 4B lL |
||
2081 | 000136 50 00253 DB 0x50 ; 4C ;: IT oc@ |
||
2082 | 000137 70 00254 DB 'p' ; 4D pP |
||
2083 | 000138 51 00255 DB 0x51 ; 4E -_ IT '? |
||
2084 | 000139 21 00256 DB 0x21 ; 4F *KP 1 |
||
2085 | 00013A 24 00257 DB 0x24 ; 50 *KP 4 |
||
2086 | 00013B 27 00258 DB 0x27 ; 51 *KP 7 |
||
2087 | 00013C 52 00259 DB 0x52 ; 52 '" IT ao# |
||
2088 | 00013D 0C 00260 DB 0x0C ; 53 *IT <> |
||
2089 | 00013E 53 00261 DB 0x53 ; 54 [{ IT ee[{ |
||
2090 | 00013F 54 00262 DB 0x54 ; 55 =+ IT i^ |
||
2091 | 000140 FF 00263 DB 0xFF ; 56 |
||
2092 | 000141 FF 00264 DB 0xFF ; 57 |
||
2093 | 000142 06 00265 DB CAPSCODE ; 58 CAPS LOCK |
||
2094 | 000143 03 00266 DB 0x03 ; 59 R-SHIFT |
||
2095 | 000144 0A 00267 DB CRCODE ; 5A ENTER <*KP ENTER> |
||
2096 | 000145 55 00268 DB 0x55 ; 5B ]} IT +*]} |
||
2097 | 000146 FF 00269 DB 0xFF ; 5C |
||
2098 | 000147 56 00270 DB 0x56 ; 5D \| IT paragrafo u |
||
2099 | 000148 18 00271 DB 0x18 ; 5E *WAKE |
||
2100 | 000149 10 00272 DB KPBARCODE ; 5F *<KP /> |
||
2101 | 00014A 20 00273 DB KP0CODE ; 60 *KP 0 |
||
2102 | 00014B 2A 00274 DB 0x2A ; 61 *KP . |
||
2103 | 00014C 22 00275 DB 0x22 ; 62 *KP 2 |
||
2104 | 00014D 25 00276 DB 0x25 ; 63 *KP 5 |
||
2105 | 00014E 26 00277 DB 0x26 ; 64 *KP 6 |
||
2106 | 00014F 28 00278 DB 0x28 ; 65 *KP 8 |
||
2107 | 000150 1F 00279 DB ESCCODE ; 66 *ESC |
||
2108 | 000151 07 00280 DB 0x07 ; 67 *NUM-LOCK |
||
2109 | 000152 40 00281 DB 0x40 ; 68 *F11 |
||
2110 | 000153 11 00282 DB 0x11 ; 69 *KP + |
||
2111 | 000154 23 00283 DB 0x23 ; 6A *KP 3 |
||
2112 | 000155 12 00284 DB 0x12 ; 6B *KP - |
||
2113 | 000156 13 00285 DB 0x13 ; 6C *KP * |
||
2114 | 000157 29 00286 DB 0x29 ; 6D *KP 9 |
||
2115 | 000158 08 00287 DB 0x08 ; 6E *SCROLL-LOCK |
||
2116 | 000159 FF 00288 DB 0xFF |
||
2117 | 00289 |
||
2118 | 00290 ; tabella flag RptSt per tasti NO REPEAT |
||
2119 | 00015A 00291 RPTTBL: |
||
2120 | 00015A 20 00292 DB WAKEM ; WAKE UP |
||
2121 | 00015B 40 00293 DB SLEEPM ; SLEEP |
||
2122 | 00015C 80 00294 DB PWRM ; POWER |
||
2123 | 00015D 08 00295 DB RGUIM ; R-GUI |
||
2124 | 00015E 10 00296 DB LGUIM ; L-GUI |
||
2125 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 37 |
||
2126 | |||
2127 | |||
2128 | LOC OBJECT CODE LINE SOURCE TEXT |
||
2129 | VALUE |
||
2130 | |||
2131 | 00015F 04 00297 DB GUIAPPM ; GUI APP |
||
2132 | 000160 01 00298 DB PRINTM ; PRINT SCRN |
||
2133 | 000161 02 00299 DB ESCAPEM ; ESC |
||
2134 | 00300 |
||
2135 | 00301 ; tabella conversione codici restituiti da CVTTBL a tasti effettivi |
||
2136 | 000162 00302 KEYTBL: |
||
2137 | 00303 ; questi indici impostano i flag di CtlSt e ShfSt |
||
2138 | 00304 ; rispecchiano lo stato di pressione/rilascio tasti SHIFT,ALT e CTRL |
||
2139 | 000162 01 00305 DB LSHFM ; 00 L-SHIFT |
||
2140 | 000163 02 00306 DB LCTLM ; 01 L-CTRL |
||
2141 | 000164 04 00307 DB LALTM ; 02 L-ALT |
||
2142 | 000165 08 00308 DB RSHFM ; 03 R-SHIFT |
||
2143 | 000166 10 00309 DB RCTLM ; 04 R-CTRL |
||
2144 | 000167 20 00310 DB RALTM ; 05 R-ALT |
||
2145 | 00311 |
||
2146 | 00312 ; questi indici impostano i flag di TglSt |
||
2147 | 00313 ; rispecchiano lo stato dei tasti CAPS-LOCK/NUM-LOCK/SCROLL-LOCK/PAUSE |
||
2148 | 00314 ; NOTA: PAUSE non ha codice di rilascio |
||
2149 | 000168 80 00315 DB CAPSM ; 06 CAPS-LOCK |
||
2150 | 000169 40 00316 DB NUMLM ; 07 NUM-LOCK |
||
2151 | 00016A 20 00317 DB SCRLM ; 08 SCROLL-LOCK |
||
2152 | 00318 ; il tasto PAUSE va trattato come un tasto toggle |
||
2153 | 00016B 10 00319 DB PAUSM ; 09 PAUSE |
||
2154 | 00320 |
||
2155 | 00321 ; i tasti seguenti vanno testati con lo shift |
||
2156 | 00016C 0D 00322 DB KB_CR ; 0A ENTER |
||
2157 | 00016D 8D 00323 DB KB_SHCR ; 0B SHIFT ENTER |
||
2158 | 00016E 3C 00324 DB '<' ; 0C IT < |
||
2159 | 00016F 3E 00325 DB '>' ; 0D SHIFT IT > |
||
2160 | 000170 09 00326 DB KB_TAB ; 0E TAB |
||
2161 | 000171 89 00327 DB KB_SHTAB ; 0F SHIFT TAB |
||
2162 | 00328 |
||
2163 | 00329 ; questi indici non vanno trattati eccetto ESC/PRINT SCRN |
||
2164 | 00330 ; per il tasto esc va impostato il flag premuto/rilasciato |
||
2165 | 000172 2F 00331 DB '/' ; 10 KP / |
||
2166 | 000173 2B 00332 DB '+' ; 11 KP + |
||
2167 | 000174 2D 00333 DB '-' ; 12 KP - |
||
2168 | 000175 2A 00334 DB '*' ; 13 KP * |
||
2169 | 000176 20 00335 DB ' ' ; 14 SPACE |
||
2170 | 000177 90 00336 DB KB_BACKSPACE ; 15 BACKSPACE |
||
2171 | 000178 83 00337 DB KB_CTRLBREAK ; 16 CTRL BREAK |
||
2172 | 000179 84 00338 DB KB_ALTSYSREQ ; 17 ALT SYS REQ |
||
2173 | 00017A 85 00339 DB KB_WAKE ; 18 WAKE |
||
2174 | 00017B 86 00340 DB KB_SLEEP ; 19 SLEEP |
||
2175 | 00017C 87 00341 DB KB_PWR ; 1A PWR |
||
2176 | 00017D 80 00342 DB KB_RIGHTGUI ; 1B R-GUI |
||
2177 | 00017E 81 00343 DB KB_LEFTGUI ; 1C L-GUI |
||
2178 | 00017F 82 00344 DB KB_GUIMENU ; 1D APPS/MENU |
||
2179 | 000180 83 00345 DB KB_PRTSCN ; 1E PRTSCN/SYSRQ |
||
2180 | 000181 1B 00346 DB KB_ESCAPE ; 1F ESC |
||
2181 | 00347 |
||
2182 | 00348 ; tasti numerici vanno trattati specialmente |
||
2183 | 000182 30 00349 DB '0' ; 20 KP 0 |
||
2184 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 38 |
||
2185 | |||
2186 | |||
2187 | LOC OBJECT CODE LINE SOURCE TEXT |
||
2188 | VALUE |
||
2189 | |||
2190 | 000183 31 00350 DB '1' ; 21 KP 1 |
||
2191 | 000184 32 00351 DB '2' ; 22 KP 2 |
||
2192 | 000185 33 00352 DB '3' ; 23 KP 3 |
||
2193 | 000186 34 00353 DB '4' ; 24 KP 4 |
||
2194 | 000187 35 00354 DB '5' ; 25 KP 5 |
||
2195 | 000188 36 00355 DB '6' ; 26 KP 6 |
||
2196 | 000189 37 00356 DB '7' ; 27 KP 7 |
||
2197 | 00018A 38 00357 DB '8' ; 28 KP 8 |
||
2198 | 00018B 39 00358 DB '9' ; 29 KP 9 |
||
2199 | 00018C 2E 00359 DB '.' ; 2A KP . |
||
2200 | 00360 |
||
2201 | 00361 ; tasti cursore: INSERT va trattato specialmente (toggle bit) |
||
2202 | 00018D 86 00362 DB KB_INSERT ; 2B INS |
||
2203 | 00018E 8C 00363 DB KB_END ; 2C END |
||
2204 | 00018F 8B 00364 DB KB_CSRDOWN ; 2D CSR DOWN |
||
2205 | 000190 8A 00365 DB KB_PGDOWN ; 2E PG DOWN |
||
2206 | 000191 8F 00366 DB KB_CSRLEFT ; 2F CSR LEFT |
||
2207 | 000192 00 00367 DB 0x00 ; 30 - TASTO NULL |
||
2208 | 000193 87 00368 DB KB_CSRRIGHT ; 31 CSR RIGHT |
||
2209 | 000194 85 00369 DB KB_HOME ; 32 HOME |
||
2210 | 000195 84 00370 DB KB_CSRUP ; 33 CSR UP |
||
2211 | 000196 88 00371 DB KB_PGUP ; 34 PG UP |
||
2212 | 000197 8E 00372 DB KB_DELETE ; 35 DEL |
||
2213 | 00373 |
||
2214 | 00374 ; tasti funzione |
||
2215 | 000198 A0 00375 DB KB_F1 ; 36 F1 |
||
2216 | 000199 A1 00376 DB KB_F2 ; 37 F2 |
||
2217 | 00019A A2 00377 DB KB_F3 ; 38 F3 |
||
2218 | 00019B A3 00378 DB KB_F4 ; 39 F4 |
||
2219 | 00019C A4 00379 DB KB_F5 ; 3A F5 |
||
2220 | 00019D A5 00380 DB KB_F6 ; 3B F6 |
||
2221 | 00019E A6 00381 DB KB_F7 ; 3C F7 |
||
2222 | 00019F A7 00382 DB KB_F8 ; 3D F8 |
||
2223 | 0001A0 A8 00383 DB KB_F9 ; 3E F9 |
||
2224 | 0001A1 A9 00384 DB KB_F10 ; 3F F10 |
||
2225 | 0001A2 AA 00385 DB KB_F11 ; 40 F11 |
||
2226 | 0001A3 AB 00386 DB KB_F12 ; 41 F12 |
||
2227 | 00387 |
||
2228 | 00388 ; tabella flag codice corrispondente a KEYTBL |
||
2229 | 00389 ; 0x00 -> codice ASCII |
||
2230 | 00390 ; 0x10 -> codice ASCII + flag toggle 4 bit low |
||
2231 | 00391 ; 0x80 -> invia status shift/alt/ctrl |
||
2232 | 00392 ; 0x90 -> invia status toggle |
||
2233 | 00393 ; 0xA0 -> codice di controllo |
||
2234 | 00394 ; 0xB0 -> codice di controllo + flag toggle 4 bit low |
||
2235 | 00395 ; 0xC0 -> codice tasto NMI |
||
2236 | 0001A4 00396 FLGTBL: |
||
2237 | 00397 ; questi valori non sono usati - il tasto viene trattato a parte |
||
2238 | 0001A4 80 00398 DB 0x80 ; 00 L-SHIFT |
||
2239 | 0001A5 80 00399 DB 0x80 ; 01 L-CTRL |
||
2240 | 0001A6 80 00400 DB 0x80 ; 02 L-ALT |
||
2241 | 0001A7 80 00401 DB 0x80 ; 03 R-SHIFT |
||
2242 | 0001A8 80 00402 DB 0x80 ; 04 R-CTRL |
||
2243 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 39 |
||
2244 | |||
2245 | |||
2246 | LOC OBJECT CODE LINE SOURCE TEXT |
||
2247 | VALUE |
||
2248 | |||
2249 | 0001A9 80 00403 DB 0x80 ; 05 R-ALT |
||
2250 | 0001AA 90 00404 DB 0x90 ; 06 CAPS-LOCK |
||
2251 | 0001AB 90 00405 DB 0x90 ; 07 NUM-LOCK |
||
2252 | 0001AC 90 00406 DB 0x90 ; 08 SCROLL-LOCK |
||
2253 | 0001AD 90 00407 DB 0x90 ; 09 PAUSE |
||
2254 | 0001AE 00 00408 DB 0x00 ; 0A ENTER |
||
2255 | 0001AF A0 00409 DB 0xA0 ; 0B SHIFT ENTER |
||
2256 | 0001B0 00 00410 DB 0x00 ; 0C IT < |
||
2257 | 0001B1 00 00411 DB 0x00 ; 0D SHIFT IT > |
||
2258 | 0001B2 00 00412 DB 0x00 ; 0E TAB |
||
2259 | 0001B3 A0 00413 DB 0xA0 ; 0F SHIFT TAB |
||
2260 | 0001B4 00 00414 DB 0x00 ; 10 KP / |
||
2261 | 0001B5 00 00415 DB 0x00 ; 11 KP + |
||
2262 | 0001B6 00 00416 DB 0x00 ; 12 KP - |
||
2263 | 0001B7 00 00417 DB 0x00 ; 13 KP * |
||
2264 | 0001B8 00 00418 DB 0x00 ; 14 SPACE |
||
2265 | 0001B9 A0 00419 DB 0xA0 ; 15 BACKSPACE |
||
2266 | 0001BA C0 00420 DB 0xC0 ; 16 CTRL BREAK |
||
2267 | 0001BB C0 00421 DB 0xC0 ; 17 ALT SYS REQ |
||
2268 | 0001BC C0 00422 DB 0xC0 ; 18 WAKE |
||
2269 | 0001BD C0 00423 DB 0xC0 ; 19 SLEEP |
||
2270 | 0001BE C0 00424 DB 0xC0 ; 1A PWR |
||
2271 | 0001BF A0 00425 DB 0xA0 ; 1B R-GUI |
||
2272 | 0001C0 A0 00426 DB 0xA0 ; 1C L-GUI |
||
2273 | 0001C1 A0 00427 DB 0xA0 ; 1D APPS/MENU |
||
2274 | 0001C2 B0 00428 DB 0xB0 ; 1E PRTSCN/SYSRQ |
||
2275 | 0001C3 10 00429 DB 0x10 ; 1F ESC |
||
2276 | 0001C4 00 00430 DB 0x00 ; 20 KP 0 |
||
2277 | 0001C5 00 00431 DB 0x00 ; 21 KP 1 |
||
2278 | 0001C6 00 00432 DB 0x00 ; 22 KP 2 |
||
2279 | 0001C7 00 00433 DB 0x00 ; 23 KP 3 |
||
2280 | 0001C8 00 00434 DB 0x00 ; 24 KP 4 |
||
2281 | 0001C9 00 00435 DB 0x00 ; 25 KP 5 |
||
2282 | 0001CA 00 00436 DB 0x00 ; 26 KP 6 |
||
2283 | 0001CB 00 00437 DB 0x00 ; 27 KP 7 |
||
2284 | 0001CC 00 00438 DB 0x00 ; 28 KP 8 |
||
2285 | 0001CD 00 00439 DB 0x00 ; 29 KP 9 |
||
2286 | 0001CE 00 00440 DB 0x00 ; 2A KP . |
||
2287 | 0001CF B0 00441 DB 0xB0 ; 2B INS |
||
2288 | 0001D0 A0 00442 DB 0xA0 ; 2C END |
||
2289 | 0001D1 A0 00443 DB 0xA0 ; 2D CSR DOWN |
||
2290 | 0001D2 A0 00444 DB 0xA0 ; 2E PG DOWN |
||
2291 | 0001D3 A0 00445 DB 0xA0 ; 2F CSR LEFT |
||
2292 | 0001D4 A0 00446 DB 0xA0 ; 30 - TASTO NULL |
||
2293 | 0001D5 A0 00447 DB 0xA0 ; 31 CSR RIGHT |
||
2294 | 0001D6 A0 00448 DB 0xA0 ; 32 HOME |
||
2295 | 0001D7 A0 00449 DB 0xA0 ; 33 CSR UP |
||
2296 | 0001D8 A0 00450 DB 0xA0 ; 34 PG UP |
||
2297 | 0001D9 A0 00451 DB 0xA0 ; 35 DEL |
||
2298 | 0001DA A0 00452 DB 0xA0 ; 36 F1 |
||
2299 | 0001DB A0 00453 DB 0xA0 ; 37 F2 |
||
2300 | 0001DC A0 00454 DB 0xA0 ; 38 F3 |
||
2301 | 0001DD A0 00455 DB 0xA0 ; 39 F4 |
||
2302 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 40 |
||
2303 | |||
2304 | |||
2305 | LOC OBJECT CODE LINE SOURCE TEXT |
||
2306 | VALUE |
||
2307 | |||
2308 | 0001DE A0 00456 DB 0xA0 ; 3A F5 |
||
2309 | 0001DF A0 00457 DB 0xA0 ; 3B F6 |
||
2310 | 0001E0 A0 00458 DB 0xA0 ; 3C F7 |
||
2311 | 0001E1 A0 00459 DB 0xA0 ; 3D F8 |
||
2312 | 0001E2 A0 00460 DB 0xA0 ; 3E F9 |
||
2313 | 0001E3 A0 00461 DB 0xA0 ; 3F F10 |
||
2314 | 0001E4 A0 00462 DB 0xA0 ; 40 F11 |
||
2315 | 0001E5 A0 00463 DB 0xA0 ; 41 F12 |
||
2316 | 00464 |
||
2317 | 01509 |
||
2318 | 01510 end |
||
2319 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 41 |
||
2320 | |||
2321 | |||
2322 | SYMBOL TABLE |
||
2323 | LABEL VALUE |
||
2324 | |||
2325 | A 00000000 |
||
2326 | AALTB 00000007 |
||
2327 | AALTM 00000080 |
||
2328 | ABDEN 00000000 |
||
2329 | ABDOVF 00000007 |
||
2330 | ACCESS 00000000 |
||
2331 | ACKDT 00000005 |
||
2332 | ACKEN 00000004 |
||
2333 | ACKSTAT 00000006 |
||
2334 | ACQT0 00000003 |
||
2335 | ACQT1 00000004 |
||
2336 | ACQT2 00000005 |
||
2337 | ACTLB 00000006 |
||
2338 | ACTLM 00000040 |
||
2339 | ADCON0 00000FC2 |
||
2340 | ADCON1 00000FC1 |
||
2341 | ADCON2 00000FC0 |
||
2342 | ADCS0 00000000 |
||
2343 | ADCS1 00000001 |
||
2344 | ADCS2 00000002 |
||
2345 | ADDEN 00000003 |
||
2346 | ADEN 00000003 |
||
2347 | ADFM 00000007 |
||
2348 | ADIE 00000006 |
||
2349 | ADIF 00000006 |
||
2350 | ADIP 00000006 |
||
2351 | ADMSK1 00000001 |
||
2352 | ADMSK2 00000002 |
||
2353 | ADMSK3 00000003 |
||
2354 | ADMSK4 00000004 |
||
2355 | ADMSK5 00000005 |
||
2356 | ADON 00000000 |
||
2357 | ADRES 00000FC3 |
||
2358 | ADRESH 00000FC4 |
||
2359 | ADRESL 00000FC3 |
||
2360 | ALLALTCTLM 000000C0 |
||
2361 | ALTCTLB 00000006 |
||
2362 | ALTCTLKEY0 00000050 |
||
2363 | ALTCTLM 00000040 |
||
2364 | ALTKEY0 00000030 |
||
2365 | ALTKM 00000024 |
||
2366 | AN0 00000000 |
||
2367 | AN1 00000001 |
||
2368 | AN10 00000001 |
||
2369 | AN11 00000004 |
||
2370 | AN12 00000000 |
||
2371 | AN2 00000002 |
||
2372 | AN3 00000003 |
||
2373 | AN4 00000005 |
||
2374 | AN5 00000000 |
||
2375 | AN6 00000001 |
||
2376 | AN7 00000002 |
||
2377 | AN8 00000002 |
||
2378 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 42 |
||
2379 | |||
2380 | |||
2381 | SYMBOL TABLE |
||
2382 | LABEL VALUE |
||
2383 | |||
2384 | AN9 00000003 |
||
2385 | ASHFB 00000007 |
||
2386 | ASHFM 00000080 |
||
2387 | BANKED 00000001 |
||
2388 | BAUDCON 00000FB8 |
||
2389 | BAUDCTL 00000FB8 |
||
2390 | BCLIE 00000003 |
||
2391 | BCLIF 00000003 |
||
2392 | BCLIP 00000003 |
||
2393 | BF 00000000 |
||
2394 | BGST 00000005 |
||
2395 | BOR 00000000 |
||
2396 | BRG16 00000003 |
||
2397 | BRGH 00000002 |
||
2398 | BSR 00000FE0 |
||
2399 | C 00000000 |
||
2400 | C1INV 00000004 |
||
2401 | C1OUT_CMCON 00000006 |
||
2402 | C1OUT_PORTA 00000004 |
||
2403 | C2INV 00000005 |
||
2404 | C2OUT_CMCON 00000007 |
||
2405 | C2OUT_PORTA 00000005 |
||
2406 | CAPSB 00000007 |
||
2407 | CAPSCODE 00000006 |
||
2408 | CAPSM 00000080 |
||
2409 | CBRKCODE 00000016 |
||
2410 | CCP1 00000002 |
||
2411 | CCP1CON 00000FBD |
||
2412 | CCP1IE 00000002 |
||
2413 | CCP1IF 00000002 |
||
2414 | CCP1IP 00000002 |
||
2415 | CCP1M0 00000000 |
||
2416 | CCP1M1 00000001 |
||
2417 | CCP1M2 00000002 |
||
2418 | CCP1M3 00000003 |
||
2419 | CCP1X 00000005 |
||
2420 | CCP1Y 00000004 |
||
2421 | CCP2CON 00000FBA |
||
2422 | CCP2IE 00000000 |
||
2423 | CCP2IF 00000000 |
||
2424 | CCP2IP 00000000 |
||
2425 | CCP2M0 00000000 |
||
2426 | CCP2M1 00000001 |
||
2427 | CCP2M2 00000002 |
||
2428 | CCP2M3 00000003 |
||
2429 | CCP2X 00000005 |
||
2430 | CCP2Y 00000004 |
||
2431 | CCP2_PORTB 00000003 |
||
2432 | CCP2_PORTC 00000001 |
||
2433 | CCPR1 00000FBE |
||
2434 | CCPR1H 00000FBF |
||
2435 | CCPR1L 00000FBE |
||
2436 | CCPR2 00000FBB |
||
2437 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 43 |
||
2438 | |||
2439 | |||
2440 | SYMBOL TABLE |
||
2441 | LABEL VALUE |
||
2442 | |||
2443 | CCPR2H 00000FBC |
||
2444 | CCPR2L 00000FBB |
||
2445 | CFGS 00000006 |
||
2446 | CHS0 00000002 |
||
2447 | CHS1 00000003 |
||
2448 | CHS2 00000004 |
||
2449 | CHS3 00000005 |
||
2450 | CIS 00000003 |
||
2451 | CK 00000006 |
||
2452 | CKE 00000006 |
||
2453 | CKP 00000004 |
||
2454 | CLKI 00000007 |
||
2455 | CLKO 00000006 |
||
2456 | CM0 00000000 |
||
2457 | CM1 00000001 |
||
2458 | CM2 00000002 |
||
2459 | CMCON 00000FB4 |
||
2460 | CMIE 00000006 |
||
2461 | CMIF 00000006 |
||
2462 | CMIP 00000006 |
||
2463 | CNTMSTMR0 (0x10000 - ((count * D'625')) / D'32') |
||
2464 | CNTTMR0 (0x10000 - ((count * D'1250'))) |
||
2465 | CNTUSTMR0 (0x10000 - (count * 5)) |
||
2466 | CRCODE 0000000A |
||
2467 | CREN 00000004 |
||
2468 | CRSLEN 0000000B |
||
2469 | CS 00000002 |
||
2470 | CSRC 00000007 |
||
2471 | CTLKEY0 00000040 |
||
2472 | CTRLKM 00000012 |
||
2473 | CVR0 00000000 |
||
2474 | CVR1 00000001 |
||
2475 | CVR2 00000002 |
||
2476 | CVR3 00000003 |
||
2477 | CVRCON 00000FB5 |
||
2478 | CVREF 00000002 |
||
2479 | CVREN 00000007 |
||
2480 | CVROE 00000006 |
||
2481 | CVRR 00000005 |
||
2482 | CVRSS 00000004 |
||
2483 | CVTTBL 000000EA |
||
2484 | Caps 0000002C |
||
2485 | ClrRX 00000400 |
||
2486 | Cmd0 000008B6 |
||
2487 | Cmd1 000008C0 |
||
2488 | Cmd2 000008EA |
||
2489 | CmdEnd 000008F6 |
||
2490 | CmdRsp 000008EC |
||
2491 | CtlSt 00000022 |
||
2492 | D 00000005 |
||
2493 | DC 00000001 |
||
2494 | DC1B0 00000004 |
||
2495 | DC1B1 00000005 |
||
2496 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 44 |
||
2497 | |||
2498 | |||
2499 | SYMBOL TABLE |
||
2500 | LABEL VALUE |
||
2501 | |||
2502 | DC2B0 00000004 |
||
2503 | DC2B1 00000005 |
||
2504 | DDRA TRISA |
||
2505 | DDRB TRISB |
||
2506 | DDRC TRISC |
||
2507 | DDRD TRISD |
||
2508 | DDRE TRISE |
||
2509 | DEFRLTBL 000000E3 |
||
2510 | DEFTBL 000000DB |
||
2511 | DONE 00000001 |
||
2512 | D_A 00000005 |
||
2513 | D_NOT_A 00000005 |
||
2514 | Delay_ms 00000376 |
||
2515 | Delay_us 0000037A |
||
2516 | Delay_xx 0000037C |
||
2517 | Delay_xx1 0000038A |
||
2518 | E1Cnt 0000000A |
||
2519 | E1PtrH 00000009 |
||
2520 | E1PtrL 00000008 |
||
2521 | E1SEQCNT 00000007 |
||
2522 | E1Test 000003FC |
||
2523 | ECCP1AS 00000FB6 |
||
2524 | ECCP1DEL 00000FB7 |
||
2525 | ECCPAS 00000FB6 |
||
2526 | ECCPAS0 00000004 |
||
2527 | ECCPAS1 00000005 |
||
2528 | ECCPAS2 00000006 |
||
2529 | ECCPASE 00000007 |
||
2530 | EEADR 00000FA9 |
||
2531 | EECON1 00000FA6 |
||
2532 | EECON2 00000FA7 |
||
2533 | EEDATA 00000FA8 |
||
2534 | EEIE 00000004 |
||
2535 | EEIF 00000004 |
||
2536 | EEIP 00000004 |
||
2537 | EEPGD 00000007 |
||
2538 | ESCAPEM 00000002 |
||
2539 | ESCB 00000001 |
||
2540 | ESCCODE 0000001F |
||
2541 | ESCM 00000002 |
||
2542 | ESCPRNM 00000003 |
||
2543 | EXT1TBL 000000A7 |
||
2544 | EXTRLTBL 000000C5 |
||
2545 | EXTTBL 000000AE |
||
2546 | FAST 00000001 |
||
2547 | FERR 00000002 |
||
2548 | FLGTBL 000001A4 |
||
2549 | FLT0 00000000 |
||
2550 | FLTS 00000002 |
||
2551 | FNCCODE 00000036 |
||
2552 | FREE 00000004 |
||
2553 | FSR0 00000000 |
||
2554 | FSR0H 00000FEA |
||
2555 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 45 |
||
2556 | |||
2557 | |||
2558 | SYMBOL TABLE |
||
2559 | LABEL VALUE |
||
2560 | |||
2561 | FSR0L 00000FE9 |
||
2562 | FSR1 00000001 |
||
2563 | FSR1H 00000FE2 |
||
2564 | FSR1L 00000FE1 |
||
2565 | FSR2 00000002 |
||
2566 | FSR2H 00000FDA |
||
2567 | FSR2L 00000FD9 |
||
2568 | FnAdd 00000714 |
||
2569 | FnNoShf 00000700 |
||
2570 | GCEN 00000007 |
||
2571 | GIE 00000007 |
||
2572 | GIEH 00000007 |
||
2573 | GIEL 00000006 |
||
2574 | GIE_GIEH 00000007 |
||
2575 | GO 00000001 |
||
2576 | GO_DONE 00000001 |
||
2577 | GO_NOT_DONE 00000001 |
||
2578 | GUIAPPM 00000004 |
||
2579 | GetKbd 0000018C |
||
2580 | GetKbd10 000001A2 |
||
2581 | GetKeyTbl 00000844 |
||
2582 | GetLine 000000D8 |
||
2583 | GetLine1 000000FC |
||
2584 | GetLine2 00000102 |
||
2585 | HDRQIN 00000001 |
||
2586 | HLINT 00000000 |
||
2587 | HLNMI 00000001 |
||
2588 | HLVDCON 00000FD2 |
||
2589 | HLVDEN 00000004 |
||
2590 | HLVDIE 00000002 |
||
2591 | HLVDIF 00000002 |
||
2592 | HLVDIN 00000005 |
||
2593 | HLVDIP 00000002 |
||
2594 | HLVDL0 00000000 |
||
2595 | HLVDL1 00000001 |
||
2596 | HLVDL2 00000002 |
||
2597 | HLVDL3 00000003 |
||
2598 | IBF 00000007 |
||
2599 | IBOV 00000005 |
||
2600 | IDLEN 00000007 |
||
2601 | INDF0 00000FEF |
||
2602 | INDF1 00000FE7 |
||
2603 | INDF2 00000FDF |
||
2604 | INSCODE 0000002B |
||
2605 | INSTB 00000002 |
||
2606 | INSTM 00000004 |
||
2607 | INT0 00000000 |
||
2608 | INT0E 00000004 |
||
2609 | INT0F 00000001 |
||
2610 | INT0IE 00000004 |
||
2611 | INT0IF 00000001 |
||
2612 | INT1 00000001 |
||
2613 | INT1E 00000003 |
||
2614 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 46 |
||
2615 | |||
2616 | |||
2617 | SYMBOL TABLE |
||
2618 | LABEL VALUE |
||
2619 | |||
2620 | INT1F 00000000 |
||
2621 | INT1IE 00000003 |
||
2622 | INT1IF 00000000 |
||
2623 | INT1IP 00000006 |
||
2624 | INT1P 00000006 |
||
2625 | INT2 00000002 |
||
2626 | INT2E 00000004 |
||
2627 | INT2F 00000001 |
||
2628 | INT2IE 00000004 |
||
2629 | INT2IF 00000001 |
||
2630 | INT2IP 00000007 |
||
2631 | INT2P 00000007 |
||
2632 | INTCON 00000FF2 |
||
2633 | INTCON2 00000FF1 |
||
2634 | INTCON3 00000FF0 |
||
2635 | INTEDG0 00000006 |
||
2636 | INTEDG1 00000005 |
||
2637 | INTEDG2 00000004 |
||
2638 | INTSRC 00000007 |
||
2639 | IOFS 00000002 |
||
2640 | IPEN 00000007 |
||
2641 | IPR1 00000F9F |
||
2642 | IPR2 00000FA2 |
||
2643 | IRCF0 00000004 |
||
2644 | IRCF1 00000005 |
||
2645 | IRCF2 00000006 |
||
2646 | IRVST 00000005 |
||
2647 | ITMap 00000532 |
||
2648 | IVRST 00000005 |
||
2649 | Init1 00000214 |
||
2650 | Init10 00000320 |
||
2651 | Init2 0000025C |
||
2652 | Init3 00000296 |
||
2653 | Init4 00000298 |
||
2654 | Init6 000002D8 |
||
2655 | Init61 000002EC |
||
2656 | Init62 00000300 |
||
2657 | Init63 00000314 |
||
2658 | InitData 00000338 |
||
2659 | InitData1 0000033E |
||
2660 | InitData2 0000034E |
||
2661 | InitIO 000001D6 |
||
2662 | KBACK 00000004 |
||
2663 | KBBAT 00000006 |
||
2664 | KBBAT2 00000004 |
||
2665 | KBD_ACK 000000FA |
||
2666 | KBD_BAT 000000AA |
||
2667 | KBD_BRK 000000F0 |
||
2668 | KBD_DEFRATE 0000000B |
||
2669 | KBD_DEFRATE2 00000037 |
||
2670 | KBD_ECHO 000000EE |
||
2671 | KBD_ENABLE 000000F4 |
||
2672 | KBD_EXT 000000E0 |
||
2673 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 47 |
||
2674 | |||
2675 | |||
2676 | SYMBOL TABLE |
||
2677 | LABEL VALUE |
||
2678 | |||
2679 | KBD_EXT1 000000E1 |
||
2680 | KBD_GETID 000000F2 |
||
2681 | KBD_IDH 00000083 |
||
2682 | KBD_IDL 000000AB |
||
2683 | KBD_NOBAT 000000FC |
||
2684 | KBD_RESEND 000000FE |
||
2685 | KBD_RESET 000000FF |
||
2686 | KBD_SETLED 000000ED |
||
2687 | KBD_SETSC 000000F0 |
||
2688 | KBD_TYPERATE 000000F3 |
||
2689 | KBENABLE 00000002 |
||
2690 | KBFND 00000007 |
||
2691 | KBI0 00000004 |
||
2692 | KBI1 00000005 |
||
2693 | KBI2 00000006 |
||
2694 | KBI3 00000007 |
||
2695 | KBLEDOK 00000000 |
||
2696 | KBNOBAT 00000007 |
||
2697 | KBRATE 00000003 |
||
2698 | KBRX 00000007 |
||
2699 | KBRXERR 0000000C |
||
2700 | KBSCOK 00000001 |
||
2701 | KBTX 00000006 |
||
2702 | KBVID 00000005 |
||
2703 | KBVOFF 00000006 |
||
2704 | KBVON 00000007 |
||
2705 | KB_ALTBKS 0000001C |
||
2706 | KB_ALTCTLBKS 00000082 |
||
2707 | KB_ALTCTLDEL 00000081 |
||
2708 | KB_ALTCTLEND 00000080 |
||
2709 | KB_ALTCTLESC 00000088 |
||
2710 | KB_ALTCTLHOME 00000008 |
||
2711 | KB_ALTCTLINS 0000000C |
||
2712 | KB_ALTCTLMINUS 00000028 |
||
2713 | KB_ALTCTLPGDWN 00000014 |
||
2714 | KB_ALTCTLPGUP 00000010 |
||
2715 | KB_ALTCTLPLUS 00000025 |
||
2716 | KB_ALTCTLPRT 00000004 |
||
2717 | KB_ALTCTLTAB 00000022 |
||
2718 | KB_ALTDEL 00000019 |
||
2719 | KB_ALTEND 00000016 |
||
2720 | KB_ALTESC 0000001E |
||
2721 | KB_ALTHOME 00000006 |
||
2722 | KB_ALTINS 0000000A |
||
2723 | KB_ALTMINUS 00000026 |
||
2724 | KB_ALTPGDWN 00000012 |
||
2725 | KB_ALTPGUP 0000000E |
||
2726 | KB_ALTPLUS 00000023 |
||
2727 | KB_ALTPRT 00000002 |
||
2728 | KB_ALTSYSREQ 00000084 |
||
2729 | KB_ALTTAB 00000020 |
||
2730 | KB_BACKSPACE 00000090 |
||
2731 | KB_CR 0000000D |
||
2732 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 48 |
||
2733 | |||
2734 | |||
2735 | SYMBOL TABLE |
||
2736 | LABEL VALUE |
||
2737 | |||
2738 | KB_CSRDOWN 0000008B |
||
2739 | KB_CSRLEFT 0000008F |
||
2740 | KB_CSRRIGHT 00000087 |
||
2741 | KB_CSRUP 00000084 |
||
2742 | KB_CTLBKS 0000001D |
||
2743 | KB_CTLDEL 0000001A |
||
2744 | KB_CTLEND 00000017 |
||
2745 | KB_CTLESC 0000001F |
||
2746 | KB_CTLHOME 00000007 |
||
2747 | KB_CTLINS 0000000B |
||
2748 | KB_CTLMINUS 00000027 |
||
2749 | KB_CTLPGDWN 00000013 |
||
2750 | KB_CTLPGUP 0000000F |
||
2751 | KB_CTLPLUS 00000024 |
||
2752 | KB_CTLPRT 00000003 |
||
2753 | KB_CTLTAB 00000021 |
||
2754 | KB_CTRLBREAK 00000083 |
||
2755 | KB_DELETE 0000008E |
||
2756 | KB_END 0000008C |
||
2757 | KB_ESCAPE 0000001B |
||
2758 | KB_F1 000000A0 |
||
2759 | KB_F10 000000A9 |
||
2760 | KB_F11 000000AA |
||
2761 | KB_F12 000000AB |
||
2762 | KB_F2 000000A1 |
||
2763 | KB_F3 000000A2 |
||
2764 | KB_F4 000000A3 |
||
2765 | KB_F5 000000A4 |
||
2766 | KB_F6 000000A5 |
||
2767 | KB_F7 000000A6 |
||
2768 | KB_F8 000000A7 |
||
2769 | KB_F9 000000A8 |
||
2770 | KB_GUIMENU 00000082 |
||
2771 | KB_HOME 00000085 |
||
2772 | KB_INSERT 00000086 |
||
2773 | KB_LEFTGUI 00000081 |
||
2774 | KB_PGDOWN 0000008A |
||
2775 | KB_PGUP 00000088 |
||
2776 | KB_PRTSCN 00000083 |
||
2777 | KB_PWR 00000087 |
||
2778 | KB_RIGHTGUI 00000080 |
||
2779 | KB_SHCR 0000008D |
||
2780 | KB_SHIFTBKS 0000001B |
||
2781 | KB_SHIFTDEL 00000018 |
||
2782 | KB_SHIFTEND 00000015 |
||
2783 | KB_SHIFTHOME 00000005 |
||
2784 | KB_SHIFTINS 00000009 |
||
2785 | KB_SHIFTPGDWN 00000011 |
||
2786 | KB_SHIFTPGUP 0000000D |
||
2787 | KB_SHIFTPRT 00000001 |
||
2788 | KB_SHTAB 00000089 |
||
2789 | KB_SLEEP 00000086 |
||
2790 | KB_TAB 00000009 |
||
2791 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 49 |
||
2792 | |||
2793 | |||
2794 | SYMBOL TABLE |
||
2795 | LABEL VALUE |
||
2796 | |||
2797 | KB_WAKE 00000085 |
||
2798 | KBuf 0000001B |
||
2799 | KCLKIN 00000003 |
||
2800 | KCLKO 00000004 |
||
2801 | KCnt 00000018 |
||
2802 | KDATAIN 00000000 |
||
2803 | KDATAO 00000005 |
||
2804 | KEYCTL 00000007 |
||
2805 | KEYCTL2 00000005 |
||
2806 | KEYRLS 00000006 |
||
2807 | KEYTBL 00000162 |
||
2808 | KEYTGL 00000004 |
||
2809 | KFRFULL 00000007 |
||
2810 | KFRFlag 00000002 |
||
2811 | KFRRD 00000000 |
||
2812 | KFRRd0 00000004 |
||
2813 | KFRRd1 00000005 |
||
2814 | KFRRd2 00000006 |
||
2815 | KFRRd3 00000007 |
||
2816 | KFRRdCnt 00000003 |
||
2817 | KFRRead 00000880 |
||
2818 | KFRRead1 0000088C |
||
2819 | KFRRead2 00000892 |
||
2820 | KFRSRP 00000003 |
||
2821 | KFRSSI 00000005 |
||
2822 | KFRSSN 00000004 |
||
2823 | KFRWE 00000001 |
||
2824 | KFRWrite 0000086E |
||
2825 | KNoBAT 0000028E |
||
2826 | KP0CODE 00000020 |
||
2827 | KPARY 00000002 |
||
2828 | KPBARCODE 00000010 |
||
2829 | KPar 00000019 |
||
2830 | KRESET 00000000 |
||
2831 | KSTOP 00000003 |
||
2832 | KStatus 0000001A |
||
2833 | KTIMEO 00000001 |
||
2834 | KbVerf 00000394 |
||
2835 | KbVerf2 000003C6 |
||
2836 | KbdFlag 0000001D |
||
2837 | KbdFlag2 0000001E |
||
2838 | KbdIDH 00000001 |
||
2839 | KbdIDL 00000000 |
||
2840 | KbdInt 00000000 |
||
2841 | KbdInt10 00000020 |
||
2842 | KbdInt11 00000046 |
||
2843 | KbdInt12 00000056 |
||
2844 | KbdInt20 00000072 |
||
2845 | KbdInt99 00000052 |
||
2846 | KbdProc 000003C8 |
||
2847 | KbdProc0 000003D4 |
||
2848 | KbdProc1 0000041C |
||
2849 | KbdProc10 000004C0 |
||
2850 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 50 |
||
2851 | |||
2852 | |||
2853 | SYMBOL TABLE |
||
2854 | LABEL VALUE |
||
2855 | |||
2856 | KbdProc12 00000586 |
||
2857 | KbdProc13 000005DC |
||
2858 | KbdProc14 0000062C |
||
2859 | KbdProc15 0000066A |
||
2860 | KbdProc16 00000670 |
||
2861 | KbdProc18 0000068E |
||
2862 | KbdProc2 00000426 |
||
2863 | KbdProc20 0000069A |
||
2864 | KbdProc21 000006AA |
||
2865 | KbdProc22 000006B0 |
||
2866 | KbdProc23 000006BC |
||
2867 | KbdProc24 000006C2 |
||
2868 | KbdProc25 000006D8 |
||
2869 | KbdProc26 000006E0 |
||
2870 | KbdProc3 00000434 |
||
2871 | KbdProc4 0000044E |
||
2872 | KbdProc40 00000718 |
||
2873 | KbdProc41 0000071A |
||
2874 | KbdProc42 0000073A |
||
2875 | KbdProc43 00000748 |
||
2876 | KbdProc5 0000045C |
||
2877 | KbdProc50 00000758 |
||
2878 | KbdProc6 00000480 |
||
2879 | KbdProc60 00000826 |
||
2880 | KbdProc61 00000828 |
||
2881 | KbdProc7 0000048A |
||
2882 | KbdProc8 000004AE |
||
2883 | Key01 00000776 |
||
2884 | Key02 0000077C |
||
2885 | Key06 00000786 |
||
2886 | Key10 0000079E |
||
2887 | Key11 000007B0 |
||
2888 | Key12 000007CE |
||
2889 | Key13 000007D8 |
||
2890 | Key15 000007DE |
||
2891 | KeySnd 00000816 |
||
2892 | LALTB 00000002 |
||
2893 | LALTM 00000004 |
||
2894 | LATA 00000F89 |
||
2895 | LATA0 00000000 |
||
2896 | LATA1 00000001 |
||
2897 | LATA2 00000002 |
||
2898 | LATA3 00000003 |
||
2899 | LATA4 00000004 |
||
2900 | LATA5 00000005 |
||
2901 | LATA6 00000006 |
||
2902 | LATA7 00000007 |
||
2903 | LATB 00000F8A |
||
2904 | LATB0 00000000 |
||
2905 | LATB1 00000001 |
||
2906 | LATB2 00000002 |
||
2907 | LATB3 00000003 |
||
2908 | LATB4 00000004 |
||
2909 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 51 |
||
2910 | |||
2911 | |||
2912 | SYMBOL TABLE |
||
2913 | LABEL VALUE |
||
2914 | |||
2915 | LATB5 00000005 |
||
2916 | LATB6 00000006 |
||
2917 | LATB7 00000007 |
||
2918 | LATC 00000F8B |
||
2919 | LATC0 00000000 |
||
2920 | LATC1 00000001 |
||
2921 | LATC2 00000002 |
||
2922 | LATC3 00000003 |
||
2923 | LATC4 00000004 |
||
2924 | LATC5 00000005 |
||
2925 | LATC6 00000006 |
||
2926 | LATC7 00000007 |
||
2927 | LATD 00000F8C |
||
2928 | LATD0 00000000 |
||
2929 | LATD1 00000001 |
||
2930 | LATD2 00000002 |
||
2931 | LATD3 00000003 |
||
2932 | LATD4 00000004 |
||
2933 | LATD5 00000005 |
||
2934 | LATD6 00000006 |
||
2935 | LATD7 00000007 |
||
2936 | LATE 00000F8D |
||
2937 | LATE0 00000000 |
||
2938 | LATE1 00000001 |
||
2939 | LATE2 00000002 |
||
2940 | LCTLB 00000001 |
||
2941 | LCTLM 00000002 |
||
2942 | LGUIM 00000010 |
||
2943 | LSHFB 00000000 |
||
2944 | LSHFM 00000001 |
||
2945 | LVDCON 00000FD2 |
||
2946 | LVDEN 00000004 |
||
2947 | LVDIE 00000002 |
||
2948 | LVDIF 00000002 |
||
2949 | LVDIN 00000005 |
||
2950 | LVDIP 00000002 |
||
2951 | LVDL0 00000000 |
||
2952 | LVDL1 00000001 |
||
2953 | LVDL2 00000002 |
||
2954 | LVDL3 00000003 |
||
2955 | LVV0 00000000 |
||
2956 | LVV1 00000001 |
||
2957 | LVV2 00000002 |
||
2958 | LVV3 00000003 |
||
2959 | LedSt 00000026 |
||
2960 | LedUpd 00000662 |
||
2961 | LockSt 00000025 |
||
2962 | MAPALPHA 00000006 |
||
2963 | MAPCODE 00000042 |
||
2964 | MAPCODEMAX 00000056 |
||
2965 | MAPITB 00000007 |
||
2966 | MCLR 00000003 |
||
2967 | MKeyTst 000004FC |
||
2968 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 52 |
||
2969 | |||
2970 | |||
2971 | SYMBOL TABLE |
||
2972 | LABEL VALUE |
||
2973 | |||
2974 | Main 00000994 |
||
2975 | Main2 000009A0 |
||
2976 | MapCfg 0000002B |
||
2977 | MapTst 0000050C |
||
2978 | N 00000004 |
||
2979 | NKeyRls 0000056C |
||
2980 | NKeySet 00000566 |
||
2981 | NKeyTst 0000053A |
||
2982 | NMISnd 00000834 |
||
2983 | NMITst 00000570 |
||
2984 | NMITst1 00000578 |
||
2985 | NOT_A 00000005 |
||
2986 | NOT_ADDRESS 00000005 |
||
2987 | NOT_BOR 00000000 |
||
2988 | NOT_CS 00000002 |
||
2989 | NOT_DONE 00000001 |
||
2990 | NOT_MCLR 00000003 |
||
2991 | NOT_PD 00000002 |
||
2992 | NOT_POR 00000001 |
||
2993 | NOT_RBPU 00000007 |
||
2994 | NOT_RD 00000000 |
||
2995 | NOT_RI 00000004 |
||
2996 | NOT_SS 00000005 |
||
2997 | NOT_T1SYNC 00000002 |
||
2998 | NOT_T3SYNC 00000002 |
||
2999 | NOT_TO 00000003 |
||
3000 | NOT_W 00000002 |
||
3001 | NOT_WR 00000001 |
||
3002 | NOT_WRITE 00000002 |
||
3003 | NUMLB 00000006 |
||
3004 | NUMLM 00000040 |
||
3005 | NVCODE 00000060 |
||
3006 | NoPause 00000644 |
||
3007 | OBF 00000006 |
||
3008 | OERR 00000001 |
||
3009 | OSC1 00000007 |
||
3010 | OSC2 00000006 |
||
3011 | OSCCON 00000FD3 |
||
3012 | OSCFIE 00000007 |
||
3013 | OSCFIF 00000007 |
||
3014 | OSCFIP 00000007 |
||
3015 | OSCTUNE 00000F9B |
||
3016 | OSTS 00000003 |
||
3017 | OV 00000003 |
||
3018 | P 00000004 |
||
3019 | P1A 00000002 |
||
3020 | P1B 00000005 |
||
3021 | P1C 00000006 |
||
3022 | P1D 00000007 |
||
3023 | P1M0 00000006 |
||
3024 | P1M1 00000007 |
||
3025 | PAUSB 00000004 |
||
3026 | PAUSECODE 00000009 |
||
3027 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 53 |
||
3028 | |||
3029 | |||
3030 | SYMBOL TABLE |
||
3031 | LABEL VALUE |
||
3032 | |||
3033 | PAUSM 00000010 |
||
3034 | PC 00000FF9 |
||
3035 | PCFG0 00000000 |
||
3036 | PCFG1 00000001 |
||
3037 | PCFG2 00000002 |
||
3038 | PCFG3 00000003 |
||
3039 | PCL 00000FF9 |
||
3040 | PCLATH 00000FFA |
||
3041 | PCLATU 00000FFB |
||
3042 | PD 00000002 |
||
3043 | PDC0 00000000 |
||
3044 | PDC1 00000001 |
||
3045 | PDC2 00000002 |
||
3046 | PDC3 00000003 |
||
3047 | PDC4 00000004 |
||
3048 | PDC5 00000005 |
||
3049 | PDC6 00000006 |
||
3050 | PEIE 00000006 |
||
3051 | PEIE_GIEL 00000006 |
||
3052 | PEN 00000002 |
||
3053 | PGC 00000006 |
||
3054 | PGD 00000007 |
||
3055 | PGM 00000005 |
||
3056 | PIE1 00000F9D |
||
3057 | PIE2 00000FA0 |
||
3058 | PIR1 00000F9E |
||
3059 | PIR2 00000FA1 |
||
3060 | PLLEN 00000006 |
||
3061 | PLUSW0 00000FEB |
||
3062 | PLUSW1 00000FE3 |
||
3063 | PLUSW2 00000FDB |
||
3064 | POR 00000001 |
||
3065 | PORTA 00000F80 |
||
3066 | PORTB 00000F81 |
||
3067 | PORTC 00000F82 |
||
3068 | PORTD 00000F83 |
||
3069 | PORTE 00000F84 |
||
3070 | POSTDEC0 00000FED |
||
3071 | POSTDEC1 00000FE5 |
||
3072 | POSTDEC2 00000FDD |
||
3073 | POSTINC0 00000FEE |
||
3074 | POSTINC1 00000FE6 |
||
3075 | POSTINC2 00000FDE |
||
3076 | PR2 00000FCB |
||
3077 | PREINC0 00000FEC |
||
3078 | PREINC1 00000FE4 |
||
3079 | PREINC2 00000FDC |
||
3080 | PRINTM 00000001 |
||
3081 | PRNSCB 00000000 |
||
3082 | PRNSCM 00000001 |
||
3083 | PROD 00000FF3 |
||
3084 | PRODH 00000FF4 |
||
3085 | PRODL 00000FF3 |
||
3086 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 54 |
||
3087 | |||
3088 | |||
3089 | SYMBOL TABLE |
||
3090 | LABEL VALUE |
||
3091 | |||
3092 | PRSEN 00000007 |
||
3093 | PRTCODE 0000001E |
||
3094 | PSA 00000003 |
||
3095 | PSP0 00000000 |
||
3096 | PSP1 00000001 |
||
3097 | PSP2 00000002 |
||
3098 | PSP3 00000003 |
||
3099 | PSP4 00000004 |
||
3100 | PSP5 00000005 |
||
3101 | PSP6 00000006 |
||
3102 | PSP7 00000007 |
||
3103 | PSPIE 00000007 |
||
3104 | PSPIF 00000007 |
||
3105 | PSPIP 00000007 |
||
3106 | PSPMODE 00000004 |
||
3107 | PSSAC0 00000002 |
||
3108 | PSSAC1 00000003 |
||
3109 | PSSBD0 00000000 |
||
3110 | PSSBD1 00000001 |
||
3111 | PWM1CON 00000FB7 |
||
3112 | PWRM 00000080 |
||
3113 | PauseKey 00000414 |
||
3114 | PutKey 000005F4 |
||
3115 | R 00000002 |
||
3116 | RA0 00000000 |
||
3117 | RA1 00000001 |
||
3118 | RA2 00000002 |
||
3119 | RA3 00000003 |
||
3120 | RA4 00000004 |
||
3121 | RA5 00000005 |
||
3122 | RA6 00000006 |
||
3123 | RA7 00000007 |
||
3124 | RALTB 00000005 |
||
3125 | RALTM 00000020 |
||
3126 | RB0 00000000 |
||
3127 | RB1 00000001 |
||
3128 | RB2 00000002 |
||
3129 | RB3 00000003 |
||
3130 | RB4 00000004 |
||
3131 | RB5 00000005 |
||
3132 | RB6 00000006 |
||
3133 | RB7 00000007 |
||
3134 | RBIE 00000003 |
||
3135 | RBIF 00000000 |
||
3136 | RBIP 00000000 |
||
3137 | RBMASK 0000000D |
||
3138 | RBPU 00000007 |
||
3139 | RC0 00000000 |
||
3140 | RC1 00000001 |
||
3141 | RC2 00000002 |
||
3142 | RC3 00000003 |
||
3143 | RC4 00000004 |
||
3144 | RC5 00000005 |
||
3145 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 55 |
||
3146 | |||
3147 | |||
3148 | SYMBOL TABLE |
||
3149 | LABEL VALUE |
||
3150 | |||
3151 | RC6 00000006 |
||
3152 | RC7 00000007 |
||
3153 | RCEN 00000003 |
||
3154 | RCIDL 00000006 |
||
3155 | RCIE 00000005 |
||
3156 | RCIF 00000005 |
||
3157 | RCIP 00000005 |
||
3158 | RCMT 00000006 |
||
3159 | RCON 00000FD0 |
||
3160 | RCREG 00000FAE |
||
3161 | RCSTA 00000FAB |
||
3162 | RCTLB 00000004 |
||
3163 | RCTLM 00000010 |
||
3164 | RD 00000000 |
||
3165 | RD0 00000000 |
||
3166 | RD1 00000001 |
||
3167 | RD16 00000007 |
||
3168 | RD2 00000002 |
||
3169 | RD3 00000003 |
||
3170 | RD4 00000004 |
||
3171 | RD5 00000005 |
||
3172 | RD6 00000006 |
||
3173 | RD7 00000007 |
||
3174 | RE0 00000000 |
||
3175 | RE1 00000001 |
||
3176 | RE2 00000002 |
||
3177 | RE3 00000003 |
||
3178 | RESIN 00000002 |
||
3179 | RGUIM 00000008 |
||
3180 | RI 00000004 |
||
3181 | RPTTBL 0000015A |
||
3182 | RSEN 00000001 |
||
3183 | RSHFB 00000003 |
||
3184 | RSHFM 00000008 |
||
3185 | RX 00000007 |
||
3186 | RX9 00000006 |
||
3187 | RX9D 00000000 |
||
3188 | RXBRK 00000006 |
||
3189 | RXBUFLEN 000000FE |
||
3190 | RXDTP 00000005 |
||
3191 | RXE1ERR 00000003 |
||
3192 | RXEXT 00000005 |
||
3193 | RXEXT1 00000004 |
||
3194 | RXMASK 00000080 |
||
3195 | RXOVR 00000007 |
||
3196 | R_NOT_W 00000002 |
||
3197 | R_W 00000002 |
||
3198 | RptSt 0000002A |
||
3199 | RxBufEnd 0000013E |
||
3200 | RxBuffer 00000040 |
||
3201 | RxCnt 0000000C |
||
3202 | RxCode 0000001F |
||
3203 | RxData 0000000B |
||
3204 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 56 |
||
3205 | |||
3206 | |||
3207 | SYMBOL TABLE |
||
3208 | LABEL VALUE |
||
3209 | |||
3210 | RxFlag 0000000D |
||
3211 | RxKeyb 00000078 |
||
3212 | RxKeyb1 00000096 |
||
3213 | RxKeyb2 0000009A |
||
3214 | RxKeyb3 0000009E |
||
3215 | RxKeyb4 000000A8 |
||
3216 | RxKeyb5 000000AE |
||
3217 | RxKeyb6 000000B2 |
||
3218 | RxKeyb7 000000C0 |
||
3219 | RxKeyb8 000000C4 |
||
3220 | RxKeyb9 000000CC |
||
3221 | S 00000003 |
||
3222 | SBOREN 00000006 |
||
3223 | SCK 00000003 |
||
3224 | SCKP 00000004 |
||
3225 | SCL 00000003 |
||
3226 | SCLOCKH |
||
3227 | SCLOCKL |
||
3228 | SCRLB 00000005 |
||
3229 | SCRLM 00000020 |
||
3230 | SCS0 00000000 |
||
3231 | SCS1 00000001 |
||
3232 | SDA 00000004 |
||
3233 | SDATAH |
||
3234 | SDATAL |
||
3235 | SDI 00000004 |
||
3236 | SDO 00000005 |
||
3237 | SEN 00000000 |
||
3238 | SENDB 00000003 |
||
3239 | SHFALL 000000C0 |
||
3240 | SHIFTKM 00000009 |
||
3241 | SKPALL 00000070 |
||
3242 | SKPALTB 00000005 |
||
3243 | SKPCTLB 00000006 |
||
3244 | SKPSHFB 00000004 |
||
3245 | SLEEPM 00000040 |
||
3246 | SMP 00000007 |
||
3247 | SP0 00000000 |
||
3248 | SP1 00000001 |
||
3249 | SP2 00000002 |
||
3250 | SP3 00000003 |
||
3251 | SP4 00000004 |
||
3252 | SPBRG 00000FAF |
||
3253 | SPBRGH 00000FB0 |
||
3254 | SPCKEY 0000009A |
||
3255 | SPCKEY2 0000003A |
||
3256 | SPCKEY3 0000006A |
||
3257 | SPEN 00000007 |
||
3258 | SREN 00000005 |
||
3259 | SS 00000005 |
||
3260 | SSPADD 00000FC8 |
||
3261 | SSPBUF 00000FC9 |
||
3262 | SSPCON1 00000FC6 |
||
3263 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 57 |
||
3264 | |||
3265 | |||
3266 | SYMBOL TABLE |
||
3267 | LABEL VALUE |
||
3268 | |||
3269 | SSPCON2 00000FC5 |
||
3270 | SSPEN 00000005 |
||
3271 | SSPIE 00000003 |
||
3272 | SSPIF 00000003 |
||
3273 | SSPIP 00000003 |
||
3274 | SSPM0 00000000 |
||
3275 | SSPM1 00000001 |
||
3276 | SSPM2 00000002 |
||
3277 | SSPM3 00000003 |
||
3278 | SSPOV 00000006 |
||
3279 | SSPSTAT 00000FC7 |
||
3280 | STATUS 00000FD8 |
||
3281 | STKFUL 00000007 |
||
3282 | STKOVF 00000007 |
||
3283 | STKPTR 00000FFC |
||
3284 | STKUNF 00000006 |
||
3285 | SWDTE 00000000 |
||
3286 | SWDTEN 00000000 |
||
3287 | SYNC 00000004 |
||
3288 | SYSCODE 00000017 |
||
3289 | SendKbd 000001AE |
||
3290 | SendKbd10 000001D2 |
||
3291 | SendLed 000001A6 |
||
3292 | SetLed 00000900 |
||
3293 | SetLed1 00000908 |
||
3294 | SetLed2 00000940 |
||
3295 | ShfSt 00000020 |
||
3296 | SndProc 00000944 |
||
3297 | Start 0000098C |
||
3298 | T016BIT 00000006 |
||
3299 | T08BIT 00000006 |
||
3300 | T0CKI 00000004 |
||
3301 | T0CON 00000FD5 |
||
3302 | T0CS 00000005 |
||
3303 | T0CntH 00000017 |
||
3304 | T0CntL 00000016 |
||
3305 | T0IE 00000005 |
||
3306 | T0IF 00000002 |
||
3307 | T0PS0 00000000 |
||
3308 | T0PS1 00000001 |
||
3309 | T0PS2 00000002 |
||
3310 | T0PS3 00000003 |
||
3311 | T0SE 00000004 |
||
3312 | T100US 0000FE0C |
||
3313 | T13CKI 00000000 |
||
3314 | T1500MS 00008D90 |
||
3315 | T1CKI 00000000 |
||
3316 | T1CKPS0 00000004 |
||
3317 | T1CKPS1 00000005 |
||
3318 | T1CON 00000FCD |
||
3319 | T1OSCEN 00000003 |
||
3320 | T1OSI 00000001 |
||
3321 | T1OSO 00000000 |
||
3322 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 58 |
||
3323 | |||
3324 | |||
3325 | SYMBOL TABLE |
||
3326 | LABEL VALUE |
||
3327 | |||
3328 | T1RUN 00000006 |
||
3329 | T1SYNC 00000002 |
||
3330 | T20MS 00009E58 |
||
3331 | T20US 0000FF9C |
||
3332 | T2CKPS0 00000000 |
||
3333 | T2CKPS1 00000001 |
||
3334 | T2CON 00000FCA |
||
3335 | T2OUTPS0 00000003 |
||
3336 | T2OUTPS1 00000004 |
||
3337 | T2OUTPS2 00000005 |
||
3338 | T2OUTPS3 00000006 |
||
3339 | T3CCP1 00000003 |
||
3340 | T3CCP2 00000006 |
||
3341 | T3CKPS0 00000004 |
||
3342 | T3CKPS1 00000005 |
||
3343 | T3CON 00000FB1 |
||
3344 | T3SYNC 00000002 |
||
3345 | T40MS 00003CB0 |
||
3346 | TABLAT 00000FF5 |
||
3347 | TBLPTR 00000FF6 |
||
3348 | TBLPTRH 00000FF7 |
||
3349 | TBLPTRL 00000FF6 |
||
3350 | TBLPTRU 00000FF8 |
||
3351 | TCtlSt 00000023 |
||
3352 | TLockSt 00000028 |
||
3353 | TMR0 00000FD6 |
||
3354 | TMR0H 00000FD7 |
||
3355 | TMR0IE 00000005 |
||
3356 | TMR0IF 00000002 |
||
3357 | TMR0IP 00000002 |
||
3358 | TMR0L 00000FD6 |
||
3359 | TMR0ON 00000007 |
||
3360 | TMR0P0 00000008 |
||
3361 | TMR0P256 00000007 |
||
3362 | TMR0P4 00000001 |
||
3363 | TMR1 00000FCE |
||
3364 | TMR1CS 00000001 |
||
3365 | TMR1H 00000FCF |
||
3366 | TMR1IE 00000000 |
||
3367 | TMR1IF 00000000 |
||
3368 | TMR1IP 00000000 |
||
3369 | TMR1L 00000FCE |
||
3370 | TMR1ON 00000000 |
||
3371 | TMR2 00000FCC |
||
3372 | TMR2IE 00000001 |
||
3373 | TMR2IF 00000001 |
||
3374 | TMR2IP 00000001 |
||
3375 | TMR2ON 00000002 |
||
3376 | TMR3 00000FB2 |
||
3377 | TMR3CS 00000001 |
||
3378 | TMR3H 00000FB3 |
||
3379 | TMR3IE 00000001 |
||
3380 | TMR3IF 00000001 |
||
3381 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 59 |
||
3382 | |||
3383 | |||
3384 | SYMBOL TABLE |
||
3385 | LABEL VALUE |
||
3386 | |||
3387 | TMR3IP 00000001 |
||
3388 | TMR3L 00000FB2 |
||
3389 | TMR3ON 00000000 |
||
3390 | TO 00000003 |
||
3391 | TOPRAM 00000300 |
||
3392 | TOS 00000FFD |
||
3393 | TOSH 00000FFE |
||
3394 | TOSL 00000FFD |
||
3395 | TOSU 00000FFF |
||
3396 | TOUTPS0 00000003 |
||
3397 | TOUTPS1 00000004 |
||
3398 | TOUTPS2 00000005 |
||
3399 | TOUTPS3 00000006 |
||
3400 | TPortB 00000029 |
||
3401 | TRISA 00000F92 |
||
3402 | TRISA0 00000000 |
||
3403 | TRISA1 00000001 |
||
3404 | TRISA2 00000002 |
||
3405 | TRISA3 00000003 |
||
3406 | TRISA4 00000004 |
||
3407 | TRISA5 00000005 |
||
3408 | TRISA6 00000006 |
||
3409 | TRISA7 00000007 |
||
3410 | TRISB 00000F93 |
||
3411 | TRISB0 00000000 |
||
3412 | TRISB1 00000001 |
||
3413 | TRISB2 00000002 |
||
3414 | TRISB3 00000003 |
||
3415 | TRISB4 00000004 |
||
3416 | TRISB5 00000005 |
||
3417 | TRISB6 00000006 |
||
3418 | TRISB7 00000007 |
||
3419 | TRISC 00000F94 |
||
3420 | TRISC0 00000000 |
||
3421 | TRISC1 00000001 |
||
3422 | TRISC2 00000002 |
||
3423 | TRISC3 00000003 |
||
3424 | TRISC4 00000004 |
||
3425 | TRISC5 00000005 |
||
3426 | TRISC6 00000006 |
||
3427 | TRISC7 00000007 |
||
3428 | TRISD 00000F95 |
||
3429 | TRISD0 00000000 |
||
3430 | TRISD1 00000001 |
||
3431 | TRISD2 00000002 |
||
3432 | TRISD3 00000003 |
||
3433 | TRISD4 00000004 |
||
3434 | TRISD5 00000005 |
||
3435 | TRISD6 00000006 |
||
3436 | TRISD7 00000007 |
||
3437 | TRISE 00000F96 |
||
3438 | TRISE0 00000000 |
||
3439 | TRISE1 00000001 |
||
3440 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 60 |
||
3441 | |||
3442 | |||
3443 | SYMBOL TABLE |
||
3444 | LABEL VALUE |
||
3445 | |||
3446 | TRISE2 00000002 |
||
3447 | TRMT 00000001 |
||
3448 | TShfSt 00000024 |
||
3449 | TTglSt 00000027 |
||
3450 | TUN0 00000000 |
||
3451 | TUN1 00000001 |
||
3452 | TUN2 00000002 |
||
3453 | TUN3 00000003 |
||
3454 | TUN4 00000004 |
||
3455 | TX 00000006 |
||
3456 | TX9 00000006 |
||
3457 | TX9D 00000000 |
||
3458 | TXBUFLEN 000001C2 |
||
3459 | TXCKP 00000004 |
||
3460 | TXEN 00000005 |
||
3461 | TXIE 00000004 |
||
3462 | TXIF 00000004 |
||
3463 | TXIP 00000004 |
||
3464 | TXMAXCNT 000000E1 |
||
3465 | TXOVR 00000007 |
||
3466 | TXREG 00000FAD |
||
3467 | TXSTA 00000FAC |
||
3468 | TglSt 00000021 |
||
3469 | TmpB 0000001C |
||
3470 | ToggleBit 0000064E |
||
3471 | ToggleRls 00000656 |
||
3472 | TstLock 0000065A |
||
3473 | TxBufEnd 00000300 |
||
3474 | TxBuffer 0000013E |
||
3475 | TxCnt 00000013 |
||
3476 | TxData0 00000014 |
||
3477 | TxData1 00000015 |
||
3478 | TxFlag 00000012 |
||
3479 | TxHeadH 0000000F |
||
3480 | TxHeadL 0000000E |
||
3481 | TxKeyb 0000010C |
||
3482 | TxKeyb1 0000012A |
||
3483 | TxKeyb10 00000174 |
||
3484 | TxKeyb11 00000178 |
||
3485 | TxKeyb12 00000180 |
||
3486 | TxKeyb2 00000144 |
||
3487 | TxKeyb3 00000148 |
||
3488 | TxKeyb4 00000152 |
||
3489 | TxKeyb5 00000154 |
||
3490 | TxKeyb6 00000158 |
||
3491 | TxKeyb7 00000168 |
||
3492 | TxKeyb8 0000016A |
||
3493 | TxKeyb9 0000016E |
||
3494 | TxTailH 00000011 |
||
3495 | TxTailL 00000010 |
||
3496 | UA 00000001 |
||
3497 | USTBL 00000010 |
||
3498 | UpdBufPtr 00000404 |
||
3499 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 61 |
||
3500 | |||
3501 | |||
3502 | SYMBOL TABLE |
||
3503 | LABEL VALUE |
||
3504 | |||
3505 | VCFG0 00000004 |
||
3506 | VCFG1 00000005 |
||
3507 | VDIRMAG 00000007 |
||
3508 | VPP 00000003 |
||
3509 | VREFN 00000002 |
||
3510 | VREFP 00000003 |
||
3511 | W 00000000 |
||
3512 | WAKECODE 00000018 |
||
3513 | WAKEM 00000020 |
||
3514 | WCOL 00000007 |
||
3515 | WDTCON 00000FD1 |
||
3516 | WR 00000001 |
||
3517 | WREG 00000FE8 |
||
3518 | WREN 00000002 |
||
3519 | WRERR 00000003 |
||
3520 | WUE 00000001 |
||
3521 | Wait1 000008DC |
||
3522 | Z 00000002 |
||
3523 | _BOREN_NOSLP_2L 000000FD |
||
3524 | _BOREN_OFF_2L 000000F9 |
||
3525 | _BOREN_ON_2L 000000FB |
||
3526 | _BOREN_SBORDIS_2L 000000FF |
||
3527 | _BORV_0_2L 000000E7 |
||
3528 | _BORV_1_2L 000000EF |
||
3529 | _BORV_2_2L 000000F7 |
||
3530 | _BORV_3_2L 000000FF |
||
3531 | _CCP2MX_PORTBE_3H 000000FE |
||
3532 | _CCP2MX_PORTC_3H 000000FF |
||
3533 | _CONFIG1H 00300001 |
||
3534 | _CONFIG2H 00300003 |
||
3535 | _CONFIG2L 00300002 |
||
3536 | _CONFIG3H 00300005 |
||
3537 | _CONFIG4L 00300006 |
||
3538 | _CONFIG5H 00300009 |
||
3539 | _CONFIG5L 00300008 |
||
3540 | _CONFIG6H 0030000B |
||
3541 | _CONFIG6L 0030000A |
||
3542 | _CONFIG7H 0030000D |
||
3543 | _CONFIG7L 0030000C |
||
3544 | _CP0_OFF_5L 000000FF |
||
3545 | _CP0_ON_5L 000000FE |
||
3546 | _CP1_OFF_5L 000000FF |
||
3547 | _CP1_ON_5L 000000FD |
||
3548 | _CPB_OFF_5H 000000FF |
||
3549 | _CPB_ON_5H 000000BF |
||
3550 | _CPD_OFF_5H 000000FF |
||
3551 | _CPD_ON_5H 0000007F |
||
3552 | _DEBUG_OFF_4L 000000FF |
||
3553 | _DEBUG_ON_4L 0000007F |
||
3554 | _DEVID1 003FFFFE |
||
3555 | _DEVID2 003FFFFF |
||
3556 | _EBTR0_OFF_7L 000000FF |
||
3557 | _EBTR0_ON_7L 000000FE |
||
3558 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 62 |
||
3559 | |||
3560 | |||
3561 | SYMBOL TABLE |
||
3562 | LABEL VALUE |
||
3563 | |||
3564 | _EBTR1_OFF_7L 000000FF |
||
3565 | _EBTR1_ON_7L 000000FD |
||
3566 | _EBTRB_OFF_7H 000000FF |
||
3567 | _EBTRB_ON_7H 000000BF |
||
3568 | _FCMEN_OFF_1H 000000BF |
||
3569 | _FCMEN_ON_1H 000000FF |
||
3570 | _IDLOC0 00200000 |
||
3571 | _IDLOC1 00200001 |
||
3572 | _IDLOC2 00200002 |
||
3573 | _IDLOC3 00200003 |
||
3574 | _IDLOC4 00200004 |
||
3575 | _IDLOC5 00200005 |
||
3576 | _IDLOC6 00200006 |
||
3577 | _IDLOC7 00200007 |
||
3578 | _IESO_OFF_1H 0000007F |
||
3579 | _IESO_ON_1H 000000FF |
||
3580 | _LPT1OSC_OFF_3H 000000FB |
||
3581 | _LPT1OSC_ON_3H 000000FF |
||
3582 | _LVP_OFF_4L 000000FB |
||
3583 | _LVP_ON_4L 000000FF |
||
3584 | _MCLRE_OFF_3H 0000007F |
||
3585 | _MCLRE_ON_3H 000000FF |
||
3586 | _OSC_ECIO6_1H 000000F5 |
||
3587 | _OSC_EC_1H 000000F4 |
||
3588 | _OSC_HSPLL_1H 000000F6 |
||
3589 | _OSC_HS_1H 000000F2 |
||
3590 | _OSC_INTIO67_1H 000000F8 |
||
3591 | _OSC_INTIO7_1H 000000F9 |
||
3592 | _OSC_LP_1H 000000F0 |
||
3593 | _OSC_RCIO6_1H 000000F7 |
||
3594 | _OSC_RC_1H 000000F3 |
||
3595 | _OSC_XT_1H 000000F1 |
||
3596 | _PBADEN_OFF_3H 000000FD |
||
3597 | _PBADEN_ON_3H 000000FF |
||
3598 | _PWRT_OFF_2L 000000FF |
||
3599 | _PWRT_ON_2L 000000FE |
||
3600 | _STVREN_OFF_4L 000000FE |
||
3601 | _STVREN_ON_4L 000000FF |
||
3602 | _WDTPS_1024_2H 000000F5 |
||
3603 | _WDTPS_128_2H 000000EF |
||
3604 | _WDTPS_16384_2H 000000FD |
||
3605 | _WDTPS_16_2H 000000E9 |
||
3606 | _WDTPS_1_2H 000000E1 |
||
3607 | _WDTPS_2048_2H 000000F7 |
||
3608 | _WDTPS_256_2H 000000F1 |
||
3609 | _WDTPS_2_2H 000000E3 |
||
3610 | _WDTPS_32768_2H 000000FF |
||
3611 | _WDTPS_32_2H 000000EB |
||
3612 | _WDTPS_4096_2H 000000F9 |
||
3613 | _WDTPS_4_2H 000000E5 |
||
3614 | _WDTPS_512_2H 000000F3 |
||
3615 | _WDTPS_64_2H 000000ED |
||
3616 | _WDTPS_8192_2H 000000FB |
||
3617 | MPASM 5.68 MAIN.ASM 9-3-2018 10:12:20 PAGE 63 |
||
3618 | |||
3619 | |||
3620 | SYMBOL TABLE |
||
3621 | LABEL VALUE |
||
3622 | |||
3623 | _WDTPS_8_2H 000000E7 |
||
3624 | _WDT_OFF_2H 000000FE |
||
3625 | _WDT_ON_2H 000000FF |
||
3626 | _WRT0_OFF_6L 000000FF |
||
3627 | _WRT0_ON_6L 000000FE |
||
3628 | _WRT1_OFF_6L 000000FF |
||
3629 | _WRT1_ON_6L 000000FD |
||
3630 | _WRTB_OFF_6H 000000FF |
||
3631 | _WRTB_ON_6H 000000BF |
||
3632 | _WRTC_OFF_6H 000000FF |
||
3633 | _WRTC_ON_6H 000000DF |
||
3634 | _WRTD_OFF_6H 000000FF |
||
3635 | _WRTD_ON_6H 0000007F |
||
3636 | _XINST_OFF_4L 000000BF |
||
3637 | _XINST_ON_4L 000000FF |
||
3638 | __18F4420 00000001 |
||
3639 | bmi bn |
||
3640 | bpl bnn |
||
3641 | ldw |
||
3642 | |||
3643 | Errors : 0 |
||
3644 | Warnings : 0 reported, 0 suppressed |
||
3645 | Messages : 0 reported, 0 suppressed |
||
3646 | |||
3647 |