gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 1 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00001 ;-------------------------------------------------------- 00002 ; File Created by SDCC : free open source ANSI-C Compiler 00003 ; Version 2.9.7 #5883 (Jul 21 2010) (CYGWIN) 00004 ; This file was generated Mon Jan 3 21:46:51 2011 00005 ;-------------------------------------------------------- 00006 ; PIC16 port for the Microchip 16-bit core micros 00007 ;-------------------------------------------------------- 00008 list p=18f2680 00009 00010 radix dec 00011 00012 ;-------------------------------------------------------- 00013 ; public variables in this module 00014 ;-------------------------------------------------------- 00015 global _HAL_read_eeprom_byte 00016 global _HAL_write_eeprom_byte 00017 00018 ;-------------------------------------------------------- 00019 ; extern variables in this module 00020 ;-------------------------------------------------------- 00021 extern __gptrput1 00022 extern __gptrget1 00023 extern _RXF6SIDHbits 00024 extern _RXF6SIDLbits 00025 extern _RXF6EIDHbits 00026 extern _RXF6EIDLbits 00027 extern _RXF7SIDHbits 00028 extern _RXF7SIDLbits 00029 extern _RXF7EIDHbits 00030 extern _RXF7EIDLbits 00031 extern _RXF8SIDHbits 00032 extern _RXF8SIDLbits 00033 extern _RXF8EIDHbits 00034 extern _RXF8EIDLbits 00035 extern _RXF9SIDHbits 00036 extern _RXF9SIDLbits 00037 extern _RXF9EIDHbits 00038 extern _RXF9EIDLbits 00039 extern _RXF10SIDHbits 00040 extern _RXF10SIDLbits 00041 extern _RXF10EIDHbits 00042 extern _RXF10EIDLbits 00043 extern _RXF11SIDHbits 00044 extern _RXF11SIDLbits 00045 extern _RXF11EIDHbits 00046 extern _RXF11EIDLbits 00047 extern _RXF12SIDHbits 00048 extern _RXF12SIDLbits 00049 extern _RXF12EIDHbits 00050 extern _RXF12EIDLbits 00051 extern _RXF13SIDHbits 00052 extern _RXF13SIDLbits 00053 extern _RXF13EIDHbits 00054 extern _RXF13EIDLbits gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 2 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00055 extern _RXF14SIDHbits 00056 extern _RXF14SIDLbits 00057 extern _RXF14EIDHbits 00058 extern _RXF14EIDLbits 00059 extern _RXF15SIDHbits 00060 extern _RXF15SIDLbits 00061 extern _RXF15EIDHbits 00062 extern _RXF15EIDLbits 00063 extern _RXFCON0bits 00064 extern _RXFCON1bits 00065 extern _SDFLCbits 00066 extern _RXFBCON0bits 00067 extern _RXFBCON1bits 00068 extern _RXFBCON2bits 00069 extern _RXFBCON3bits 00070 extern _RXFBCON4bits 00071 extern _RXFBCON5bits 00072 extern _RXFBCON6bits 00073 extern _RXFBCON7bits 00074 extern _MSEL0bits 00075 extern _MSEL1bits 00076 extern _MSEL2bits 00077 extern _MSEL3bits 00078 extern _BSEL0bits 00079 extern _BIE0bits 00080 extern _TXBIEbits 00081 extern _B0CONbits 00082 extern _B0SIDHbits 00083 extern _B0SIDLbits 00084 extern _B0EIDHbits 00085 extern _B0EIDLbits 00086 extern _B0DLCbits 00087 extern _B0D0bits 00088 extern _B0D1bits 00089 extern _B0D2bits 00090 extern _B0D3bits 00091 extern _B0D4bits 00092 extern _B0D5bits 00093 extern _B0D6bits 00094 extern _B0D7bits 00095 extern _CANSTAT_RO9bits 00096 extern _CANCON_RO9bits 00097 extern _B1CONbits 00098 extern _B1SIDHbits 00099 extern _B1SIDLbits 00100 extern _B1EIDHbits 00101 extern _B1EIDLbits 00102 extern _B1DLCbits 00103 extern _B1D0bits 00104 extern _B1D1bits 00105 extern _B1D2bits 00106 extern _B1D3bits 00107 extern _B1D4bits 00108 extern _B1D5bits gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 3 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00109 extern _B1D6bits 00110 extern _B1D7bits 00111 extern _CANSTAT_RO8bits 00112 extern _CANCON_RO8bits 00113 extern _B2CONbits 00114 extern _B2SIDHbits 00115 extern _B2SIDLbits 00116 extern _B2EIDHbits 00117 extern _B2EIDLbits 00118 extern _B2DLCbits 00119 extern _B2D0bits 00120 extern _B2D1bits 00121 extern _B2D2bits 00122 extern _B2D3bits 00123 extern _B2D4bits 00124 extern _B2D5bits 00125 extern _B2D6bits 00126 extern _B2D7bits 00127 extern _CANSTAT_RO7bits 00128 extern _CANCON_RO7bits 00129 extern _B3CONbits 00130 extern _B3SIDHbits 00131 extern _B3SIDLbits 00132 extern _B3EIDHbits 00133 extern _B3EIDLbits 00134 extern _B3DLCbits 00135 extern _B3D0bits 00136 extern _B3D1bits 00137 extern _B3D2bits 00138 extern _B3D3bits 00139 extern _B3D4bits 00140 extern _B3D5bits 00141 extern _B3D6bits 00142 extern _B3D7bits 00143 extern _CANSTAT_RO6bits 00144 extern _CANCON_RO6bits 00145 extern _B4CONbits 00146 extern _B4SIDHbits 00147 extern _B4SIDLbits 00148 extern _B4EIDHbits 00149 extern _B4EIDLbits 00150 extern _B4DLCbits 00151 extern _B4D0bits 00152 extern _B4D1bits 00153 extern _B4D2bits 00154 extern _B4D3bits 00155 extern _B4D4bits 00156 extern _B4D5bits 00157 extern _B4D6bits 00158 extern _B4D7bits 00159 extern _CANSTAT_RO5bits 00160 extern _CANCON_RO5bits 00161 extern _B5CONbits 00162 extern _B5SIDHbits gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 4 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00163 extern _B5SIDLbits 00164 extern _B5EIDHbits 00165 extern _B5EIDLbits 00166 extern _B5DLCbits 00167 extern _B5D0bits 00168 extern _B5D1bits 00169 extern _B5D2bits 00170 extern _B5D3bits 00171 extern _B5D4bits 00172 extern _B5D5bits 00173 extern _B5D6bits 00174 extern _B5D7bits 00175 extern _CANSTAT_RO4bits 00176 extern _CANCON_RO4bits 00177 extern _RXF0SIDHbits 00178 extern _RXF0SIDLbits 00179 extern _RXF0EIDHbits 00180 extern _RXF0EIDLbits 00181 extern _RXF1SIDHbits 00182 extern _RXF1SIDLbits 00183 extern _RXF1EIDHbits 00184 extern _RXF1EIDLbits 00185 extern _RXF2SIDHbits 00186 extern _RXF2SIDLbits 00187 extern _RXF2EIDHbits 00188 extern _RXF2EIDLbits 00189 extern _RXF3SIDHbits 00190 extern _RXF3SIDLbits 00191 extern _RXF3EIDHbits 00192 extern _RXF3EIDLbits 00193 extern _RXF4SIDHbits 00194 extern _RXF4SIDLbits 00195 extern _RXF4EIDHbits 00196 extern _RXF4EIDLbits 00197 extern _RXF5SIDHbits 00198 extern _RXF5SIDLbits 00199 extern _RXF5EIDHbits 00200 extern _RXF5EIDLbits 00201 extern _RXM0SIDHbits 00202 extern _RXM0SIDLbits 00203 extern _RXM0EIDHbits 00204 extern _RXM0EIDLbits 00205 extern _RXM1SIDHbits 00206 extern _RXM1SIDLbits 00207 extern _RXM1EIDHbits 00208 extern _RXM1EIDLbits 00209 extern _TXB2CONbits 00210 extern _TXB2SIDHbits 00211 extern _TXB2SIDLbits 00212 extern _TXB2EIDHbits 00213 extern _TXB2EIDLbits 00214 extern _TXB2DLCbits 00215 extern _TXB2D0bits 00216 extern _TXB2D1bits gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 5 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00217 extern _TXB2D2bits 00218 extern _TXB2D3bits 00219 extern _TXB2D4bits 00220 extern _TXB2D5bits 00221 extern _TXB2D6bits 00222 extern _TXB2D7bits 00223 extern _CANSTAT_RO3bits 00224 extern _CANCON_RO3bits 00225 extern _TXB1CONbits 00226 extern _TXB1SIDHbits 00227 extern _TXB1SIDLbits 00228 extern _TXB1EIDHbits 00229 extern _TXB1EIDLbits 00230 extern _TXB1DLCbits 00231 extern _TXB1D0bits 00232 extern _TXB1D1bits 00233 extern _TXB1D2bits 00234 extern _TXB1D3bits 00235 extern _TXB1D4bits 00236 extern _TXB1D5bits 00237 extern _TXB1D6bits 00238 extern _TXB1D7bits 00239 extern _CANSTAT_RO2bits 00240 extern _CANCON_RO2bits 00241 extern _TXB0CONbits 00242 extern _TXB0SIDHbits 00243 extern _TXB0SIDLbits 00244 extern _TXB0EIDHbits 00245 extern _TXB0EIDLbits 00246 extern _TXB0DLCbits 00247 extern _TXB0D0bits 00248 extern _TXB0D1bits 00249 extern _TXB0D2bits 00250 extern _TXB0D3bits 00251 extern _TXB0D4bits 00252 extern _TXB0D5bits 00253 extern _TXB0D6bits 00254 extern _TXB0D7bits 00255 extern _CANSTAT_RO1bits 00256 extern _CANCON_RO1bits 00257 extern _RXB1CONbits 00258 extern _RXB1SIDHbits 00259 extern _RXB1SIDLbits 00260 extern _RXB1EIDHbits 00261 extern _RXB1EIDLbits 00262 extern _RXB1DLCbits 00263 extern _RXB1D0bits 00264 extern _RXB1D1bits 00265 extern _RXB1D2bits 00266 extern _RXB1D3bits 00267 extern _RXB1D4bits 00268 extern _RXB1D5bits 00269 extern _RXB1D6bits 00270 extern _RXB1D7bits gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 6 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00271 extern _CANSTAT_RO0bits 00272 extern _CANCON_RO0bits 00273 extern _RXB0CONbits 00274 extern _RXB0SIDHbits 00275 extern _RXB0SIDLbits 00276 extern _RXB0EIDHbits 00277 extern _RXB0EIDLbits 00278 extern _RXB0DLCbits 00279 extern _RXB0D0bits 00280 extern _RXB0D1bits 00281 extern _RXB0D2bits 00282 extern _RXB0D3bits 00283 extern _RXB0D4bits 00284 extern _RXB0D5bits 00285 extern _RXB0D6bits 00286 extern _RXB0D7bits 00287 extern _CANSTATbits 00288 extern _CANCONbits 00289 extern _BRGCON1bits 00290 extern _BRGCON2bits 00291 extern _BRGCON3bits 00292 extern _CIOCONbits 00293 extern _COMSTATbits 00294 extern _RXERRCNTbits 00295 extern _TXERRCNTbits 00296 extern _ECANCONbits 00297 extern _PORTAbits 00298 extern _PORTBbits 00299 extern _PORTCbits 00300 extern _LATAbits 00301 extern _LATBbits 00302 extern _LATCbits 00303 extern _DDRAbits 00304 extern _TRISAbits 00305 extern _DDRBbits 00306 extern _TRISBbits 00307 extern _DDRCbits 00308 extern _TRISCbits 00309 extern _OSCTUNEbits 00310 extern _PIE1bits 00311 extern _PIR1bits 00312 extern _IPR1bits 00313 extern _PIE2bits 00314 extern _PIR2bits 00315 extern _IPR2bits 00316 extern _PIE3bits 00317 extern _PIR3bits 00318 extern _IPR3bits 00319 extern _EECON1bits 00320 extern _RCSTAbits 00321 extern _TXSTAbits 00322 extern _T3CONbits 00323 extern _BAUDCONbits 00324 extern _CCP1CONbits gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 7 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00325 extern _ADCON2bits 00326 extern _ADCON1bits 00327 extern _ADCON0bits 00328 extern _SSPCON2bits 00329 extern _SSPCON1bits 00330 extern _SSPSTATbits 00331 extern _T2CONbits 00332 extern _T1CONbits 00333 extern _RCONbits 00334 extern _WDTCONbits 00335 extern _HLVDCONbits 00336 extern _LVDCONbits 00337 extern _OSCCONbits 00338 extern _T0CONbits 00339 extern _STATUSbits 00340 extern _INTCON3bits 00341 extern _INTCON2bits 00342 extern _INTCONbits 00343 extern _STKPTRbits 00344 extern _RXF6SIDH 00345 extern _RXF6SIDL 00346 extern _RXF6EIDH 00347 extern _RXF6EIDL 00348 extern _RXF7SIDH 00349 extern _RXF7SIDL 00350 extern _RXF7EIDH 00351 extern _RXF7EIDL 00352 extern _RXF8SIDH 00353 extern _RXF8SIDL 00354 extern _RXF8EIDH 00355 extern _RXF8EIDL 00356 extern _RXF9SIDH 00357 extern _RXF9SIDL 00358 extern _RXF9EIDH 00359 extern _RXF9EIDL 00360 extern _RXF10SIDH 00361 extern _RXF10SIDL 00362 extern _RXF10EIDH 00363 extern _RXF10EIDL 00364 extern _RXF11SIDH 00365 extern _RXF11SIDL 00366 extern _RXF11EIDH 00367 extern _RXF11EIDL 00368 extern _RXF12SIDH 00369 extern _RXF12SIDL 00370 extern _RXF12EIDH 00371 extern _RXF12EIDL 00372 extern _RXF13SIDH 00373 extern _RXF13SIDL 00374 extern _RXF13EIDH 00375 extern _RXF13EIDL 00376 extern _RXF14SIDH 00377 extern _RXF14SIDL 00378 extern _RXF14EIDH gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 8 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00379 extern _RXF14EIDL 00380 extern _RXF15SIDH 00381 extern _RXF15SIDL 00382 extern _RXF15EIDH 00383 extern _RXF15EIDL 00384 extern _RXFCON0 00385 extern _RXFCON1 00386 extern _SDFLC 00387 extern _RXFBCON0 00388 extern _RXFBCON1 00389 extern _RXFBCON2 00390 extern _RXFBCON3 00391 extern _RXFBCON4 00392 extern _RXFBCON5 00393 extern _RXFBCON6 00394 extern _RXFBCON7 00395 extern _MSEL0 00396 extern _MSEL1 00397 extern _MSEL2 00398 extern _MSEL3 00399 extern _BSEL0 00400 extern _BIE0 00401 extern _TXBIE 00402 extern _B0CON 00403 extern _B0SIDH 00404 extern _B0SIDL 00405 extern _B0EIDH 00406 extern _B0EIDL 00407 extern _B0DLC 00408 extern _B0D0 00409 extern _B0D1 00410 extern _B0D2 00411 extern _B0D3 00412 extern _B0D4 00413 extern _B0D5 00414 extern _B0D6 00415 extern _B0D7 00416 extern _CANSTAT_RO9 00417 extern _CANCON_RO9 00418 extern _B1CON 00419 extern _B1SIDH 00420 extern _B1SIDL 00421 extern _B1EIDH 00422 extern _B1EIDL 00423 extern _B1DLC 00424 extern _B1D0 00425 extern _B1D1 00426 extern _B1D2 00427 extern _B1D3 00428 extern _B1D4 00429 extern _B1D5 00430 extern _B1D6 00431 extern _B1D7 00432 extern _CANSTAT_RO8 gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 9 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00433 extern _CANCON_RO8 00434 extern _B2CON 00435 extern _B2SIDH 00436 extern _B2SIDL 00437 extern _B2EIDH 00438 extern _B2EIDL 00439 extern _B2DLC 00440 extern _B2D0 00441 extern _B2D1 00442 extern _B2D2 00443 extern _B2D3 00444 extern _B2D4 00445 extern _B2D5 00446 extern _B2D6 00447 extern _B2D7 00448 extern _CANSTAT_RO7 00449 extern _CANCON_RO7 00450 extern _B3CON 00451 extern _B3SIDH 00452 extern _B3SIDL 00453 extern _B3EIDH 00454 extern _B3EIDL 00455 extern _B3DLC 00456 extern _B3D0 00457 extern _B3D1 00458 extern _B3D2 00459 extern _B3D3 00460 extern _B3D4 00461 extern _B3D5 00462 extern _B3D6 00463 extern _B3D7 00464 extern _CANSTAT_RO6 00465 extern _CANCON_RO6 00466 extern _B4CON 00467 extern _B4SIDH 00468 extern _B4SIDL 00469 extern _B4EIDH 00470 extern _B4EIDL 00471 extern _B4DLC 00472 extern _B4D0 00473 extern _B4D1 00474 extern _B4D2 00475 extern _B4D3 00476 extern _B4D4 00477 extern _B4D5 00478 extern _B4D6 00479 extern _B4D7 00480 extern _CANSTAT_RO5 00481 extern _CANCON_RO5 00482 extern _B5CON 00483 extern _B5SIDH 00484 extern _B5SIDL 00485 extern _B5EIDH 00486 extern _B5EIDL gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 10 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00487 extern _B5DLC 00488 extern _B5D0 00489 extern _B5D1 00490 extern _B5D2 00491 extern _B5D3 00492 extern _B5D4 00493 extern _B5D5 00494 extern _B5D6 00495 extern _B5D7 00496 extern _CANSTAT_RO4 00497 extern _CANCON_RO4 00498 extern _RXF0SIDH 00499 extern _RXF0SIDL 00500 extern _RXF0EIDH 00501 extern _RXF0EIDL 00502 extern _RXF1SIDH 00503 extern _RXF1SIDL 00504 extern _RXF1EIDH 00505 extern _RXF1EIDL 00506 extern _RXF2SIDH 00507 extern _RXF2SIDL 00508 extern _RXF2EIDH 00509 extern _RXF2EIDL 00510 extern _RXF3SIDH 00511 extern _RXF3SIDL 00512 extern _RXF3EIDH 00513 extern _RXF3EIDL 00514 extern _RXF4SIDH 00515 extern _RXF4SIDL 00516 extern _RXF4EIDH 00517 extern _RXF4EIDL 00518 extern _RXF5SIDH 00519 extern _RXF5SIDL 00520 extern _RXF5EIDH 00521 extern _RXF5EIDL 00522 extern _RXM0SIDH 00523 extern _RXM0SIDL 00524 extern _RXM0EIDH 00525 extern _RXM0EIDL 00526 extern _RXM1SIDH 00527 extern _RXM1SIDL 00528 extern _RXM1EIDH 00529 extern _RXM1EIDL 00530 extern _TXB2CON 00531 extern _TXB2SIDH 00532 extern _TXB2SIDL 00533 extern _TXB2EIDH 00534 extern _TXB2EIDL 00535 extern _TXB2DLC 00536 extern _TXB2D0 00537 extern _TXB2D1 00538 extern _TXB2D2 00539 extern _TXB2D3 00540 extern _TXB2D4 gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 11 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00541 extern _TXB2D5 00542 extern _TXB2D6 00543 extern _TXB2D7 00544 extern _CANSTAT_RO3 00545 extern _CANCON_RO3 00546 extern _TXB1CON 00547 extern _TXB1SIDH 00548 extern _TXB1SIDL 00549 extern _TXB1EIDH 00550 extern _TXB1EIDL 00551 extern _TXB1DLC 00552 extern _TXB1D0 00553 extern _TXB1D1 00554 extern _TXB1D2 00555 extern _TXB1D3 00556 extern _TXB1D4 00557 extern _TXB1D5 00558 extern _TXB1D6 00559 extern _TXB1D7 00560 extern _CANSTAT_RO2 00561 extern _CANCON_RO2 00562 extern _TXB0CON 00563 extern _TXB0SIDH 00564 extern _TXB0SIDL 00565 extern _TXB0EIDH 00566 extern _TXB0EIDL 00567 extern _TXB0DLC 00568 extern _TXB0D0 00569 extern _TXB0D1 00570 extern _TXB0D2 00571 extern _TXB0D3 00572 extern _TXB0D4 00573 extern _TXB0D5 00574 extern _TXB0D6 00575 extern _TXB0D7 00576 extern _CANSTAT_RO1 00577 extern _CANCON_RO1 00578 extern _RXB1CON 00579 extern _RXB1SIDH 00580 extern _RXB1SIDL 00581 extern _RXB1EIDH 00582 extern _RXB1EIDL 00583 extern _RXB1DLC 00584 extern _RXB1D0 00585 extern _RXB1D1 00586 extern _RXB1D2 00587 extern _RXB1D3 00588 extern _RXB1D4 00589 extern _RXB1D5 00590 extern _RXB1D6 00591 extern _RXB1D7 00592 extern _CANSTAT_RO0 00593 extern _CANCON_RO0 00594 extern _RXB0CON gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 12 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00595 extern _RXB0SIDH 00596 extern _RXB0SIDL 00597 extern _RXB0EIDH 00598 extern _RXB0EIDL 00599 extern _RXB0DLC 00600 extern _RXB0D0 00601 extern _RXB0D1 00602 extern _RXB0D2 00603 extern _RXB0D3 00604 extern _RXB0D4 00605 extern _RXB0D5 00606 extern _RXB0D6 00607 extern _RXB0D7 00608 extern _CANSTAT 00609 extern _CANCON 00610 extern _BRGCON1 00611 extern _BRGCON2 00612 extern _BRGCON3 00613 extern _CIOCON 00614 extern _COMSTAT 00615 extern _RXERRCNT 00616 extern _TXERRCNT 00617 extern _ECANCON 00618 extern _PORTA 00619 extern _PORTB 00620 extern _PORTC 00621 extern _LATA 00622 extern _LATB 00623 extern _LATC 00624 extern _DDRA 00625 extern _TRISA 00626 extern _DDRB 00627 extern _TRISB 00628 extern _DDRC 00629 extern _TRISC 00630 extern _OSCTUNE 00631 extern _PIE1 00632 extern _PIR1 00633 extern _IPR1 00634 extern _PIE2 00635 extern _PIR2 00636 extern _IPR2 00637 extern _PIE3 00638 extern _PIR3 00639 extern _IPR3 00640 extern _EECON1 00641 extern _EECON2 00642 extern _EEDATA 00643 extern _EEADR 00644 extern _EEADRH 00645 extern _RCSTA 00646 extern _TXSTA 00647 extern _TXREG 00648 extern _RCREG gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 13 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00649 extern _SPBRG 00650 extern _SPBRGH 00651 extern _T3CON 00652 extern _TMR3L 00653 extern _TMR3H 00654 extern _BAUDCON 00655 extern _CCP1CON 00656 extern _CCPR1 00657 extern _CCPR1L 00658 extern _CCPR1H 00659 extern _ADCON2 00660 extern _ADCON1 00661 extern _ADCON0 00662 extern _ADRES 00663 extern _ADRESL 00664 extern _ADRESH 00665 extern _SSPCON2 00666 extern _SSPCON1 00667 extern _SSPSTAT 00668 extern _SSPADD 00669 extern _SSPBUF 00670 extern _T2CON 00671 extern _PR2 00672 extern _TMR2 00673 extern _T1CON 00674 extern _TMR1L 00675 extern _TMR1H 00676 extern _RCON 00677 extern _WDTCON 00678 extern _HLVDCON 00679 extern _LVDCON 00680 extern _OSCCON 00681 extern _T0CON 00682 extern _TMR0L 00683 extern _TMR0H 00684 extern _STATUS 00685 extern _FSR2L 00686 extern _FSR2H 00687 extern _PLUSW2 00688 extern _PREINC2 00689 extern _POSTDEC2 00690 extern _POSTINC2 00691 extern _INDF2 00692 extern _BSR 00693 extern _FSR1L 00694 extern _FSR1H 00695 extern _PLUSW1 00696 extern _PREINC1 00697 extern _POSTDEC1 00698 extern _POSTINC1 00699 extern _INDF1 00700 extern _WREG 00701 extern _FSR0L 00702 extern _FSR0H gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 14 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00703 extern _PLUSW0 00704 extern _PREINC0 00705 extern _POSTDEC0 00706 extern _POSTINC0 00707 extern _INDF0 00708 extern _INTCON3 00709 extern _INTCON2 00710 extern _INTCON 00711 extern _PROD 00712 extern _PRODL 00713 extern _PRODH 00714 extern _TABLAT 00715 extern _TBLPTR 00716 extern _TBLPTRL 00717 extern _TBLPTRH 00718 extern _TBLPTRU 00719 extern _PC 00720 extern _PCL 00721 extern _PCLATH 00722 extern _PCLATU 00723 extern _STKPTR 00724 extern _TOS 00725 extern _TOSL 00726 extern _TOSH 00727 extern _TOSU 00728 extern _usart_busy 00729 extern _usart_putc 00730 ;-------------------------------------------------------- 00731 ; Equates to used internal registers 00732 ;-------------------------------------------------------- 00000FD8 00733 STATUS equ 0xfd8 00000FE8 00734 WREG equ 0xfe8 00000FE9 00735 FSR0L equ 0xfe9 00000FE1 00736 FSR1L equ 0xfe1 00000FD9 00737 FSR2L equ 0xfd9 00000FE5 00738 POSTDEC1 equ 0xfe5 00000FE4 00739 PREINC1 equ 0xfe4 00000FDB 00740 PLUSW2 equ 0xfdb 00000FF3 00741 PRODL equ 0xff3 00742 00743 00744 ; Internal registers 00745 .registers udata_ovr 0x0000 00746 r0x00 res 1 00747 r0x01 res 1 00748 r0x02 res 1 00749 r0x03 res 1 00750 r0x04 res 1 00751 r0x05 res 1 00752 r0x06 res 1 00753 r0x07 res 1 00754 00755 ;-------------------------------------------------------- 00756 ; global & static initialisations gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 15 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00757 ;-------------------------------------------------------- 00758 ; I code from now on! 00759 ; ; Starting pCode block 00760 S_eeprom__HAL_write_eeprom_byte code 0000 00761 _HAL_write_eeprom_byte: 00762 ; .line 15; eeprom.c void HAL_write_eeprom_byte(uint8_t addr, uint8_t dat) 0000 CFD9 FFE5 00763 MOVFF FSR2L, POSTDEC1 0004 CFE1 FFD9 00764 MOVFF FSR1L, FSR2L 0008 C000 FFE5 00765 MOVFF r0x00, POSTDEC1 000C 0E02 00766 MOVLW 0x02 000E CFDB F000 00767 MOVFF PLUSW2, r0x00 0012 0E03 00768 MOVLW 0x03 0014 CFDB F000 00769 MOVFF PLUSW2, _EEDATA 00770 ; .line 18; eeprom.c EEADR = addr; 0018 C000 F000 00771 MOVFF r0x00, _EEADR 00772 ; .line 20; eeprom.c EECON1bits.EEPGD = 0; 001C 9E00 00773 BCF _EECON1bits, 7 00774 ; .line 21; eeprom.c EECON1bits.CFGS = 0; 001E 9C00 00775 BCF _EECON1bits, 6 00776 ; .line 22; eeprom.c EECON1bits.WREN = 1; // enable writes to data EEPROM 0020 8400 00777 BSF _EECON1bits, 2 00778 ; .line 23; eeprom.c INTCONbits.GIE = 0; // disable interrupts 0022 9E00 00779 BCF _INTCONbits, 7 00780 ; .line 24; eeprom.c EECON2 = 0x55; 0024 0E55 00781 MOVLW 0x55 0026 6E00 00782 MOVWF _EECON2 00783 ; .line 25; eeprom.c EECON2 = 0x0AA; 0028 0EAA 00784 MOVLW 0xaa 002A 6E00 00785 MOVWF _EECON2 00786 ; .line 26; eeprom.c EECON1bits.WR = 1; // start writing 002C 8200 00787 BSF _EECON1bits, 1 002E 00788 _00138_DS_: 00789 ; .line 27; eeprom.c while(EECON1bits.WR){ 002E A200 00790 BTFSS _EECON1bits, 1 0030 D000 00791 BRA _00140_DS_ 0032 0000 00792 nop 0034 D000 00793 BRA _00138_DS_ 0036 00794 _00140_DS_: 00795 ; .line 29; eeprom.c if(EECON1bits.WRERR){ 0036 A600 00796 BTFSS _EECON1bits, 3 0038 D000 00797 BRA _00148_DS_ 00798 ; .line 30; eeprom.c usart_putc('E'); 003A 0E45 00799 MOVLW 0x45 003C EC00 F000 00800 CALL _usart_putc 0040 00801 _00141_DS_: 00802 ; .line 31; eeprom.c while(usart_busy()); 0040 EC00 F000 00803 CALL _usart_busy 0044 6E00 00804 MOVWF r0x00 0046 5000 00805 MOVF r0x00, W 0048 E100 00806 BNZ _00141_DS_ 00807 ; .line 32; eeprom.c usart_putc('R'); 004A 0E52 00808 MOVLW 0x52 004C EC00 F000 00809 CALL _usart_putc 0050 00810 _00144_DS_: gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 16 LOC OBJECT CODE LINE SOURCE TEXT VALUE 00811 ; .line 33; eeprom.c while(usart_busy()); 0050 EC00 F000 00812 CALL _usart_busy 0054 6E00 00813 MOVWF r0x00 0056 5000 00814 MOVF r0x00, W 0058 E100 00815 BNZ _00144_DS_ 00816 ; .line 34; eeprom.c usart_putc('R'); 005A 0E52 00817 MOVLW 0x52 005C EC00 F000 00818 CALL _usart_putc 0060 00819 _00148_DS_: 00820 ; .line 37; eeprom.c EECON1bits.WREN = 0; 0060 9400 00821 BCF _EECON1bits, 2 00822 ; .line 38; eeprom.c INTCONbits.GIE = 1; // enable interrupts 0062 8E00 00823 BSF _INTCONbits, 7 0064 CFE4 F000 00824 MOVFF PREINC1, r0x00 0068 CFE4 FFD9 00825 MOVFF PREINC1, FSR2L 006C 0012 00826 RETURN 00827 00828 ; ; Starting pCode block 00829 S_eeprom__HAL_read_eeprom_byte code 0000 00830 _HAL_read_eeprom_byte: 00831 ; .line 5; eeprom.c uint8_t HAL_read_eeprom_byte(uint8_t addr) 0000 CFD9 FFE5 00832 MOVFF FSR2L, POSTDEC1 0004 CFE1 FFD9 00833 MOVFF FSR1L, FSR2L 0008 0E02 00834 MOVLW 0x02 000A CFDB F000 00835 MOVFF PLUSW2, _EEADR 00836 ; .line 8; eeprom.c EECON1bits.CFGS = 0; 000E 9C00 00837 BCF _EECON1bits, 6 00838 ; .line 9; eeprom.c EECON1bits.EEPGD = 0; 0010 9E00 00839 BCF _EECON1bits, 7 00840 ; .line 10; eeprom.c EECON1bits.RD = 1; 0012 8000 00841 BSF _EECON1bits, 0 00842 ; .line 11; eeprom.c return EEDATA; 0014 5000 00843 MOVF _EEDATA, W 0016 CFE4 FFD9 00844 MOVFF PREINC1, FSR2L 001A 0012 00845 RETURN 00846 00847 ; ; Starting pCode block 00848 S_eeprom__EEPROM_memset code 0000 00849 _EEPROM_memset: 00850 ; .line 29; eeprom.h static uint8_t EEPROM_memset( uint8_t addr, void *src, uint8_t len ) { 0000 CFD9 FFE5 00851 MOVFF FSR2L, POSTDEC1 0004 CFE1 FFD9 00852 MOVFF FSR1L, FSR2L 0008 C000 FFE5 00853 MOVFF r0x00, POSTDEC1 000C C000 FFE5 00854 MOVFF r0x01, POSTDEC1 0010 C000 FFE5 00855 MOVFF r0x02, POSTDEC1 0014 C000 FFE5 00856 MOVFF r0x03, POSTDEC1 0018 C000 FFE5 00857 MOVFF r0x04, POSTDEC1 001C C000 FFE5 00858 MOVFF r0x05, POSTDEC1 0020 C000 FFE5 00859 MOVFF r0x06, POSTDEC1 0024 C000 FFE5 00860 MOVFF r0x07, POSTDEC1 0028 0E02 00861 MOVLW 0x02 002A CFDB F000 00862 MOVFF PLUSW2, r0x00 002E 0E03 00863 MOVLW 0x03 0030 CFDB F000 00864 MOVFF PLUSW2, r0x01 gpasm-0.13.7 beta eeprom.asm 1-3-2011 21:46:52 PAGE 17 LOC OBJECT CODE LINE SOURCE TEXT VALUE 0034 0E04 00865 MOVLW 0x04 0036 CFDB F000 00866 MOVFF PLUSW2, r0x02 003A 0E05 00867 MOVLW 0x05 003C CFDB F000 00868 MOVFF PLUSW2, r0x03 0040 0E06 00869 MOVLW 0x06 0042 CFDB F000 00870 MOVFF PLUSW2, r0x04 00871 ; .line 31; eeprom.h for (i=0; i