gplink-0.13.7 beta Copyright (c) 1998-2005 gputils project Listing File Generated: 1-5-2011 23:57:28 Address Value Disassembly Source ------- ----- ----------- ------ ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 2.9.7 #5883 (Jul 21 2010) (CYGWIN) ; This file was generated Wed Jan 5 23:57:27 2011 ;-------------------------------------------------------- ; PIC16 port for the Microchip 16-bit core micros ;-------------------------------------------------------- list p=18f2680 __config 0x300001, 0xf2 __config 0x300003, 0xfe __config 0x300006, 0xbb radix dec ;-------------------------------------------------------- ; public variables in this module ;-------------------------------------------------------- global _HAL_INT_TIMER0_FUNC global _canmsg global _canmsg2 global _INTERRUPTS_init global _INTERRUPTS_runOnce global _main ;-------------------------------------------------------- ; extern variables in this module ;-------------------------------------------------------- extern __gptrput1 extern __gptrget1 extern _RXF6SIDHbits extern _RXF6SIDLbits extern _RXF6EIDHbits extern _RXF6EIDLbits extern _RXF7SIDHbits extern _RXF7SIDLbits extern _RXF7EIDHbits extern _RXF7EIDLbits extern _RXF8SIDHbits extern _RXF8SIDLbits extern _RXF8EIDHbits extern _RXF8EIDLbits extern _RXF9SIDHbits extern _RXF9SIDLbits extern _RXF9EIDHbits extern _RXF9EIDLbits extern _RXF10SIDHbits extern _RXF10SIDLbits extern _RXF10EIDHbits extern _RXF10EIDLbits extern _RXF11SIDHbits extern _RXF11SIDLbits extern _RXF11EIDHbits extern _RXF11EIDLbits extern _RXF12SIDHbits extern _RXF12SIDLbits extern _RXF12EIDHbits extern _RXF12EIDLbits extern _RXF13SIDHbits extern _RXF13SIDLbits extern _RXF13EIDHbits extern _RXF13EIDLbits extern _RXF14SIDHbits extern _RXF14SIDLbits extern _RXF14EIDHbits extern _RXF14EIDLbits extern _RXF15SIDHbits extern _RXF15SIDLbits extern _RXF15EIDHbits extern _RXF15EIDLbits extern _RXFCON0bits extern _RXFCON1bits extern _SDFLCbits extern _RXFBCON0bits extern _RXFBCON1bits extern _RXFBCON2bits extern _RXFBCON3bits extern _RXFBCON4bits extern _RXFBCON5bits extern _RXFBCON6bits extern _RXFBCON7bits extern _MSEL0bits extern _MSEL1bits extern _MSEL2bits extern _MSEL3bits extern _BSEL0bits extern _BIE0bits extern _TXBIEbits extern _B0CONbits extern _B0SIDHbits extern _B0SIDLbits extern _B0EIDHbits extern _B0EIDLbits extern _B0DLCbits extern _B0D0bits extern _B0D1bits extern _B0D2bits extern _B0D3bits extern _B0D4bits extern _B0D5bits extern _B0D6bits extern _B0D7bits extern _CANSTAT_RO9bits extern _CANCON_RO9bits extern _B1CONbits extern _B1SIDHbits extern _B1SIDLbits extern _B1EIDHbits extern _B1EIDLbits extern _B1DLCbits extern _B1D0bits extern _B1D1bits extern _B1D2bits extern _B1D3bits extern _B1D4bits extern _B1D5bits extern _B1D6bits extern _B1D7bits extern _CANSTAT_RO8bits extern _CANCON_RO8bits extern _B2CONbits extern _B2SIDHbits extern _B2SIDLbits extern _B2EIDHbits extern _B2EIDLbits extern _B2DLCbits extern _B2D0bits extern _B2D1bits extern _B2D2bits extern _B2D3bits extern _B2D4bits extern _B2D5bits extern _B2D6bits extern _B2D7bits extern _CANSTAT_RO7bits extern _CANCON_RO7bits extern _B3CONbits extern _B3SIDHbits extern _B3SIDLbits extern _B3EIDHbits extern _B3EIDLbits extern _B3DLCbits extern _B3D0bits extern _B3D1bits extern _B3D2bits extern _B3D3bits extern _B3D4bits extern _B3D5bits extern _B3D6bits extern _B3D7bits extern _CANSTAT_RO6bits extern _CANCON_RO6bits extern _B4CONbits extern _B4SIDHbits extern _B4SIDLbits extern _B4EIDHbits extern _B4EIDLbits extern _B4DLCbits extern _B4D0bits extern _B4D1bits extern _B4D2bits extern _B4D3bits extern _B4D4bits extern _B4D5bits extern _B4D6bits extern _B4D7bits extern _CANSTAT_RO5bits extern _CANCON_RO5bits extern _B5CONbits extern _B5SIDHbits extern _B5SIDLbits extern _B5EIDHbits extern _B5EIDLbits extern _B5DLCbits extern _B5D0bits extern _B5D1bits extern _B5D2bits extern _B5D3bits extern _B5D4bits extern _B5D5bits extern _B5D6bits extern _B5D7bits extern _CANSTAT_RO4bits extern _CANCON_RO4bits extern _RXF0SIDHbits extern _RXF0SIDLbits extern _RXF0EIDHbits extern _RXF0EIDLbits extern _RXF1SIDHbits extern _RXF1SIDLbits extern _RXF1EIDHbits extern _RXF1EIDLbits extern _RXF2SIDHbits extern _RXF2SIDLbits extern _RXF2EIDHbits extern _RXF2EIDLbits extern _RXF3SIDHbits extern _RXF3SIDLbits extern _RXF3EIDHbits extern _RXF3EIDLbits extern _RXF4SIDHbits extern _RXF4SIDLbits extern _RXF4EIDHbits extern _RXF4EIDLbits extern _RXF5SIDHbits extern _RXF5SIDLbits extern _RXF5EIDHbits extern _RXF5EIDLbits extern _RXM0SIDHbits extern _RXM0SIDLbits extern _RXM0EIDHbits extern _RXM0EIDLbits extern _RXM1SIDHbits extern _RXM1SIDLbits extern _RXM1EIDHbits extern _RXM1EIDLbits extern _TXB2CONbits extern _TXB2SIDHbits extern _TXB2SIDLbits extern _TXB2EIDHbits extern _TXB2EIDLbits extern _TXB2DLCbits extern _TXB2D0bits extern _TXB2D1bits extern _TXB2D2bits extern _TXB2D3bits extern _TXB2D4bits extern _TXB2D5bits extern _TXB2D6bits extern _TXB2D7bits extern _CANSTAT_RO3bits extern _CANCON_RO3bits extern _TXB1CONbits extern _TXB1SIDHbits extern _TXB1SIDLbits extern _TXB1EIDHbits extern _TXB1EIDLbits extern _TXB1DLCbits extern _TXB1D0bits extern _TXB1D1bits extern _TXB1D2bits extern _TXB1D3bits extern _TXB1D4bits extern _TXB1D5bits extern _TXB1D6bits extern _TXB1D7bits extern _CANSTAT_RO2bits extern _CANCON_RO2bits extern _TXB0CONbits extern _TXB0SIDHbits extern _TXB0SIDLbits extern _TXB0EIDHbits extern _TXB0EIDLbits extern _TXB0DLCbits extern _TXB0D0bits extern _TXB0D1bits extern _TXB0D2bits extern _TXB0D3bits extern _TXB0D4bits extern _TXB0D5bits extern _TXB0D6bits extern _TXB0D7bits extern _CANSTAT_RO1bits extern _CANCON_RO1bits extern _RXB1CONbits extern _RXB1SIDHbits extern _RXB1SIDLbits extern _RXB1EIDHbits extern _RXB1EIDLbits extern _RXB1DLCbits extern _RXB1D0bits extern _RXB1D1bits extern _RXB1D2bits extern _RXB1D3bits extern _RXB1D4bits extern _RXB1D5bits extern _RXB1D6bits extern _RXB1D7bits extern _CANSTAT_RO0bits extern _CANCON_RO0bits extern _RXB0CONbits extern _RXB0SIDHbits extern _RXB0SIDLbits extern _RXB0EIDHbits extern _RXB0EIDLbits extern _RXB0DLCbits extern _RXB0D0bits extern _RXB0D1bits extern _RXB0D2bits extern _RXB0D3bits extern _RXB0D4bits extern _RXB0D5bits extern _RXB0D6bits extern _RXB0D7bits extern _CANSTATbits extern _CANCONbits extern _BRGCON1bits extern _BRGCON2bits extern _BRGCON3bits extern _CIOCONbits extern _COMSTATbits extern _RXERRCNTbits extern _TXERRCNTbits extern _ECANCONbits extern _PORTAbits extern _PORTBbits extern _PORTCbits extern _LATAbits extern _LATBbits extern _LATCbits extern _DDRAbits extern _TRISAbits extern _DDRBbits extern _TRISBbits extern _DDRCbits extern _TRISCbits extern _OSCTUNEbits extern _PIE1bits extern _PIR1bits extern _IPR1bits extern _PIE2bits extern _PIR2bits extern _IPR2bits extern _PIE3bits extern _PIR3bits extern _IPR3bits extern _EECON1bits extern _RCSTAbits extern _TXSTAbits extern _T3CONbits extern _BAUDCONbits extern _CCP1CONbits extern _ADCON2bits extern _ADCON1bits extern _ADCON0bits extern _SSPCON2bits extern _SSPCON1bits extern _SSPSTATbits extern _T2CONbits extern _T1CONbits extern _RCONbits extern _WDTCONbits extern _HLVDCONbits extern _LVDCONbits extern _OSCCONbits extern _T0CONbits extern _STATUSbits extern _INTCON3bits extern _INTCON2bits extern _INTCONbits extern _STKPTRbits extern _CAN_status_ptr extern _RXF6SIDH extern _RXF6SIDL extern _RXF6EIDH extern _RXF6EIDL extern _RXF7SIDH extern _RXF7SIDL extern _RXF7EIDH extern _RXF7EIDL extern _RXF8SIDH extern _RXF8SIDL extern _RXF8EIDH extern _RXF8EIDL extern _RXF9SIDH extern _RXF9SIDL extern _RXF9EIDH extern _RXF9EIDL extern _RXF10SIDH extern _RXF10SIDL extern _RXF10EIDH extern _RXF10EIDL extern _RXF11SIDH extern _RXF11SIDL extern _RXF11EIDH extern _RXF11EIDL extern _RXF12SIDH extern _RXF12SIDL extern _RXF12EIDH extern _RXF12EIDL extern _RXF13SIDH extern _RXF13SIDL extern _RXF13EIDH extern _RXF13EIDL extern _RXF14SIDH extern _RXF14SIDL extern _RXF14EIDH extern _RXF14EIDL extern _RXF15SIDH extern _RXF15SIDL extern _RXF15EIDH extern _RXF15EIDL extern _RXFCON0 extern _RXFCON1 extern _SDFLC extern _RXFBCON0 extern _RXFBCON1 extern _RXFBCON2 extern _RXFBCON3 extern _RXFBCON4 extern _RXFBCON5 extern _RXFBCON6 extern _RXFBCON7 extern _MSEL0 extern _MSEL1 extern _MSEL2 extern _MSEL3 extern _BSEL0 extern _BIE0 extern _TXBIE extern _B0CON extern _B0SIDH extern _B0SIDL extern _B0EIDH extern _B0EIDL extern _B0DLC extern _B0D0 extern _B0D1 extern _B0D2 extern _B0D3 extern _B0D4 extern _B0D5 extern _B0D6 extern _B0D7 extern _CANSTAT_RO9 extern _CANCON_RO9 extern _B1CON extern _B1SIDH extern _B1SIDL extern _B1EIDH extern _B1EIDL extern _B1DLC extern _B1D0 extern _B1D1 extern _B1D2 extern _B1D3 extern _B1D4 extern _B1D5 extern _B1D6 extern _B1D7 extern _CANSTAT_RO8 extern _CANCON_RO8 extern _B2CON extern _B2SIDH extern _B2SIDL extern _B2EIDH extern _B2EIDL extern _B2DLC extern _B2D0 extern _B2D1 extern _B2D2 extern _B2D3 extern _B2D4 extern _B2D5 extern _B2D6 extern _B2D7 extern _CANSTAT_RO7 extern _CANCON_RO7 extern _B3CON extern _B3SIDH extern _B3SIDL extern _B3EIDH extern _B3EIDL extern _B3DLC extern _B3D0 extern _B3D1 extern _B3D2 extern _B3D3 extern _B3D4 extern _B3D5 extern _B3D6 extern _B3D7 extern _CANSTAT_RO6 extern _CANCON_RO6 extern _B4CON extern _B4SIDH extern _B4SIDL extern _B4EIDH extern _B4EIDL extern _B4DLC extern _B4D0 extern _B4D1 extern _B4D2 extern _B4D3 extern _B4D4 extern _B4D5 extern _B4D6 extern _B4D7 extern _CANSTAT_RO5 extern _CANCON_RO5 extern _B5CON extern _B5SIDH extern _B5SIDL extern _B5EIDH extern _B5EIDL extern _B5DLC extern _B5D0 extern _B5D1 extern _B5D2 extern _B5D3 extern _B5D4 extern _B5D5 extern _B5D6 extern _B5D7 extern _CANSTAT_RO4 extern _CANCON_RO4 extern _RXF0SIDH extern _RXF0SIDL extern _RXF0EIDH extern _RXF0EIDL extern _RXF1SIDH extern _RXF1SIDL extern _RXF1EIDH extern _RXF1EIDL extern _RXF2SIDH extern _RXF2SIDL extern _RXF2EIDH extern _RXF2EIDL extern _RXF3SIDH extern _RXF3SIDL extern _RXF3EIDH extern _RXF3EIDL extern _RXF4SIDH extern _RXF4SIDL extern _RXF4EIDH extern _RXF4EIDL extern _RXF5SIDH extern _RXF5SIDL extern _RXF5EIDH extern _RXF5EIDL extern _RXM0SIDH extern _RXM0SIDL extern _RXM0EIDH extern _RXM0EIDL extern _RXM1SIDH extern _RXM1SIDL extern _RXM1EIDH extern _RXM1EIDL extern _TXB2CON extern _TXB2SIDH extern _TXB2SIDL extern _TXB2EIDH extern _TXB2EIDL extern _TXB2DLC extern _TXB2D0 extern _TXB2D1 extern _TXB2D2 extern _TXB2D3 extern _TXB2D4 extern _TXB2D5 extern _TXB2D6 extern _TXB2D7 extern _CANSTAT_RO3 extern _CANCON_RO3 extern _TXB1CON extern _TXB1SIDH extern _TXB1SIDL extern _TXB1EIDH extern _TXB1EIDL extern _TXB1DLC extern _TXB1D0 extern _TXB1D1 extern _TXB1D2 extern _TXB1D3 extern _TXB1D4 extern _TXB1D5 extern _TXB1D6 extern _TXB1D7 extern _CANSTAT_RO2 extern _CANCON_RO2 extern _TXB0CON extern _TXB0SIDH extern _TXB0SIDL extern _TXB0EIDH extern _TXB0EIDL extern _TXB0DLC extern _TXB0D0 extern _TXB0D1 extern _TXB0D2 extern _TXB0D3 extern _TXB0D4 extern _TXB0D5 extern _TXB0D6 extern _TXB0D7 extern _CANSTAT_RO1 extern _CANCON_RO1 extern _RXB1CON extern _RXB1SIDH extern _RXB1SIDL extern _RXB1EIDH extern _RXB1EIDL extern _RXB1DLC extern _RXB1D0 extern _RXB1D1 extern _RXB1D2 extern _RXB1D3 extern _RXB1D4 extern _RXB1D5 extern _RXB1D6 extern _RXB1D7 extern _CANSTAT_RO0 extern _CANCON_RO0 extern _RXB0CON extern _RXB0SIDH extern _RXB0SIDL extern _RXB0EIDH extern _RXB0EIDL extern _RXB0DLC extern _RXB0D0 extern _RXB0D1 extern _RXB0D2 extern _RXB0D3 extern _RXB0D4 extern _RXB0D5 extern _RXB0D6 extern _RXB0D7 extern _CANSTAT extern _CANCON extern _BRGCON1 extern _BRGCON2 extern _BRGCON3 extern _CIOCON extern _COMSTAT extern _RXERRCNT extern _TXERRCNT extern _ECANCON extern _PORTA extern _PORTB extern _PORTC extern _LATA extern _LATB extern _LATC extern _DDRA extern _TRISA extern _DDRB extern _TRISB extern _DDRC extern _TRISC extern _OSCTUNE extern _PIE1 extern _PIR1 extern _IPR1 extern _PIE2 extern _PIR2 extern _IPR2 extern _PIE3 extern _PIR3 extern _IPR3 extern _EECON1 extern _EECON2 extern _EEDATA extern _EEADR extern _EEADRH extern _RCSTA extern _TXSTA extern _TXREG extern _RCREG extern _SPBRG extern _SPBRGH extern _T3CON extern _TMR3L extern _TMR3H extern _BAUDCON extern _CCP1CON extern _CCPR1 extern _CCPR1L extern _CCPR1H extern _ADCON2 extern _ADCON1 extern _ADCON0 extern _ADRES extern _ADRESL extern _ADRESH extern _SSPCON2 extern _SSPCON1 extern _SSPSTAT extern _SSPADD extern _SSPBUF extern _T2CON extern _PR2 extern _TMR2 extern _T1CON extern _TMR1L extern _TMR1H extern _RCON extern _WDTCON extern _HLVDCON extern _LVDCON extern _OSCCON extern _T0CON extern _TMR0L extern _TMR0H extern _STATUS extern _FSR2L extern _FSR2H extern _PLUSW2 extern _PREINC2 extern _POSTDEC2 extern _POSTINC2 extern _INDF2 extern _BSR extern _FSR1L extern _FSR1H extern _PLUSW1 extern _PREINC1 extern _POSTDEC1 extern _POSTINC1 extern _INDF1 extern _WREG extern _FSR0L extern _FSR0H extern _PLUSW0 extern _PREINC0 extern _POSTDEC0 extern _POSTINC0 extern _INDF0 extern _INTCON3 extern _INTCON2 extern _INTCON extern _PROD extern _PRODL extern _PRODH extern _TABLAT extern _TBLPTR extern _TBLPTRL extern _TBLPTRH extern _TBLPTRU extern _PC extern _PCL extern _PCLATH extern _PCLATU extern _STKPTR extern _TOS extern _TOSL extern _TOSH extern _TOSU extern _SERIAL_initialize extern _SERIAL_getc extern _SERIAL_putc extern _SERIAL_readable extern _TIMER_setup extern _TIMER_get extern _CAN_init extern _CAN_recv extern _CAN_send extern _HAL_read_eeprom_byte extern _HAL_write_eeprom_byte ;-------------------------------------------------------- ; Equates to used internal registers ;-------------------------------------------------------- STATUS equ 0xfd8 PCLATH equ 0xffa PCLATU equ 0xffb WREG equ 0xfe8 BSR equ 0xfe0 FSR0L equ 0xfe9 FSR0H equ 0xfea FSR1L equ 0xfe1 FSR2L equ 0xfd9 POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 PRODH equ 0xff4 ; Internal registers .registers udata_ovr 0x0000 r0x00 res 1 r0x01 res 1 r0x02 res 1 r0x03 res 1 r0x04 res 1 r0x05 res 1 r0x06 res 1 r0x07 res 1 udata_Serial_test_0 udata _main_tcon_1_1 res 2 udata_Serial_test_1 udata _canmsg2 res 13 udata_Serial_test_2 udata _main_serial_setting_1_1 res 6 udata_Serial_test_3 udata _canmsg res 13 ;-------------------------------------------------------- ; interrupt vector ;-------------------------------------------------------- ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; ; Starting pCode block for absolute section ; ;----------------------------------------- S_Serial_test_ivec_0x1_isr code 0X000008 ivec_0x1_isr: 000008 efff goto 0x1ffe GOTO _isr 00000a f00f ; I code from now on! ; ; Starting pCode block S_Serial_test__main code _main: ; .line 21; Serial_test.c int counter = 0; 00125a 6a00 clrf 0, 0 CLRF r0x00 00125c 6a01 clrf 0x1, 0 CLRF r0x01 00125e 0100 movlb 0 BANKSEL _main_tcon_1_1 ; .line 28; Serial_test.c struct TIMER_config tcon = {0,6}; 001260 6bb7 clrf 0xb7, 0x1 CLRF _main_tcon_1_1, B 001262 0e06 movlw 0x6 MOVLW 0x06 001264 0100 movlb 0 BANKSEL (_main_tcon_1_1 + 1) 001266 6fb8 movwf 0xb8, 0x1 MOVWF (_main_tcon_1_1 + 1), B ; .line 32; Serial_test.c canmsg2.ID = 0x177; 001268 0e77 movlw 0x77 MOVLW 0x77 00126a 0100 movlb 0 BANKSEL _canmsg2 00126c 6f8a movwf 0x8a, 0x1 MOVWF _canmsg2, B 00126e 0e01 movlw 0x1 MOVLW 0x01 001270 0100 movlb 0 BANKSEL (_canmsg2 + 1) 001272 6f8b movwf 0x8b, 0x1 MOVWF (_canmsg2 + 1), B ; .line 33; Serial_test.c canmsg2.len = 4; 001274 0e04 movlw 0x4 MOVLW 0x04 001276 0100 movlb 0 BANKSEL (_canmsg2 + 2) 001278 6f8c movwf 0x8c, 0x1 MOVWF (_canmsg2 + 2), B ; .line 34; Serial_test.c canmsg2.buf[0] = 1; 00127a 0e01 movlw 0x1 MOVLW 0x01 00127c 0100 movlb 0 BANKSEL (_canmsg2 + 3) 00127e 6f8d movwf 0x8d, 0x1 MOVWF (_canmsg2 + 3), B 001280 0100 movlb 0 BANKSEL (_canmsg2 + 4) ; .line 35; Serial_test.c canmsg2.buf[1] = 0; 001282 6b8e clrf 0x8e, 0x1 CLRF (_canmsg2 + 4), B ; .line 36; Serial_test.c canmsg2.buf[2] = 4; 001284 0e04 movlw 0x4 MOVLW 0x04 001286 0100 movlb 0 BANKSEL (_canmsg2 + 5) 001288 6f8f movwf 0x8f, 0x1 MOVWF (_canmsg2 + 5), B ; .line 37; Serial_test.c canmsg2.buf[3] = 3; 00128a 0e03 movlw 0x3 MOVLW 0x03 00128c 0100 movlb 0 BANKSEL (_canmsg2 + 6) 00128e 6f90 movwf 0x90, 0x1 MOVWF (_canmsg2 + 6), B 001290 0100 movlb 0 BANKSEL _main_serial_setting_1_1 ; .line 42; Serial_test.c serial_setting.baud = 57600; 001292 6ba4 clrf 0xa4, 0x1 CLRF _main_serial_setting_1_1, B 001294 0ee1 movlw 0xe1 MOVLW 0xe1 001296 0100 movlb 0 BANKSEL (_main_serial_setting_1_1 + 1) 001298 6fa5 movwf 0xa5, 0x1 MOVWF (_main_serial_setting_1_1 + 1), B ; .line 43; Serial_test.c serial_setting.stopbit = 1; 00129a 0e01 movlw 0x1 MOVLW 0x01 00129c 0100 movlb 0 BANKSEL (_main_serial_setting_1_1 + 3) 00129e 6fa7 movwf 0xa7, 0x1 MOVWF (_main_serial_setting_1_1 + 3), B ; .line 46; Serial_test.c SERIAL_initialize(uart, &serial_setting); 0012a0 0e00 movlw 0 MOVLW HIGH(_main_serial_setting_1_1) 0012a2 6e03 movwf 0x3, 0 MOVWF r0x03 0012a4 0ea4 movlw 0xa4 MOVLW LOW(_main_serial_setting_1_1) 0012a6 6e02 movwf 0x2, 0 MOVWF r0x02 0012a8 0e80 movlw 0x80 MOVLW 0x80 0012aa 6e04 movwf 0x4, 0 MOVWF r0x04 0012ac 5004 movf 0x4, 0, 0 MOVF r0x04, W 0012ae 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012b0 5003 movf 0x3, 0, 0 MOVF r0x03, W 0012b2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012b4 5002 movf 0x2, 0, 0 MOVF r0x02, W 0012b6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012b8 0e00 movlw 0 MOVLW 0x00 0012ba 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012bc 0e01 movlw 0x1 MOVLW 0x01 0012be 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012c0 ecfd call 0xffa, 0 CALL _SERIAL_initialize 0012c2 f007 0012c4 0e05 movlw 0x5 MOVLW 0x05 0012c6 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 49; Serial_test.c TIMER_setup(tim,&tcon); 0012c8 0e00 movlw 0 MOVLW HIGH(_main_tcon_1_1) 0012ca 6e03 movwf 0x3, 0 MOVWF r0x03 0012cc 0eb7 movlw 0xb7 MOVLW LOW(_main_tcon_1_1) 0012ce 6e02 movwf 0x2, 0 MOVWF r0x02 0012d0 0e80 movlw 0x80 MOVLW 0x80 0012d2 6e04 movwf 0x4, 0 MOVWF r0x04 0012d4 5004 movf 0x4, 0, 0 MOVF r0x04, W 0012d6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012d8 5003 movf 0x3, 0, 0 MOVF r0x03, W 0012da 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012dc 5002 movf 0x2, 0, 0 MOVF r0x02, W 0012de 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012e0 0e00 movlw 0 MOVLW 0x00 0012e2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012e4 ec47 call 0x1a8e, 0 CALL _TIMER_setup 0012e6 f00d 0012e8 0e04 movlw 0x4 MOVLW 0x04 0012ea 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 52; Serial_test.c CAN_init(); 0012ec ec6e call 0x20dc, 0 CALL _CAN_init 0012ee f010 ; .line 55; Serial_test.c INTERRUPTS_init(); 0012f0 ecff call 0x23fe, 0 CALL _INTERRUPTS_init 0012f2 f011 ; .line 58; Serial_test.c TRISB = TRISB & 0xfd; // set pin B1 to output 0012f4 9293 bcf 0x93, 0x1, 0 BCF _TRISB, 1 ; .line 59; Serial_test.c LATBbits.LATB1 = 0; 0012f6 928a bcf 0x8a, 0x1, 0 BCF _LATBbits, 1 ; .line 60; Serial_test.c SERIAL_putc(uart,temp); 0012f8 0eaa movlw 0xaa MOVLW 0xaa 0012fa 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0012fc 0e00 movlw 0 MOVLW 0x00 0012fe 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001300 0e01 movlw 0x1 MOVLW 0x01 001302 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001304 ecd6 call 0x21ac, 0 CALL _SERIAL_putc 001306 f010 001308 0e03 movlw 0x3 MOVLW 0x03 00130a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00164_DS_: ; .line 63; Serial_test.c counter++; 00130c 2a00 incf 0, 0x1, 0 INCF r0x00, F 00130e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001310 2a01 incf 0x1, 0x1, 0 INCF r0x01, F ; .line 66; Serial_test.c if(counter == 7500) 001312 5000 movf 0, 0, 0 MOVF r0x00, W 001314 0a4c xorlw 0x4c XORLW 0x4c 001316 e103 bnz 0x131e BNZ _00174_DS_ 001318 5001 movf 0x1, 0, 0 MOVF r0x01, W 00131a 0a1d xorlw 0x1d XORLW 0x1d 00131c e001 bz 0x1320 BZ _00175_DS_ _00174_DS_: 00131e d007 bra 0x132e BRA _00155_DS_ _00175_DS_: ; .line 68; Serial_test.c tval = TIMER_get(tim); 001320 0e00 movlw 0 MOVLW 0x00 001322 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001324 eca2 call 0x2144, 0 CALL _TIMER_get 001326 f010 001328 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F ; .line 73; Serial_test.c counter = 0; 00132a 6a00 clrf 0, 0 CLRF r0x00 00132c 6a01 clrf 0x1, 0 CLRF r0x01 _00155_DS_: ; .line 75; Serial_test.c if(CAN_recv(&canmsg) > 0) 00132e 0e00 movlw 0 MOVLW HIGH(_canmsg) 001330 6e03 movwf 0x3, 0 MOVWF r0x03 001332 0e97 movlw 0x97 MOVLW LOW(_canmsg) 001334 6e02 movwf 0x2, 0 MOVWF r0x02 001336 0e80 movlw 0x80 MOVLW 0x80 001338 6e04 movwf 0x4, 0 MOVWF r0x04 00133a 5004 movf 0x4, 0, 0 MOVF r0x04, W 00133c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00133e 5003 movf 0x3, 0, 0 MOVF r0x03, W 001340 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001342 5002 movf 0x2, 0, 0 MOVF r0x02, W 001344 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001346 ece7 call 0x15ce, 0 CALL _CAN_recv 001348 f00a 00134a 6e02 movwf 0x2, 0 MOVWF r0x02 00134c cff3 movff 0xff3, 0x3 MOVFF PRODL, r0x03 00134e f003 001350 0e03 movlw 0x3 MOVLW 0x03 001352 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 001354 5003 movf 0x3, 0, 0 MOVF r0x03, W 001356 0f80 addlw 0x80 ADDLW 0x80 001358 0f80 addlw 0x80 ADDLW 0x80 00135a e102 bnz 0x1360 BNZ _00176_DS_ 00135c 0e01 movlw 0x1 MOVLW 0x01 00135e 5c02 subwf 0x2, 0, 0 SUBWF r0x02, W _00176_DS_: 001360 e336 bnc 0x13ce BNC _00157_DS_ 001362 0100 movlb 0 BANKSEL (_canmsg + 2) ; .line 77; Serial_test.c SERIAL_putc(uart,canmsg.len); 001364 5199 movf 0x99, 0, 0x1 MOVF (_canmsg + 2), W, B 001366 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001368 0e00 movlw 0 MOVLW 0x00 00136a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00136c 0e01 movlw 0x1 MOVLW 0x01 00136e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001370 ecd6 call 0x21ac, 0 CALL _SERIAL_putc 001372 f010 001374 0e03 movlw 0x3 MOVLW 0x03 001376 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 001378 0100 movlb 0 BANKSEL _canmsg ; .line 78; Serial_test.c SERIAL_putc(uart,(char) canmsg.ID); 00137a 5197 movf 0x97, 0, 0x1 MOVF _canmsg, W, B 00137c 6e02 movwf 0x2, 0 MOVWF r0x02 00137e 5002 movf 0x2, 0, 0 MOVF r0x02, W 001380 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001382 0e00 movlw 0 MOVLW 0x00 001384 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001386 0e01 movlw 0x1 MOVLW 0x01 001388 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00138a ecd6 call 0x21ac, 0 CALL _SERIAL_putc 00138c f010 00138e 0e03 movlw 0x3 MOVLW 0x03 001390 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 001392 0100 movlb 0 BANKSEL (_canmsg + 1) ; .line 79; Serial_test.c SERIAL_putc(uart,(char) (canmsg.ID>>8)); 001394 5198 movf 0x98, 0, 0x1 MOVF (_canmsg + 1), W, B 001396 6e02 movwf 0x2, 0 MOVWF r0x02 001398 6a03 clrf 0x3, 0 CLRF r0x03 00139a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00139c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00139e 0e00 movlw 0 MOVLW 0x00 0013a0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013a2 0e01 movlw 0x1 MOVLW 0x01 0013a4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013a6 ecd6 call 0x21ac, 0 CALL _SERIAL_putc 0013a8 f010 0013aa 0e03 movlw 0x3 MOVLW 0x03 0013ac 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 80; Serial_test.c CAN_send(&canmsg2); 0013ae 0e00 movlw 0 MOVLW HIGH(_canmsg2) 0013b0 6e03 movwf 0x3, 0 MOVWF r0x03 0013b2 0e8a movlw 0x8a MOVLW LOW(_canmsg2) 0013b4 6e02 movwf 0x2, 0 MOVWF r0x02 0013b6 0e80 movlw 0x80 MOVLW 0x80 0013b8 6e04 movwf 0x4, 0 MOVWF r0x04 0013ba 5004 movf 0x4, 0, 0 MOVF r0x04, W 0013bc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013be 5003 movf 0x3, 0, 0 MOVF r0x03, W 0013c0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013c2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0013c4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013c6 ec42 call 0x1884, 0 CALL _CAN_send 0013c8 f00c 0013ca 0e03 movlw 0x3 MOVLW 0x03 0013cc 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00157_DS_: ; .line 82; Serial_test.c if(counter>15000) 0013ce 5001 movf 0x1, 0, 0 MOVF r0x01, W 0013d0 0f80 addlw 0x80 ADDLW 0x80 0013d2 0f46 addlw 0x46 ADDLW 0x46 0013d4 e102 bnz 0x13da BNZ _00177_DS_ 0013d6 0e99 movlw 0x99 MOVLW 0x99 0013d8 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00177_DS_: 0013da e302 bnc 0x13e0 BNC _00159_DS_ ; .line 84; Serial_test.c LATBbits.LATB1 = 1; 0013dc 828a bsf 0x8a, 0x1, 0 BSF _LATBbits, 1 0013de d001 bra 0x13e2 BRA _00160_DS_ _00159_DS_: ; .line 89; Serial_test.c LATBbits.LATB1 = 0; 0013e0 928a bcf 0x8a, 0x1, 0 BCF _LATBbits, 1 _00160_DS_: ; .line 93; Serial_test.c if(SERIAL_readable(uart)) 0013e2 0e00 movlw 0 MOVLW 0x00 0013e4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013e6 0e01 movlw 0x1 MOVLW 0x01 0013e8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013ea ec69 call 0x22d2, 0 CALL _SERIAL_readable 0013ec f011 0013ee 6e02 movwf 0x2, 0 MOVWF r0x02 0013f0 0e02 movlw 0x2 MOVLW 0x02 0013f2 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0013f4 5002 movf 0x2, 0, 0 MOVF r0x02, W 0013f6 b4d8 btfsc 0xd8, 0x2, 0 BTFSC STATUS, 2 0013f8 d789 bra 0x130c BRA _00164_DS_ ; .line 95; Serial_test.c temp = SERIAL_getc(uart); 0013fa 0e00 movlw 0 MOVLW 0x00 0013fc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0013fe 0e01 movlw 0x1 MOVLW 0x01 001400 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001402 ec47 call 0x228e, 0 CALL _SERIAL_getc 001404 f011 001406 6e02 movwf 0x2, 0 MOVWF r0x02 001408 0e02 movlw 0x2 MOVLW 0x02 00140a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 96; Serial_test.c HAL_write_eeprom_byte(0, temp); 00140c 5002 movf 0x2, 0, 0 MOVF r0x02, W 00140e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001410 0e00 movlw 0 MOVLW 0x00 001412 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001414 ec37 call 0x206e, 0 CALL _HAL_write_eeprom_byte 001416 f010 001418 0e02 movlw 0x2 MOVLW 0x02 00141a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00141c d777 bra 0x130c BRA _00164_DS_ 00141e 0012 return 0 RETURN ; ; Starting pCode block S_Serial_test__HAL_INT_TIMER0_FUNC code _HAL_INT_TIMER0_FUNC: ; .line 102; Serial_test.c void HAL_INT_TIMER0_FUNC() 00239e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0023a0 ffe5 0023a2 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0023a4 ffd9 ; .line 104; Serial_test.c SERIAL_putc(1,'X'); 0023a6 0e58 movlw 0x58 MOVLW 0x58 0023a8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0023aa 0e00 movlw 0 MOVLW 0x00 0023ac 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0023ae 0e01 movlw 0x1 MOVLW 0x01 0023b0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0023b2 ecd6 call 0x21ac, 0 CALL _SERIAL_putc 0023b4 f010 0023b6 0e03 movlw 0x3 MOVLW 0x03 0023b8 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0023ba cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0023bc ffd9 0023be 0012 return 0 RETURN ; ; Starting pCode block S_Serial_test__INTERRUPTS_runOnce code _INTERRUPTS_runOnce: ; .line 70; interrupts.c void INTERRUPTS_runOnce( void ){} 00247c cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00247e ffe5 002480 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002482 ffd9 002484 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002486 ffd9 002488 0012 return 0 RETURN ; ; Starting pCode block S_Serial_test__INTERRUPTS_init code _INTERRUPTS_init: ; .line 41; interrupts.c int INTERRUPTS_init(void){ 0023fe cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002400 ffe5 002402 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002404 ffd9 ; .line 43; interrupts.c RCONbits.IPEN = 1; // enable interrupt priorities 002406 8ed0 bsf 0xd0, 0x7, 0 BSF _RCONbits, 7 ; .line 56; interrupts.c INTCONbits.TMR0IE = 1; // enable timer 0 interrupts 002408 8af2 bsf 0xf2, 0x5, 0 BSF _INTCONbits, 5 ; .line 57; interrupts.c INTCON2bits.TMR0IP = 1; // set high priority 00240a 84f1 bsf 0xf1, 0x2, 0 BSF _INTCON2bits, 2 ; .line 67; interrupts.c INTCONbits.GIEH = 1; //enable global interrupts 00240c 8ef2 bsf 0xf2, 0x7, 0 BSF _INTCONbits, 7 ; .line 68; interrupts.c return i;} 00240e 6af3 clrf 0xf3, 0 CLRF PRODL 002410 0e01 movlw 0x1 MOVLW 0x01 002412 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002414 ffd9 002416 0012 return 0 RETURN ; ; Starting pCode block S_Serial_test__isr code _isr: ; .line 19; interrupts.c static void isr(void) __interrupt 1 001ffe cfe8 movff 0xfe8, 0xfe5 MOVFF WREG, POSTDEC1 002000 ffe5 002002 cfd8 movff 0xfd8, 0xfe5 MOVFF STATUS, POSTDEC1 002004 ffe5 002006 cfe0 movff 0xfe0, 0xfe5 MOVFF BSR, POSTDEC1 002008 ffe5 00200a cff3 movff 0xff3, 0xfe5 MOVFF PRODL, POSTDEC1 00200c ffe5 00200e cff4 movff 0xff4, 0xfe5 MOVFF PRODH, POSTDEC1 002010 ffe5 002012 cfe9 movff 0xfe9, 0xfe5 MOVFF FSR0L, POSTDEC1 002014 ffe5 002016 cfea movff 0xfea, 0xfe5 MOVFF FSR0H, POSTDEC1 002018 ffe5 00201a cffa movff 0xffa, 0xfe5 MOVFF PCLATH, POSTDEC1 00201c ffe5 00201e cffb movff 0xffb, 0xfe5 MOVFF PCLATU, POSTDEC1 002020 ffe5 002022 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002024 ffe5 002026 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002028 ffd9 00202a c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00202c ffe5 ; .line 32; interrupts.c if(INTCONbits.TMR0IF==1) 00202e 6a00 clrf 0, 0 CLRF r0x00 002030 b4f2 btfsc 0xf2, 0x2, 0 BTFSC _INTCONbits, 2 002032 2a00 incf 0, 0x1, 0 INCF r0x00, F 002034 5000 movf 0, 0, 0 MOVF r0x00, W 002036 0a01 xorlw 0x1 XORLW 0x01 002038 e103 bnz 0x2040 BNZ _00135_DS_ ; .line 34; interrupts.c HAL_INT_TIMER0_FUNC(); 00203a eccf call 0x239e, 0 CALL _HAL_INT_TIMER0_FUNC 00203c f011 ; .line 35; interrupts.c INTCONbits.TMR0IF = 0; // clear flag 00203e 94f2 bcf 0xf2, 0x2, 0 BCF _INTCONbits, 2 _00135_DS_: 002040 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 002042 f000 002044 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002046 ffd9 002048 cfe4 movff 0xfe4, 0xffb MOVFF PREINC1, PCLATU 00204a fffb 00204c cfe4 movff 0xfe4, 0xffa MOVFF PREINC1, PCLATH 00204e fffa 002050 cfe4 movff 0xfe4, 0xfea MOVFF PREINC1, FSR0H 002052 ffea 002054 cfe4 movff 0xfe4, 0xfe9 MOVFF PREINC1, FSR0L 002056 ffe9 002058 cfe4 movff 0xfe4, 0xff4 MOVFF PREINC1, PRODH 00205a fff4 00205c cfe4 movff 0xfe4, 0xff3 MOVFF PREINC1, PRODL 00205e fff3 002060 cfe4 movff 0xfe4, 0xfe0 MOVFF PREINC1, BSR 002062 ffe0 002064 cfe4 movff 0xfe4, 0xfd8 MOVFF PREINC1, STATUS 002066 ffd8 002068 cfe4 movff 0xfe4, 0xfe8 MOVFF PREINC1, WREG 00206a ffe8 00206c 0010 retfie 0 RETFIE ; ; Starting pCode block S_Serial_test__EEPROM_memset code _EEPROM_memset: ; .line 29; eeprom.h static uint8_t EEPROM_memset( uint8_t addr, void *src, uint8_t len ) { 001b56 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001b58 ffe5 001b5a cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001b5c ffd9 001b5e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001b60 ffe5 001b62 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 001b64 ffe5 001b66 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001b68 ffe5 001b6a c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001b6c ffe5 001b6e c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001b70 ffe5 001b72 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 001b74 ffe5 001b76 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 001b78 ffe5 001b7a c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001b7c ffe5 001b7e 0e02 movlw 0x2 MOVLW 0x02 001b80 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001b82 f000 001b84 0e03 movlw 0x3 MOVLW 0x03 001b86 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 001b88 f001 001b8a 0e04 movlw 0x4 MOVLW 0x04 001b8c cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001b8e f002 001b90 0e05 movlw 0x5 MOVLW 0x05 001b92 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 001b94 f003 001b96 0e06 movlw 0x6 MOVLW 0x06 001b98 cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 001b9a f004 ; .line 31; eeprom.h for (i=0; iID, msg->buf, msg->len, 0018c6 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0018c8 ffe9 0018ca c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0018cc fff3 0018ce 5002 movf 0x2, 0, 0 MOVF r0x02, W 0018d0 eca5 call 0x234a, 0 CALL __gptrget2 0018d2 f011 0018d4 6e03 movwf 0x3, 0 MOVWF r0x03 0018d6 cff3 movff 0xff3, 0x4 MOVFF PRODL, r0x04 0018d8 f004 0018da 6a05 clrf 0x5, 0 CLRF r0x05 0018dc 6a06 clrf 0x6, 0 CLRF r0x06 0018de 5000 movf 0, 0, 0 MOVF r0x00, W 0018e0 0f03 addlw 0x3 ADDLW 0x03 0018e2 6e07 movwf 0x7, 0 MOVWF r0x07 0018e4 0e00 movlw 0 MOVLW 0x00 0018e6 2001 addwfc 0x1, 0, 0 ADDWFC r0x01, W 0018e8 6e08 movwf 0x8, 0 MOVWF r0x08 0018ea 0e00 movlw 0 MOVLW 0x00 0018ec 2002 addwfc 0x2, 0, 0 ADDWFC r0x02, W 0018ee 6e09 movwf 0x9, 0 MOVWF r0x09 0018f0 0e02 movlw 0x2 MOVLW 0x02 0018f2 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 0018f4 0e00 movlw 0 MOVLW 0x00 0018f6 2201 addwfc 0x1, 0x1, 0 ADDWFC r0x01, F 0018f8 0e00 movlw 0 MOVLW 0x00 0018fa 2202 addwfc 0x2, 0x1, 0 ADDWFC r0x02, F 0018fc c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0018fe ffe9 001900 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001902 fff3 001904 5002 movf 0x2, 0, 0 MOVF r0x02, W 001906 ece0 call 0x23c0, 0 CALL __gptrget1 001908 f011 00190a 6e00 movwf 0, 0 MOVWF r0x00 ; .line 79; can.c ECAN_TX_PRIORITY_0 & ECAN_TX_STD_FRAME & ECAN_TX_NO_RTR_FRAME); 00190c 0e00 movlw 0 MOVLW 0x00 00190e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001910 5000 movf 0, 0, 0 MOVF r0x00, W 001912 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001914 5009 movf 0x9, 0, 0 MOVF r0x09, W 001916 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001918 5008 movf 0x8, 0, 0 MOVF r0x08, W 00191a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00191c 5007 movf 0x7, 0, 0 MOVF r0x07, W 00191e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001920 5006 movf 0x6, 0, 0 MOVF r0x06, W 001922 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001924 5005 movf 0x5, 0, 0 MOVF r0x05, W 001926 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001928 5004 movf 0x4, 0, 0 MOVF r0x04, W 00192a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00192c 5003 movf 0x3, 0, 0 MOVF r0x03, W 00192e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001930 ecd8 call 0x7b0, 0 CALL _ECANSendMessage 001932 f003 001934 6e00 movwf 0, 0 MOVWF r0x00 001936 0e09 movlw 0x9 MOVLW 0x09 001938 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00193a 6a01 clrf 0x1, 0 CLRF r0x01 ; .line 81; can.c if (rc) 00193c 5000 movf 0, 0, 0 MOVF r0x00, W 00193e 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 001940 e007 bz 0x1950 BZ _00142_DS_ ; .line 82; can.c CAN_status1.tx++; 001942 c0aa movff 0xaa, 0x2 MOVFF _CAN_status1, r0x02 001944 f002 001946 2a02 incf 0x2, 0x1, 0 INCF r0x02, F 001948 5002 movf 0x2, 0, 0 MOVF r0x02, W 00194a 0100 movlb 0 BANKSEL _CAN_status1 00194c 6faa movwf 0xaa, 0x1 MOVWF _CAN_status1, B 00194e d006 bra 0x195c BRA _00143_DS_ _00142_DS_: ; .line 84; can.c CAN_status1.txError++; 001950 c0ab movff 0xab, 0x2 MOVFF (_CAN_status1 + 1), r0x02 001952 f002 001954 2a02 incf 0x2, 0x1, 0 INCF r0x02, F 001956 5002 movf 0x2, 0, 0 MOVF r0x02, W 001958 0100 movlb 0 BANKSEL (_CAN_status1 + 1) 00195a 6fab movwf 0xab, 0x1 MOVWF (_CAN_status1 + 1), B _00143_DS_: ; .line 86; can.c return rc; 00195c c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 00195e fff3 001960 5000 movf 0, 0, 0 MOVF r0x00, W 001962 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 001964 f009 001966 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 001968 f008 00196a cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 00196c f007 00196e cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 001970 f006 001972 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 001974 f005 001976 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 001978 f004 00197a cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 00197c f003 00197e cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 001980 f002 001982 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 001984 f001 001986 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001988 f000 00198a cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 00198c ffd9 00198e 0012 return 0 RETURN ; ; Starting pCode block S_can__CAN_recv code _CAN_recv: ; .line 44; can.c int CAN_recv( struct CAN_msg *msg ) { 0015ce cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0015d0 ffe5 0015d2 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0015d4 ffd9 0015d6 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 0015d8 ffe5 0015da c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 0015dc ffe5 0015de c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 0015e0 ffe5 0015e2 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 0015e4 ffe5 0015e6 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 0015e8 ffe5 0015ea c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 0015ec ffe5 0015ee c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 0015f0 ffe5 0015f2 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0015f4 ffe5 0015f6 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 0015f8 ffe5 0015fa c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 0015fc ffe5 0015fe c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 001600 ffe5 001602 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 001604 ffe5 001606 c00c movff 0xc, 0xfe5 MOVFF r0x0c, POSTDEC1 001608 ffe5 00160a c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 00160c ffe5 00160e c00e movff 0xe, 0xfe5 MOVFF r0x0e, POSTDEC1 001610 ffe5 001612 0e02 movlw 0x2 MOVLW 0x02 001614 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001616 f000 001618 0e03 movlw 0x3 MOVLW 0x03 00161a cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00161c f001 00161e 0e04 movlw 0x4 MOVLW 0x04 001620 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001622 f002 ; .line 56; can.c if (!ECANReceiveMessage ((unsigned long *)&temp, msg->buf, &msg->len, &flags)) 001624 0e00 movlw 0 MOVLW HIGH(_CAN_recv_temp_1_1) 001626 6e04 movwf 0x4, 0 MOVWF r0x04 001628 0eaf movlw 0xaf MOVLW LOW(_CAN_recv_temp_1_1) 00162a 6e03 movwf 0x3, 0 MOVWF r0x03 00162c 0e80 movlw 0x80 MOVLW 0x80 00162e 6e05 movwf 0x5, 0 MOVWF r0x05 001630 5000 movf 0, 0, 0 MOVF r0x00, W 001632 0f03 addlw 0x3 ADDLW 0x03 001634 6e06 movwf 0x6, 0 MOVWF r0x06 001636 0e00 movlw 0 MOVLW 0x00 001638 2001 addwfc 0x1, 0, 0 ADDWFC r0x01, W 00163a 6e07 movwf 0x7, 0 MOVWF r0x07 00163c 0e00 movlw 0 MOVLW 0x00 00163e 2002 addwfc 0x2, 0, 0 ADDWFC r0x02, W 001640 6e08 movwf 0x8, 0 MOVWF r0x08 001642 5000 movf 0, 0, 0 MOVF r0x00, W 001644 0f02 addlw 0x2 ADDLW 0x02 001646 6e09 movwf 0x9, 0 MOVWF r0x09 001648 0e00 movlw 0 MOVLW 0x00 00164a 2001 addwfc 0x1, 0, 0 ADDWFC r0x01, W 00164c 6e0a movwf 0xa, 0 MOVWF r0x0a 00164e 0e00 movlw 0 MOVLW 0x00 001650 2002 addwfc 0x2, 0, 0 ADDWFC r0x02, W 001652 6e0b movwf 0xb, 0 MOVWF r0x0b 001654 0e00 movlw 0 MOVLW HIGH(_CAN_recv_flags_1_1) 001656 6e0d movwf 0xd, 0 MOVWF r0x0d 001658 0ebf movlw 0xbf MOVLW LOW(_CAN_recv_flags_1_1) 00165a 6e0c movwf 0xc, 0 MOVWF r0x0c 00165c 0e80 movlw 0x80 MOVLW 0x80 00165e 6e0e movwf 0xe, 0 MOVWF r0x0e 001660 500e movf 0xe, 0, 0 MOVF r0x0e, W 001662 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001664 500d movf 0xd, 0, 0 MOVF r0x0d, W 001666 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001668 500c movf 0xc, 0, 0 MOVF r0x0c, W 00166a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00166c 500b movf 0xb, 0, 0 MOVF r0x0b, W 00166e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001670 500a movf 0xa, 0, 0 MOVF r0x0a, W 001672 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001674 5009 movf 0x9, 0, 0 MOVF r0x09, W 001676 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001678 5008 movf 0x8, 0, 0 MOVF r0x08, W 00167a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00167c 5007 movf 0x7, 0, 0 MOVF r0x07, W 00167e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001680 5006 movf 0x6, 0, 0 MOVF r0x06, W 001682 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001684 5005 movf 0x5, 0, 0 MOVF r0x05, W 001686 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001688 5004 movf 0x4, 0, 0 MOVF r0x04, W 00168a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00168c 5003 movf 0x3, 0, 0 MOVF r0x03, W 00168e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001690 ec06 call 0xc, 0 CALL _ECANReceiveMessage 001692 f000 001694 6e03 movwf 0x3, 0 MOVWF r0x03 001696 0e0c movlw 0xc MOVLW 0x0c 001698 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00169a 5003 movf 0x3, 0, 0 MOVF r0x03, W 00169c e103 bnz 0x16a4 BNZ _00125_DS_ ; .line 57; can.c return 0; 00169e 6af3 clrf 0xf3, 0 CLRF PRODL 0016a0 6ae8 clrf 0xe8, 0 CLRF WREG 0016a2 d042 bra 0x1728 BRA _00130_DS_ _00125_DS_: 0016a4 0100 movlb 0 BANKSEL _CAN_recv_temp_1_1 ; .line 58; can.c msg->ID = (uint16_t) temp; 0016a6 51af movf 0xaf, 0, 0x1 MOVF _CAN_recv_temp_1_1, W, B 0016a8 6e03 movwf 0x3, 0 MOVWF r0x03 0016aa 0100 movlb 0 BANKSEL (_CAN_recv_temp_1_1 + 1) 0016ac 51b0 movf 0xb0, 0, 0x1 MOVF (_CAN_recv_temp_1_1 + 1), W, B 0016ae 6e04 movwf 0x4, 0 MOVWF r0x04 0016b0 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 0016b2 ffe5 0016b4 c004 movff 0x4, 0xff4 MOVFF r0x04, PRODH 0016b6 fff4 0016b8 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0016ba ffe9 0016bc c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0016be fff3 0016c0 5002 movf 0x2, 0, 0 MOVF r0x02, W 0016c2 ec18 call 0x2430, 0 CALL __gptrput2 0016c4 f012 ; .line 59; can.c CAN_status1.rx ++; 0016c6 c0ac movff 0xac, 0x3 MOVFF (_CAN_status1 + 2), r0x03 0016c8 f003 0016ca 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 0016cc 5003 movf 0x3, 0, 0 MOVF r0x03, W 0016ce 0100 movlb 0 BANKSEL (_CAN_status1 + 2) 0016d0 6fac movwf 0xac, 0x1 MOVWF (_CAN_status1 + 2), B 0016d2 0100 movlb 0 BANKSEL _CAN_recv_flags_1_1 ; .line 61; can.c if (flags & (ECAN_RX_XTD_FRAME | ECAN_RX_RTR_FRAME)) { // don't accept these strange things. 0016d4 51bf movf 0xbf, 0, 0x1 MOVF _CAN_recv_flags_1_1, W, B 0016d6 0b60 andlw 0x60 ANDLW 0x60 0016d8 e009 bz 0x16ec BZ _00127_DS_ ; .line 62; can.c CAN_status1.exotic++; 0016da c0ae movff 0xae, 0x3 MOVFF (_CAN_status1 + 4), r0x03 0016dc f003 0016de 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 0016e0 5003 movf 0x3, 0, 0 MOVF r0x03, W 0016e2 0100 movlb 0 BANKSEL (_CAN_status1 + 4) 0016e4 6fae movwf 0xae, 0x1 MOVWF (_CAN_status1 + 4), B ; .line 63; can.c return -1; 0016e6 68f3 setf 0xf3, 0 SETF PRODL 0016e8 68e8 setf 0xe8, 0 SETF WREG 0016ea d01e bra 0x1728 BRA _00130_DS_ _00127_DS_: 0016ec 0100 movlb 0 BANKSEL _CAN_recv_flags_1_1 ; .line 65; can.c if (flags & ECAN_RX_OVERFLOW) { // it's not clear what this flag means, but count it. 0016ee a7bf btfss 0xbf, 0x3, 0x1 BTFSS _CAN_recv_flags_1_1, 3, B 0016f0 d009 bra 0x1704 BRA _00129_DS_ ; .line 66; can.c CAN_status1.overflow++; 0016f2 c0ad movff 0xad, 0x3 MOVFF (_CAN_status1 + 3), r0x03 0016f4 f003 0016f6 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 0016f8 5003 movf 0x3, 0, 0 MOVF r0x03, W 0016fa 0100 movlb 0 BANKSEL (_CAN_status1 + 3) 0016fc 6fad movwf 0xad, 0x1 MOVWF (_CAN_status1 + 3), B ; .line 67; can.c return -2; 0016fe 68f3 setf 0xf3, 0 SETF PRODL 001700 0efe movlw 0xfe MOVLW 0xfe 001702 d012 bra 0x1728 BRA _00130_DS_ _00129_DS_: ; .line 70; can.c return msg->len; 001704 0e02 movlw 0x2 MOVLW 0x02 001706 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 001708 0e00 movlw 0 MOVLW 0x00 00170a 2201 addwfc 0x1, 0x1, 0 ADDWFC r0x01, F 00170c 0e00 movlw 0 MOVLW 0x00 00170e 2202 addwfc 0x2, 0x1, 0 ADDWFC r0x02, F 001710 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001712 ffe9 001714 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001716 fff3 001718 5002 movf 0x2, 0, 0 MOVF r0x02, W 00171a ece0 call 0x23c0, 0 CALL __gptrget1 00171c f011 00171e 6e00 movwf 0, 0 MOVWF r0x00 001720 6a01 clrf 0x1, 0 CLRF r0x01 001722 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001724 fff3 001726 5000 movf 0, 0, 0 MOVF r0x00, W _00130_DS_: 001728 cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 00172a f00e 00172c cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 00172e f00d 001730 cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 001732 f00c 001734 cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 001736 f00b 001738 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 00173a f00a 00173c cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 00173e f009 001740 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 001742 f008 001744 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 001746 f007 001748 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 00174a f006 00174c cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 00174e f005 001750 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 001752 f004 001754 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 001756 f003 001758 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 00175a f002 00175c cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00175e f001 001760 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001762 f000 001764 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001766 ffd9 001768 0012 return 0 RETURN ; ; Starting pCode block S_can__CAN_init code _CAN_init: ; .line 31; can.c int CAN_init( void ) { 0020dc cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0020de ffe5 0020e0 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0020e2 ffd9 0020e4 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 0020e6 ffe5 0020e8 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 0020ea ffe5 0020ec c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 0020ee ffe5 0020f0 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 0020f2 ffe5 ; .line 36; can.c ECANInitialize(); 0020f4 ec7d call 0x1efa, 0 CALL _ECANInitialize 0020f6 f00f ; .line 38; can.c for (k = 0; kbaud))/(ucon->baud)/4 - 1) <= 255) 001054 c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 001056 ffe9 001058 c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 00105a fff3 00105c 5004 movf 0x4, 0, 0 MOVF r0x04, W 00105e eca5 call 0x234a, 0 CALL __gptrget2 001060 f011 001062 6e00 movwf 0, 0 MOVWF r0x00 001064 cff3 movff 0xff3, 0x1 MOVFF PRODL, r0x01 001066 f001 001068 5001 movf 0x1, 0, 0 MOVF r0x01, W 00106a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00106c 5000 movf 0, 0, 0 MOVF r0x00, W 00106e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001070 0e00 movlw 0 MOVLW 0x00 001072 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001074 0e02 movlw 0x2 MOVLW 0x02 001076 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001078 ec4b call 0x1c96, 0 CALL __mulint 00107a f00e 00107c 6e02 movwf 0x2, 0 MOVWF r0x02 00107e cff3 movff 0xff3, 0x3 MOVFF PRODL, r0x03 001080 f003 001082 0e04 movlw 0x4 MOVLW 0x04 001084 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 001086 6a04 clrf 0x4, 0 CLRF r0x04 001088 6a05 clrf 0x5, 0 CLRF r0x05 00108a 0e40 movlw 0x40 MOVLW 0x40 00108c 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 00108e 0e4b movlw 0x4b MOVLW 0x4b 001090 2203 addwfc 0x3, 0x1, 0 ADDWFC r0x03, F 001092 0e4c movlw 0x4c MOVLW 0x4c 001094 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 001096 0e00 movlw 0 MOVLW 0x00 001098 2205 addwfc 0x5, 0x1, 0 ADDWFC r0x05, F 00109a c000 movff 0, 0x6 MOVFF r0x00, r0x06 00109c f006 00109e c001 movff 0x1, 0x7 MOVFF r0x01, r0x07 0010a0 f007 0010a2 6a08 clrf 0x8, 0 CLRF r0x08 0010a4 6a09 clrf 0x9, 0 CLRF r0x09 0010a6 5009 movf 0x9, 0, 0 MOVF r0x09, W 0010a8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010aa 5008 movf 0x8, 0, 0 MOVF r0x08, W 0010ac 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010ae 5007 movf 0x7, 0, 0 MOVF r0x07, W 0010b0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010b2 5006 movf 0x6, 0, 0 MOVF r0x06, W 0010b4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010b6 5005 movf 0x5, 0, 0 MOVF r0x05, W 0010b8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010ba 5004 movf 0x4, 0, 0 MOVF r0x04, W 0010bc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010be 5003 movf 0x3, 0, 0 MOVF r0x03, W 0010c0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010c2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0010c4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010c6 ec10 call 0x1420, 0 CALL __divslong 0010c8 f00a 0010ca 6e02 movwf 0x2, 0 MOVWF r0x02 0010cc cff3 movff 0xff3, 0x3 MOVFF PRODL, r0x03 0010ce f003 0010d0 cff4 movff 0xff4, 0x4 MOVFF PRODH, r0x04 0010d2 f004 0010d4 cfe9 movff 0xfe9, 0x5 MOVFF FSR0L, r0x05 0010d6 f005 0010d8 0e08 movlw 0x8 MOVLW 0x08 0010da 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0010dc 0e00 movlw 0 MOVLW 0x00 0010de 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010e0 0e00 movlw 0 MOVLW 0x00 0010e2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010e4 0e00 movlw 0 MOVLW 0x00 0010e6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010e8 0e04 movlw 0x4 MOVLW 0x04 0010ea 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010ec 5005 movf 0x5, 0, 0 MOVF r0x05, W 0010ee 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010f0 5004 movf 0x4, 0, 0 MOVF r0x04, W 0010f2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010f4 5003 movf 0x3, 0, 0 MOVF r0x03, W 0010f6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010f8 5002 movf 0x2, 0, 0 MOVF r0x02, W 0010fa 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0010fc ec10 call 0x1420, 0 CALL __divslong 0010fe f00a 001100 6e02 movwf 0x2, 0 MOVWF r0x02 001102 cff3 movff 0xff3, 0x3 MOVFF PRODL, r0x03 001104 f003 001106 cff4 movff 0xff4, 0x4 MOVFF PRODH, r0x04 001108 f004 00110a cfe9 movff 0xfe9, 0x5 MOVFF FSR0L, r0x05 00110c f005 00110e 0e08 movlw 0x8 MOVLW 0x08 001110 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 001112 0eff movlw 0xff MOVLW 0xff 001114 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 001116 0eff movlw 0xff MOVLW 0xff 001118 2203 addwfc 0x3, 0x1, 0 ADDWFC r0x03, F 00111a 0eff movlw 0xff MOVLW 0xff 00111c 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 00111e 0eff movlw 0xff MOVLW 0xff 001120 2205 addwfc 0x5, 0x1, 0 ADDWFC r0x05, F 001122 5005 movf 0x5, 0, 0 MOVF r0x05, W 001124 0f80 addlw 0x80 ADDLW 0x80 001126 0f80 addlw 0x80 ADDLW 0x80 001128 e108 bnz 0x113a BNZ _00116_DS_ 00112a 0e00 movlw 0 MOVLW 0x00 00112c 5c04 subwf 0x4, 0, 0 SUBWF r0x04, W 00112e e105 bnz 0x113a BNZ _00116_DS_ 001130 0e01 movlw 0x1 MOVLW 0x01 001132 5c03 subwf 0x3, 0, 0 SUBWF r0x03, W 001134 e102 bnz 0x113a BNZ _00116_DS_ 001136 0e00 movlw 0 MOVLW 0x00 001138 5c02 subwf 0x2, 0, 0 SUBWF r0x02, W _00116_DS_: 00113a e20a bc 0x1150 BC _00106_DS_ ; .line 21; serial.c USART_BRGH_HIGH, BAUD_SPBRG); 00113c 5003 movf 0x3, 0, 0 MOVF r0x03, W 00113e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001140 5002 movf 0x2, 0, 0 MOVF r0x02, W 001142 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001144 0e7c movlw 0x7c MOVLW 0x7c 001146 ecc0 call 0x1f80, 0 CALL _usart_open 001148 f00f 00114a 0e02 movlw 0x2 MOVLW 0x02 00114c 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00114e d064 bra 0x1218 BRA _00107_DS_ _00106_DS_: ; .line 26; serial.c BAUD_SPBRG = (INSTR_FREQ+8*ucon->baud)/ucon->baud/16 - 1; 001150 5001 movf 0x1, 0, 0 MOVF r0x01, W 001152 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001154 5000 movf 0, 0, 0 MOVF r0x00, W 001156 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001158 0e00 movlw 0 MOVLW 0x00 00115a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00115c 0e08 movlw 0x8 MOVLW 0x08 00115e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001160 ec4b call 0x1c96, 0 CALL __mulint 001162 f00e 001164 6e00 movwf 0, 0 MOVWF r0x00 001166 cff3 movff 0xff3, 0x1 MOVFF PRODL, r0x01 001168 f001 00116a 0e04 movlw 0x4 MOVLW 0x04 00116c 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00116e 6a04 clrf 0x4, 0 CLRF r0x04 001170 6a05 clrf 0x5, 0 CLRF r0x05 001172 0e40 movlw 0x40 MOVLW 0x40 001174 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 001176 0e4b movlw 0x4b MOVLW 0x4b 001178 2201 addwfc 0x1, 0x1, 0 ADDWFC r0x01, F 00117a 0e4c movlw 0x4c MOVLW 0x4c 00117c 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 00117e 0e00 movlw 0 MOVLW 0x00 001180 2205 addwfc 0x5, 0x1, 0 ADDWFC r0x05, F 001182 5009 movf 0x9, 0, 0 MOVF r0x09, W 001184 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001186 5008 movf 0x8, 0, 0 MOVF r0x08, W 001188 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00118a 5007 movf 0x7, 0, 0 MOVF r0x07, W 00118c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00118e 5006 movf 0x6, 0, 0 MOVF r0x06, W 001190 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001192 5005 movf 0x5, 0, 0 MOVF r0x05, W 001194 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001196 5004 movf 0x4, 0, 0 MOVF r0x04, W 001198 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00119a 5001 movf 0x1, 0, 0 MOVF r0x01, W 00119c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00119e 5000 movf 0, 0, 0 MOVF r0x00, W 0011a0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011a2 ec10 call 0x1420, 0 CALL __divslong 0011a4 f00a 0011a6 6e00 movwf 0, 0 MOVWF r0x00 0011a8 cff3 movff 0xff3, 0x1 MOVFF PRODL, r0x01 0011aa f001 0011ac cff4 movff 0xff4, 0x4 MOVFF PRODH, r0x04 0011ae f004 0011b0 cfe9 movff 0xfe9, 0x5 MOVFF FSR0L, r0x05 0011b2 f005 0011b4 0e08 movlw 0x8 MOVLW 0x08 0011b6 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0011b8 0e00 movlw 0 MOVLW 0x00 0011ba 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011bc 0e00 movlw 0 MOVLW 0x00 0011be 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011c0 0e00 movlw 0 MOVLW 0x00 0011c2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011c4 0e10 movlw 0x10 MOVLW 0x10 0011c6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011c8 5005 movf 0x5, 0, 0 MOVF r0x05, W 0011ca 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011cc 5004 movf 0x4, 0, 0 MOVF r0x04, W 0011ce 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011d0 5001 movf 0x1, 0, 0 MOVF r0x01, W 0011d2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011d4 5000 movf 0, 0, 0 MOVF r0x00, W 0011d6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0011d8 ec10 call 0x1420, 0 CALL __divslong 0011da f00a 0011dc 6e00 movwf 0, 0 MOVWF r0x00 0011de cff3 movff 0xff3, 0x1 MOVFF PRODL, r0x01 0011e0 f001 0011e2 cff4 movff 0xff4, 0x4 MOVFF PRODH, r0x04 0011e4 f004 0011e6 cfe9 movff 0xfe9, 0x5 MOVFF FSR0L, r0x05 0011e8 f005 0011ea 0e08 movlw 0x8 MOVLW 0x08 0011ec 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0011ee 0eff movlw 0xff MOVLW 0xff 0011f0 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 0011f2 0eff movlw 0xff MOVLW 0xff 0011f4 2201 addwfc 0x1, 0x1, 0 ADDWFC r0x01, F 0011f6 0eff movlw 0xff MOVLW 0xff 0011f8 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 0011fa 0eff movlw 0xff MOVLW 0xff 0011fc 2205 addwfc 0x5, 0x1, 0 ADDWFC r0x05, F 0011fe 5000 movf 0, 0, 0 MOVF r0x00, W 001200 6e02 movwf 0x2, 0 MOVWF r0x02 001202 5001 movf 0x1, 0, 0 MOVF r0x01, W 001204 6e03 movwf 0x3, 0 MOVWF r0x03 ; .line 32; serial.c USART_BRGH_LOW, BAUD_SPBRG); 001206 5003 movf 0x3, 0, 0 MOVF r0x03, W 001208 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00120a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00120c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00120e 0e6c movlw 0x6c MOVLW 0x6c 001210 ecc0 call 0x1f80, 0 CALL _usart_open 001212 f00f 001214 0e02 movlw 0x2 MOVLW 0x02 001216 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00107_DS_: ; .line 35; serial.c usart_putc(13); 001218 0e0d movlw 0xd MOVLW 0x0d 00121a ec36 call 0x246c, 0 CALL _usart_putc 00121c f012 ; .line 36; serial.c RCSTAbits.SPEN = 1; //enable uart 00121e 8eab bsf 0xab, 0x7, 0 BSF _RCSTAbits, 7 ; .line 37; serial.c RCSTAbits.CREN = 1; // continous receive enable 001220 88ab bsf 0xab, 0x4, 0 BSF _RCSTAbits, 4 ; .line 44; serial.c return 1; 001222 6af3 clrf 0xf3, 0 CLRF PRODL 001224 0e01 movlw 0x1 MOVLW 0x01 001226 d002 bra 0x122c BRA _00110_DS_ _00109_DS_: ; .line 47; serial.c return 0; // not able to find the correct serial channel 001228 6af3 clrf 0xf3, 0 CLRF PRODL 00122a 6ae8 clrf 0xe8, 0 CLRF WREG _00110_DS_: 00122c cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 00122e f009 001230 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 001232 f008 001234 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 001236 f007 001238 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 00123a f006 00123c cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 00123e f005 001240 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 001242 f004 001244 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 001246 f003 001248 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 00124a f002 00124c cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00124e f001 001250 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001252 f000 001254 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001256 ffd9 001258 0012 return 0 RETURN ; Statistics: ; code size: 1148 (0x047c) bytes ( 0.88%) ; 574 (0x023e) words ; udata size: 0 (0x0000) bytes ( 0.00%) ; access size: 12 (0x000c) bytes end ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 2.9.7 #5883 (Jul 21 2010) (CYGWIN) ; This file was generated Sat Dec 25 14:04:38 2010 ;-------------------------------------------------------- ; PIC16 port for the Microchip 16-bit core micros ;-------------------------------------------------------- list p=18f2680 radix dec ;-------------------------------------------------------- ; public variables in this module ;-------------------------------------------------------- global _TIMER_setup global _TIMER_set_T0 global _TIMER_set_T1 global _TIMER_set_T2 global _TIMER_get ;-------------------------------------------------------- ; extern variables in this module ;-------------------------------------------------------- extern __gptrget1 extern _RXF6SIDHbits extern _RXF6SIDLbits extern _RXF6EIDHbits extern _RXF6EIDLbits extern _RXF7SIDHbits extern _RXF7SIDLbits extern _RXF7EIDHbits extern _RXF7EIDLbits extern _RXF8SIDHbits extern _RXF8SIDLbits extern _RXF8EIDHbits extern _RXF8EIDLbits extern _RXF9SIDHbits extern _RXF9SIDLbits extern _RXF9EIDHbits extern _RXF9EIDLbits extern _RXF10SIDHbits extern _RXF10SIDLbits extern _RXF10EIDHbits extern _RXF10EIDLbits extern _RXF11SIDHbits extern _RXF11SIDLbits extern _RXF11EIDHbits extern _RXF11EIDLbits extern _RXF12SIDHbits extern _RXF12SIDLbits extern _RXF12EIDHbits extern _RXF12EIDLbits extern _RXF13SIDHbits extern _RXF13SIDLbits extern _RXF13EIDHbits extern _RXF13EIDLbits extern _RXF14SIDHbits extern _RXF14SIDLbits extern _RXF14EIDHbits extern _RXF14EIDLbits extern _RXF15SIDHbits extern _RXF15SIDLbits extern _RXF15EIDHbits extern _RXF15EIDLbits extern _RXFCON0bits extern _RXFCON1bits extern _SDFLCbits extern _RXFBCON0bits extern _RXFBCON1bits extern _RXFBCON2bits extern _RXFBCON3bits extern _RXFBCON4bits extern _RXFBCON5bits extern _RXFBCON6bits extern _RXFBCON7bits extern _MSEL0bits extern _MSEL1bits extern _MSEL2bits extern _MSEL3bits extern _BSEL0bits extern _BIE0bits extern _TXBIEbits extern _B0CONbits extern _B0SIDHbits extern _B0SIDLbits extern _B0EIDHbits extern _B0EIDLbits extern _B0DLCbits extern _B0D0bits extern _B0D1bits extern _B0D2bits extern _B0D3bits extern _B0D4bits extern _B0D5bits extern _B0D6bits extern _B0D7bits extern _CANSTAT_RO9bits extern _CANCON_RO9bits extern _B1CONbits extern _B1SIDHbits extern _B1SIDLbits extern _B1EIDHbits extern _B1EIDLbits extern _B1DLCbits extern _B1D0bits extern _B1D1bits extern _B1D2bits extern _B1D3bits extern _B1D4bits extern _B1D5bits extern _B1D6bits extern _B1D7bits extern _CANSTAT_RO8bits extern _CANCON_RO8bits extern _B2CONbits extern _B2SIDHbits extern _B2SIDLbits extern _B2EIDHbits extern _B2EIDLbits extern _B2DLCbits extern _B2D0bits extern _B2D1bits extern _B2D2bits extern _B2D3bits extern _B2D4bits extern _B2D5bits extern _B2D6bits extern _B2D7bits extern _CANSTAT_RO7bits extern _CANCON_RO7bits extern _B3CONbits extern _B3SIDHbits extern _B3SIDLbits extern _B3EIDHbits extern _B3EIDLbits extern _B3DLCbits extern _B3D0bits extern _B3D1bits extern _B3D2bits extern _B3D3bits extern _B3D4bits extern _B3D5bits extern _B3D6bits extern _B3D7bits extern _CANSTAT_RO6bits extern _CANCON_RO6bits extern _B4CONbits extern _B4SIDHbits extern _B4SIDLbits extern _B4EIDHbits extern _B4EIDLbits extern _B4DLCbits extern _B4D0bits extern _B4D1bits extern _B4D2bits extern _B4D3bits extern _B4D4bits extern _B4D5bits extern _B4D6bits extern _B4D7bits extern _CANSTAT_RO5bits extern _CANCON_RO5bits extern _B5CONbits extern _B5SIDHbits extern _B5SIDLbits extern _B5EIDHbits extern _B5EIDLbits extern _B5DLCbits extern _B5D0bits extern _B5D1bits extern _B5D2bits extern _B5D3bits extern _B5D4bits extern _B5D5bits extern _B5D6bits extern _B5D7bits extern _CANSTAT_RO4bits extern _CANCON_RO4bits extern _RXF0SIDHbits extern _RXF0SIDLbits extern _RXF0EIDHbits extern _RXF0EIDLbits extern _RXF1SIDHbits extern _RXF1SIDLbits extern _RXF1EIDHbits extern _RXF1EIDLbits extern _RXF2SIDHbits extern _RXF2SIDLbits extern _RXF2EIDHbits extern _RXF2EIDLbits extern _RXF3SIDHbits extern _RXF3SIDLbits extern _RXF3EIDHbits extern _RXF3EIDLbits extern _RXF4SIDHbits extern _RXF4SIDLbits extern _RXF4EIDHbits extern _RXF4EIDLbits extern _RXF5SIDHbits extern _RXF5SIDLbits extern _RXF5EIDHbits extern _RXF5EIDLbits extern _RXM0SIDHbits extern _RXM0SIDLbits extern _RXM0EIDHbits extern _RXM0EIDLbits extern _RXM1SIDHbits extern _RXM1SIDLbits extern _RXM1EIDHbits extern _RXM1EIDLbits extern _TXB2CONbits extern _TXB2SIDHbits extern _TXB2SIDLbits extern _TXB2EIDHbits extern _TXB2EIDLbits extern _TXB2DLCbits extern _TXB2D0bits extern _TXB2D1bits extern _TXB2D2bits extern _TXB2D3bits extern _TXB2D4bits extern _TXB2D5bits extern _TXB2D6bits extern _TXB2D7bits extern _CANSTAT_RO3bits extern _CANCON_RO3bits extern _TXB1CONbits extern _TXB1SIDHbits extern _TXB1SIDLbits extern _TXB1EIDHbits extern _TXB1EIDLbits extern _TXB1DLCbits extern _TXB1D0bits extern _TXB1D1bits extern _TXB1D2bits extern _TXB1D3bits extern _TXB1D4bits extern _TXB1D5bits extern _TXB1D6bits extern _TXB1D7bits extern _CANSTAT_RO2bits extern _CANCON_RO2bits extern _TXB0CONbits extern _TXB0SIDHbits extern _TXB0SIDLbits extern _TXB0EIDHbits extern _TXB0EIDLbits extern _TXB0DLCbits extern _TXB0D0bits extern _TXB0D1bits extern _TXB0D2bits extern _TXB0D3bits extern _TXB0D4bits extern _TXB0D5bits extern _TXB0D6bits extern _TXB0D7bits extern _CANSTAT_RO1bits extern _CANCON_RO1bits extern _RXB1CONbits extern _RXB1SIDHbits extern _RXB1SIDLbits extern _RXB1EIDHbits extern _RXB1EIDLbits extern _RXB1DLCbits extern _RXB1D0bits extern _RXB1D1bits extern _RXB1D2bits extern _RXB1D3bits extern _RXB1D4bits extern _RXB1D5bits extern _RXB1D6bits extern _RXB1D7bits extern _CANSTAT_RO0bits extern _CANCON_RO0bits extern _RXB0CONbits extern _RXB0SIDHbits extern _RXB0SIDLbits extern _RXB0EIDHbits extern _RXB0EIDLbits extern _RXB0DLCbits extern _RXB0D0bits extern _RXB0D1bits extern _RXB0D2bits extern _RXB0D3bits extern _RXB0D4bits extern _RXB0D5bits extern _RXB0D6bits extern _RXB0D7bits extern _CANSTATbits extern _CANCONbits extern _BRGCON1bits extern _BRGCON2bits extern _BRGCON3bits extern _CIOCONbits extern _COMSTATbits extern _RXERRCNTbits extern _TXERRCNTbits extern _ECANCONbits extern _PORTAbits extern _PORTBbits extern _PORTCbits extern _LATAbits extern _LATBbits extern _LATCbits extern _DDRAbits extern _TRISAbits extern _DDRBbits extern _TRISBbits extern _DDRCbits extern _TRISCbits extern _OSCTUNEbits extern _PIE1bits extern _PIR1bits extern _IPR1bits extern _PIE2bits extern _PIR2bits extern _IPR2bits extern _PIE3bits extern _PIR3bits extern _IPR3bits extern _EECON1bits extern _RCSTAbits extern _TXSTAbits extern _T3CONbits extern _BAUDCONbits extern _CCP1CONbits extern _ADCON2bits extern _ADCON1bits extern _ADCON0bits extern _SSPCON2bits extern _SSPCON1bits extern _SSPSTATbits extern _T2CONbits extern _T1CONbits extern _RCONbits extern _WDTCONbits extern _HLVDCONbits extern _LVDCONbits extern _OSCCONbits extern _T0CONbits extern _STATUSbits extern _INTCON3bits extern _INTCON2bits extern _INTCONbits extern _STKPTRbits extern _RXF6SIDH extern _RXF6SIDL extern _RXF6EIDH extern _RXF6EIDL extern _RXF7SIDH extern _RXF7SIDL extern _RXF7EIDH extern _RXF7EIDL extern _RXF8SIDH extern _RXF8SIDL extern _RXF8EIDH extern _RXF8EIDL extern _RXF9SIDH extern _RXF9SIDL extern _RXF9EIDH extern _RXF9EIDL extern _RXF10SIDH extern _RXF10SIDL extern _RXF10EIDH extern _RXF10EIDL extern _RXF11SIDH extern _RXF11SIDL extern _RXF11EIDH extern _RXF11EIDL extern _RXF12SIDH extern _RXF12SIDL extern _RXF12EIDH extern _RXF12EIDL extern _RXF13SIDH extern _RXF13SIDL extern _RXF13EIDH extern _RXF13EIDL extern _RXF14SIDH extern _RXF14SIDL extern _RXF14EIDH extern _RXF14EIDL extern _RXF15SIDH extern _RXF15SIDL extern _RXF15EIDH extern _RXF15EIDL extern _RXFCON0 extern _RXFCON1 extern _SDFLC extern _RXFBCON0 extern _RXFBCON1 extern _RXFBCON2 extern _RXFBCON3 extern _RXFBCON4 extern _RXFBCON5 extern _RXFBCON6 extern _RXFBCON7 extern _MSEL0 extern _MSEL1 extern _MSEL2 extern _MSEL3 extern _BSEL0 extern _BIE0 extern _TXBIE extern _B0CON extern _B0SIDH extern _B0SIDL extern _B0EIDH extern _B0EIDL extern _B0DLC extern _B0D0 extern _B0D1 extern _B0D2 extern _B0D3 extern _B0D4 extern _B0D5 extern _B0D6 extern _B0D7 extern _CANSTAT_RO9 extern _CANCON_RO9 extern _B1CON extern _B1SIDH extern _B1SIDL extern _B1EIDH extern _B1EIDL extern _B1DLC extern _B1D0 extern _B1D1 extern _B1D2 extern _B1D3 extern _B1D4 extern _B1D5 extern _B1D6 extern _B1D7 extern _CANSTAT_RO8 extern _CANCON_RO8 extern _B2CON extern _B2SIDH extern _B2SIDL extern _B2EIDH extern _B2EIDL extern _B2DLC extern _B2D0 extern _B2D1 extern _B2D2 extern _B2D3 extern _B2D4 extern _B2D5 extern _B2D6 extern _B2D7 extern _CANSTAT_RO7 extern _CANCON_RO7 extern _B3CON extern _B3SIDH extern _B3SIDL extern _B3EIDH extern _B3EIDL extern _B3DLC extern _B3D0 extern _B3D1 extern _B3D2 extern _B3D3 extern _B3D4 extern _B3D5 extern _B3D6 extern _B3D7 extern _CANSTAT_RO6 extern _CANCON_RO6 extern _B4CON extern _B4SIDH extern _B4SIDL extern _B4EIDH extern _B4EIDL extern _B4DLC extern _B4D0 extern _B4D1 extern _B4D2 extern _B4D3 extern _B4D4 extern _B4D5 extern _B4D6 extern _B4D7 extern _CANSTAT_RO5 extern _CANCON_RO5 extern _B5CON extern _B5SIDH extern _B5SIDL extern _B5EIDH extern _B5EIDL extern _B5DLC extern _B5D0 extern _B5D1 extern _B5D2 extern _B5D3 extern _B5D4 extern _B5D5 extern _B5D6 extern _B5D7 extern _CANSTAT_RO4 extern _CANCON_RO4 extern _RXF0SIDH extern _RXF0SIDL extern _RXF0EIDH extern _RXF0EIDL extern _RXF1SIDH extern _RXF1SIDL extern _RXF1EIDH extern _RXF1EIDL extern _RXF2SIDH extern _RXF2SIDL extern _RXF2EIDH extern _RXF2EIDL extern _RXF3SIDH extern _RXF3SIDL extern _RXF3EIDH extern _RXF3EIDL extern _RXF4SIDH extern _RXF4SIDL extern _RXF4EIDH extern _RXF4EIDL extern _RXF5SIDH extern _RXF5SIDL extern _RXF5EIDH extern _RXF5EIDL extern _RXM0SIDH extern _RXM0SIDL extern _RXM0EIDH extern _RXM0EIDL extern _RXM1SIDH extern _RXM1SIDL extern _RXM1EIDH extern _RXM1EIDL extern _TXB2CON extern _TXB2SIDH extern _TXB2SIDL extern _TXB2EIDH extern _TXB2EIDL extern _TXB2DLC extern _TXB2D0 extern _TXB2D1 extern _TXB2D2 extern _TXB2D3 extern _TXB2D4 extern _TXB2D5 extern _TXB2D6 extern _TXB2D7 extern _CANSTAT_RO3 extern _CANCON_RO3 extern _TXB1CON extern _TXB1SIDH extern _TXB1SIDL extern _TXB1EIDH extern _TXB1EIDL extern _TXB1DLC extern _TXB1D0 extern _TXB1D1 extern _TXB1D2 extern _TXB1D3 extern _TXB1D4 extern _TXB1D5 extern _TXB1D6 extern _TXB1D7 extern _CANSTAT_RO2 extern _CANCON_RO2 extern _TXB0CON extern _TXB0SIDH extern _TXB0SIDL extern _TXB0EIDH extern _TXB0EIDL extern _TXB0DLC extern _TXB0D0 extern _TXB0D1 extern _TXB0D2 extern _TXB0D3 extern _TXB0D4 extern _TXB0D5 extern _TXB0D6 extern _TXB0D7 extern _CANSTAT_RO1 extern _CANCON_RO1 extern _RXB1CON extern _RXB1SIDH extern _RXB1SIDL extern _RXB1EIDH extern _RXB1EIDL extern _RXB1DLC extern _RXB1D0 extern _RXB1D1 extern _RXB1D2 extern _RXB1D3 extern _RXB1D4 extern _RXB1D5 extern _RXB1D6 extern _RXB1D7 extern _CANSTAT_RO0 extern _CANCON_RO0 extern _RXB0CON extern _RXB0SIDH extern _RXB0SIDL extern _RXB0EIDH extern _RXB0EIDL extern _RXB0DLC extern _RXB0D0 extern _RXB0D1 extern _RXB0D2 extern _RXB0D3 extern _RXB0D4 extern _RXB0D5 extern _RXB0D6 extern _RXB0D7 extern _CANSTAT extern _CANCON extern _BRGCON1 extern _BRGCON2 extern _BRGCON3 extern _CIOCON extern _COMSTAT extern _RXERRCNT extern _TXERRCNT extern _ECANCON extern _PORTA extern _PORTB extern _PORTC extern _LATA extern _LATB extern _LATC extern _DDRA extern _TRISA extern _DDRB extern _TRISB extern _DDRC extern _TRISC extern _OSCTUNE extern _PIE1 extern _PIR1 extern _IPR1 extern _PIE2 extern _PIR2 extern _IPR2 extern _PIE3 extern _PIR3 extern _IPR3 extern _EECON1 extern _EECON2 extern _EEDATA extern _EEADR extern _EEADRH extern _RCSTA extern _TXSTA extern _TXREG extern _RCREG extern _SPBRG extern _SPBRGH extern _T3CON extern _TMR3L extern _TMR3H extern _BAUDCON extern _CCP1CON extern _CCPR1 extern _CCPR1L extern _CCPR1H extern _ADCON2 extern _ADCON1 extern _ADCON0 extern _ADRES extern _ADRESL extern _ADRESH extern _SSPCON2 extern _SSPCON1 extern _SSPSTAT extern _SSPADD extern _SSPBUF extern _T2CON extern _PR2 extern _TMR2 extern _T1CON extern _TMR1L extern _TMR1H extern _RCON extern _WDTCON extern _HLVDCON extern _LVDCON extern _OSCCON extern _T0CON extern _TMR0L extern _TMR0H extern _STATUS extern _FSR2L extern _FSR2H extern _PLUSW2 extern _PREINC2 extern _POSTDEC2 extern _POSTINC2 extern _INDF2 extern _BSR extern _FSR1L extern _FSR1H extern _PLUSW1 extern _PREINC1 extern _POSTDEC1 extern _POSTINC1 extern _INDF1 extern _WREG extern _FSR0L extern _FSR0H extern _PLUSW0 extern _PREINC0 extern _POSTDEC0 extern _POSTINC0 extern _INDF0 extern _INTCON3 extern _INTCON2 extern _INTCON extern _PROD extern _PRODL extern _PRODH extern _TABLAT extern _TBLPTR extern _TBLPTRL extern _TBLPTRH extern _TBLPTRU extern _PC extern _PCL extern _PCLATH extern _PCLATU extern _STKPTR extern _TOS extern _TOSL extern _TOSH extern _TOSU ;-------------------------------------------------------- ; Equates to used internal registers ;-------------------------------------------------------- STATUS equ 0xfd8 PCL equ 0xff9 PCLATH equ 0xffa PCLATU equ 0xffb WREG equ 0xfe8 FSR0L equ 0xfe9 FSR1L equ 0xfe1 FSR2L equ 0xfd9 POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 ; Internal registers .registers udata_ovr 0x0000 r0x00 res 1 r0x01 res 1 r0x02 res 1 r0x03 res 1 r0x04 res 1 r0x05 res 1 ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; I code from now on! ; ; Starting pCode block S_timer__TIMER_get code _TIMER_get: ; .line 41; timer.c TIMER_value TIMER_get( TIMER_handle t ) { 002144 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002146 ffe5 002148 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00214a ffd9 00214c c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00214e ffe5 002150 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 002152 ffe5 002154 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 002156 ffe5 002158 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 00215a ffe5 00215c c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 00215e ffe5 002160 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 002162 ffe5 002164 0e02 movlw 0x2 MOVLW 0x02 002166 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 002168 f000 ; .line 42; timer.c switch (t) { 00216a 5000 movf 0, 0, 0 MOVF r0x00, W 00216c e110 bnz 0x218e BNZ _00141_DS_ ; .line 43; timer.c case TIMER_0: return (TMR0L + (TMR0H<<8)); 00216e cfd6 movff 0xfd6, 0 MOVFF _TMR0L, r0x00 002170 f000 002172 6a01 clrf 0x1, 0 CLRF r0x01 002174 cfd7 movff 0xfd7, 0x2 MOVFF _TMR0H, r0x02 002176 f002 002178 6a03 clrf 0x3, 0 CLRF r0x03 00217a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00217c 6e05 movwf 0x5, 0 MOVWF r0x05 00217e 6a04 clrf 0x4, 0 CLRF r0x04 002180 5004 movf 0x4, 0, 0 MOVF r0x04, W 002182 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 002184 5005 movf 0x5, 0, 0 MOVF r0x05, W 002186 2201 addwfc 0x1, 0x1, 0 ADDWFC r0x01, F 002188 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 00218a fff3 00218c 5000 movf 0, 0, 0 MOVF r0x00, W _00141_DS_: ; .line 46; timer.c }; 00218e cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 002190 f005 002192 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 002194 f004 002196 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 002198 f003 00219a cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 00219c f002 00219e cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0021a0 f001 0021a2 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0021a4 f000 0021a6 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0021a8 ffd9 0021aa 0012 return 0 RETURN ; ; Starting pCode block S_timer__TIMER_set_T2 code _TIMER_set_T2: ; .line 39; timer.c void TIMER_set_T2( TIMER_value v ) { } 002498 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00249a ffe5 00249c cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00249e ffd9 0024a0 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0024a2 ffd9 0024a4 0012 return 0 RETURN ; ; Starting pCode block S_timer__TIMER_set_T1 code _TIMER_set_T1: ; .line 37; timer.c void TIMER_set_T1( TIMER_value v ) { } 0024a6 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0024a8 ffe5 0024aa cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0024ac ffd9 0024ae cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0024b0 ffd9 0024b2 0012 return 0 RETURN ; ; Starting pCode block S_timer__TIMER_set_T0 code _TIMER_set_T0: ; .line 32; timer.c void TIMER_set_T0( TIMER_value v ) { 002200 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002202 ffe5 002204 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002206 ffd9 002208 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00220a ffe5 00220c c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 00220e ffe5 002210 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 002212 ffe5 002214 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 002216 ffe5 002218 0e02 movlw 0x2 MOVLW 0x02 00221a cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 00221c f000 00221e 0e03 movlw 0x3 MOVLW 0x03 002220 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 002222 f001 ; .line 33; timer.c TMR0H = (unsigned char)(v >> 8); 002224 5001 movf 0x1, 0, 0 MOVF r0x01, W 002226 6e02 movwf 0x2, 0 MOVWF r0x02 002228 6a03 clrf 0x3, 0 CLRF r0x03 00222a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00222c 6ed7 movwf 0xd7, 0 MOVWF _TMR0H ; .line 34; timer.c TMR0L = (unsigned char)(v); 00222e 5000 movf 0, 0, 0 MOVF r0x00, W 002230 6ed6 movwf 0xd6, 0 MOVWF _TMR0L 002232 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 002234 f003 002236 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 002238 f002 00223a cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00223c f001 00223e cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 002240 f000 002242 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002244 ffd9 002246 0012 return 0 RETURN ; ; Starting pCode block S_timer__TIMER_setup code _TIMER_setup: ; .line 4; timer.c bool TIMER_setup( TIMER_handle t, struct TIMER_config *cfg ) 001a8e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001a90 ffe5 001a92 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001a94 ffd9 001a96 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001a98 ffe5 001a9a c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 001a9c ffe5 001a9e c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001aa0 ffe5 001aa2 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001aa4 ffe5 001aa6 0e02 movlw 0x2 MOVLW 0x02 001aa8 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001aaa f000 001aac 0e03 movlw 0x3 MOVLW 0x03 001aae cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 001ab0 f001 001ab2 0e04 movlw 0x4 MOVLW 0x04 001ab4 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001ab6 f002 001ab8 0e05 movlw 0x5 MOVLW 0x05 001aba cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 001abc f003 ; .line 6; timer.c switch (t) { 001abe 0e03 movlw 0x3 MOVLW 0x03 001ac0 5c00 subwf 0, 0, 0 SUBWF r0x00, W 001ac2 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001ac4 d03c bra 0x1b3e BRA _00111_DS_ 001ac6 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001ac8 ffe5 001aca c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 001acc ffe5 001ace 6a05 clrf 0x5, 0 CLRF r0x05 001ad0 3400 rlcf 0, 0, 0 RLCF r0x00, W 001ad2 3605 rlcf 0x5, 0x1, 0 RLCF r0x05, F 001ad4 34e8 rlcf 0xe8, 0, 0 RLCF WREG, W 001ad6 3605 rlcf 0x5, 0x1, 0 RLCF r0x05, F 001ad8 0bfc andlw 0xfc ANDLW 0xfc 001ada 6e04 movwf 0x4, 0 MOVWF r0x04 001adc 0e00 movlw 0 MOVLW UPPER(_00117_DS_) 001ade 6efb movwf 0xfb, 0 MOVWF PCLATU 001ae0 0e1a movlw 0x1a MOVLW HIGH(_00117_DS_) 001ae2 6efa movwf 0xfa, 0 MOVWF PCLATH 001ae4 0efc movlw 0xfc MOVLW LOW(_00117_DS_) 001ae6 2604 addwf 0x4, 0x1, 0 ADDWF r0x04, F 001ae8 5005 movf 0x5, 0, 0 MOVF r0x05, W 001aea 22fa addwfc 0xfa, 0x1, 0 ADDWFC PCLATH, F 001aec b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001aee 2afb incf 0xfb, 0x1, 0 INCF PCLATU, F 001af0 5004 movf 0x4, 0, 0 MOVF r0x04, W 001af2 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 001af4 f005 001af6 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 001af8 f004 001afa 6ef9 movwf 0xf9, 0 MOVWF PCL _00117_DS_: 001afc ef84 goto 0x1b08 GOTO _00105_DS_ 001afe f00d 001b00 ef9f goto 0x1b3e GOTO _00111_DS_ 001b02 f00d 001b04 ef9f goto 0x1b3e GOTO _00111_DS_ 001b06 f00d _00105_DS_: ; .line 8; timer.c if(cfg->scaler <=7) 001b08 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 001b0a b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001b0c 2a02 incf 0x2, 0x1, 0 INCF r0x02, F 001b0e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001b10 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 001b12 c001 movff 0x1, 0xfe9 MOVFF r0x01, FSR0L 001b14 ffe9 001b16 c002 movff 0x2, 0xff3 MOVFF r0x02, PRODL 001b18 fff3 001b1a 5003 movf 0x3, 0, 0 MOVF r0x03, W 001b1c ece0 call 0x23c0, 0 CALL __gptrget1 001b1e f011 001b20 6e00 movwf 0, 0 MOVWF r0x00 001b22 0e08 movlw 0x8 MOVLW 0x08 001b24 5c00 subwf 0, 0, 0 SUBWF r0x00, W 001b26 e209 bc 0x1b3a BC _00107_DS_ ; .line 10; timer.c T0CON= 0; /* clear all bits*/ 001b28 6ad5 clrf 0xd5, 0 CLRF _T0CON ; .line 13; timer.c T0CON = T0CON | 0x80 | (cfg->scaler); 001b2a 0e80 movlw 0x80 MOVLW 0x80 001b2c 10d5 iorwf 0xd5, 0, 0 IORWF _T0CON, W 001b2e 6e01 movwf 0x1, 0 MOVWF r0x01 001b30 5000 movf 0, 0, 0 MOVF r0x00, W 001b32 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 001b34 6ed5 movwf 0xd5, 0 MOVWF _T0CON ; .line 14; timer.c return 1; 001b36 0e01 movlw 0x1 MOVLW 0x01 001b38 d003 bra 0x1b40 BRA _00112_DS_ _00107_DS_: ; .line 17; timer.c return 0; 001b3a 6ae8 clrf 0xe8, 0 CLRF WREG ; .line 21; timer.c break; 001b3c d001 bra 0x1b40 BRA _00112_DS_ _00111_DS_: ; .line 28; timer.c return 0; 001b3e 6ae8 clrf 0xe8, 0 CLRF WREG _00112_DS_: 001b40 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 001b42 f003 001b44 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 001b46 f002 001b48 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 001b4a f001 001b4c cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001b4e f000 001b50 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001b52 ffd9 001b54 0012 return 0 RETURN ; Statistics: ; code size: 404 (0x0194) bytes ( 0.31%) ; 202 (0x00ca) words ; udata size: 0 (0x0000) bytes ( 0.00%) ; access size: 6 (0x0006) bytes end ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 2.9.7 #5883 (Jul 21 2010) (CYGWIN) ; This file was generated Thu Dec 30 16:14:27 2010 ;-------------------------------------------------------- ; PIC16 port for the Microchip 16-bit core micros ;-------------------------------------------------------- list p=18f2680 radix dec ;-------------------------------------------------------- ; public variables in this module ;-------------------------------------------------------- global _ECANInitialize global _ECANSendMessage global _ECANReceiveMessage global _ECANSetOperationMode global __CANIDToRegs global __RegsToCANID global __ECANRxFilterHitInfo ;-------------------------------------------------------- ; extern variables in this module ;-------------------------------------------------------- extern __gptrget1 extern __gptrput1 extern _RXF6SIDHbits extern _RXF6SIDLbits extern _RXF6EIDHbits extern _RXF6EIDLbits extern _RXF7SIDHbits extern _RXF7SIDLbits extern _RXF7EIDHbits extern _RXF7EIDLbits extern _RXF8SIDHbits extern _RXF8SIDLbits extern _RXF8EIDHbits extern _RXF8EIDLbits extern _RXF9SIDHbits extern _RXF9SIDLbits extern _RXF9EIDHbits extern _RXF9EIDLbits extern _RXF10SIDHbits extern _RXF10SIDLbits extern _RXF10EIDHbits extern _RXF10EIDLbits extern _RXF11SIDHbits extern _RXF11SIDLbits extern _RXF11EIDHbits extern _RXF11EIDLbits extern _RXF12SIDHbits extern _RXF12SIDLbits extern _RXF12EIDHbits extern _RXF12EIDLbits extern _RXF13SIDHbits extern _RXF13SIDLbits extern _RXF13EIDHbits extern _RXF13EIDLbits extern _RXF14SIDHbits extern _RXF14SIDLbits extern _RXF14EIDHbits extern _RXF14EIDLbits extern _RXF15SIDHbits extern _RXF15SIDLbits extern _RXF15EIDHbits extern _RXF15EIDLbits extern _RXFCON0bits extern _RXFCON1bits extern _SDFLCbits extern _RXFBCON0bits extern _RXFBCON1bits extern _RXFBCON2bits extern _RXFBCON3bits extern _RXFBCON4bits extern _RXFBCON5bits extern _RXFBCON6bits extern _RXFBCON7bits extern _MSEL0bits extern _MSEL1bits extern _MSEL2bits extern _MSEL3bits extern _BSEL0bits extern _BIE0bits extern _TXBIEbits extern _B0CONbits extern _B0SIDHbits extern _B0SIDLbits extern _B0EIDHbits extern _B0EIDLbits extern _B0DLCbits extern _B0D0bits extern _B0D1bits extern _B0D2bits extern _B0D3bits extern _B0D4bits extern _B0D5bits extern _B0D6bits extern _B0D7bits extern _CANSTAT_RO9bits extern _CANCON_RO9bits extern _B1CONbits extern _B1SIDHbits extern _B1SIDLbits extern _B1EIDHbits extern _B1EIDLbits extern _B1DLCbits extern _B1D0bits extern _B1D1bits extern _B1D2bits extern _B1D3bits extern _B1D4bits extern _B1D5bits extern _B1D6bits extern _B1D7bits extern _CANSTAT_RO8bits extern _CANCON_RO8bits extern _B2CONbits extern _B2SIDHbits extern _B2SIDLbits extern _B2EIDHbits extern _B2EIDLbits extern _B2DLCbits extern _B2D0bits extern _B2D1bits extern _B2D2bits extern _B2D3bits extern _B2D4bits extern _B2D5bits extern _B2D6bits extern _B2D7bits extern _CANSTAT_RO7bits extern _CANCON_RO7bits extern _B3CONbits extern _B3SIDHbits extern _B3SIDLbits extern _B3EIDHbits extern _B3EIDLbits extern _B3DLCbits extern _B3D0bits extern _B3D1bits extern _B3D2bits extern _B3D3bits extern _B3D4bits extern _B3D5bits extern _B3D6bits extern _B3D7bits extern _CANSTAT_RO6bits extern _CANCON_RO6bits extern _B4CONbits extern _B4SIDHbits extern _B4SIDLbits extern _B4EIDHbits extern _B4EIDLbits extern _B4DLCbits extern _B4D0bits extern _B4D1bits extern _B4D2bits extern _B4D3bits extern _B4D4bits extern _B4D5bits extern _B4D6bits extern _B4D7bits extern _CANSTAT_RO5bits extern _CANCON_RO5bits extern _B5CONbits extern _B5SIDHbits extern _B5SIDLbits extern _B5EIDHbits extern _B5EIDLbits extern _B5DLCbits extern _B5D0bits extern _B5D1bits extern _B5D2bits extern _B5D3bits extern _B5D4bits extern _B5D5bits extern _B5D6bits extern _B5D7bits extern _CANSTAT_RO4bits extern _CANCON_RO4bits extern _RXF0SIDHbits extern _RXF0SIDLbits extern _RXF0EIDHbits extern _RXF0EIDLbits extern _RXF1SIDHbits extern _RXF1SIDLbits extern _RXF1EIDHbits extern _RXF1EIDLbits extern _RXF2SIDHbits extern _RXF2SIDLbits extern _RXF2EIDHbits extern _RXF2EIDLbits extern _RXF3SIDHbits extern _RXF3SIDLbits extern _RXF3EIDHbits extern _RXF3EIDLbits extern _RXF4SIDHbits extern _RXF4SIDLbits extern _RXF4EIDHbits extern _RXF4EIDLbits extern _RXF5SIDHbits extern _RXF5SIDLbits extern _RXF5EIDHbits extern _RXF5EIDLbits extern _RXM0SIDHbits extern _RXM0SIDLbits extern _RXM0EIDHbits extern _RXM0EIDLbits extern _RXM1SIDHbits extern _RXM1SIDLbits extern _RXM1EIDHbits extern _RXM1EIDLbits extern _TXB2CONbits extern _TXB2SIDHbits extern _TXB2SIDLbits extern _TXB2EIDHbits extern _TXB2EIDLbits extern _TXB2DLCbits extern _TXB2D0bits extern _TXB2D1bits extern _TXB2D2bits extern _TXB2D3bits extern _TXB2D4bits extern _TXB2D5bits extern _TXB2D6bits extern _TXB2D7bits extern _CANSTAT_RO3bits extern _CANCON_RO3bits extern _TXB1CONbits extern _TXB1SIDHbits extern _TXB1SIDLbits extern _TXB1EIDHbits extern _TXB1EIDLbits extern _TXB1DLCbits extern _TXB1D0bits extern _TXB1D1bits extern _TXB1D2bits extern _TXB1D3bits extern _TXB1D4bits extern _TXB1D5bits extern _TXB1D6bits extern _TXB1D7bits extern _CANSTAT_RO2bits extern _CANCON_RO2bits extern _TXB0CONbits extern _TXB0SIDHbits extern _TXB0SIDLbits extern _TXB0EIDHbits extern _TXB0EIDLbits extern _TXB0DLCbits extern _TXB0D0bits extern _TXB0D1bits extern _TXB0D2bits extern _TXB0D3bits extern _TXB0D4bits extern _TXB0D5bits extern _TXB0D6bits extern _TXB0D7bits extern _CANSTAT_RO1bits extern _CANCON_RO1bits extern _RXB1CONbits extern _RXB1SIDHbits extern _RXB1SIDLbits extern _RXB1EIDHbits extern _RXB1EIDLbits extern _RXB1DLCbits extern _RXB1D0bits extern _RXB1D1bits extern _RXB1D2bits extern _RXB1D3bits extern _RXB1D4bits extern _RXB1D5bits extern _RXB1D6bits extern _RXB1D7bits extern _CANSTAT_RO0bits extern _CANCON_RO0bits extern _RXB0CONbits extern _RXB0SIDHbits extern _RXB0SIDLbits extern _RXB0EIDHbits extern _RXB0EIDLbits extern _RXB0DLCbits extern _RXB0D0bits extern _RXB0D1bits extern _RXB0D2bits extern _RXB0D3bits extern _RXB0D4bits extern _RXB0D5bits extern _RXB0D6bits extern _RXB0D7bits extern _CANSTATbits extern _CANCONbits extern _BRGCON1bits extern _BRGCON2bits extern _BRGCON3bits extern _CIOCONbits extern _COMSTATbits extern _RXERRCNTbits extern _TXERRCNTbits extern _ECANCONbits extern _PORTAbits extern _PORTBbits extern _PORTCbits extern _LATAbits extern _LATBbits extern _LATCbits extern _DDRAbits extern _TRISAbits extern _DDRBbits extern _TRISBbits extern _DDRCbits extern _TRISCbits extern _OSCTUNEbits extern _PIE1bits extern _PIR1bits extern _IPR1bits extern _PIE2bits extern _PIR2bits extern _IPR2bits extern _PIE3bits extern _PIR3bits extern _IPR3bits extern _EECON1bits extern _RCSTAbits extern _TXSTAbits extern _T3CONbits extern _BAUDCONbits extern _CCP1CONbits extern _ADCON2bits extern _ADCON1bits extern _ADCON0bits extern _SSPCON2bits extern _SSPCON1bits extern _SSPSTATbits extern _T2CONbits extern _T1CONbits extern _RCONbits extern _WDTCONbits extern _HLVDCONbits extern _LVDCONbits extern _OSCCONbits extern _T0CONbits extern _STATUSbits extern _INTCON3bits extern _INTCON2bits extern _INTCONbits extern _STKPTRbits extern _RXF6SIDH extern _RXF6SIDL extern _RXF6EIDH extern _RXF6EIDL extern _RXF7SIDH extern _RXF7SIDL extern _RXF7EIDH extern _RXF7EIDL extern _RXF8SIDH extern _RXF8SIDL extern _RXF8EIDH extern _RXF8EIDL extern _RXF9SIDH extern _RXF9SIDL extern _RXF9EIDH extern _RXF9EIDL extern _RXF10SIDH extern _RXF10SIDL extern _RXF10EIDH extern _RXF10EIDL extern _RXF11SIDH extern _RXF11SIDL extern _RXF11EIDH extern _RXF11EIDL extern _RXF12SIDH extern _RXF12SIDL extern _RXF12EIDH extern _RXF12EIDL extern _RXF13SIDH extern _RXF13SIDL extern _RXF13EIDH extern _RXF13EIDL extern _RXF14SIDH extern _RXF14SIDL extern _RXF14EIDH extern _RXF14EIDL extern _RXF15SIDH extern _RXF15SIDL extern _RXF15EIDH extern _RXF15EIDL extern _RXFCON0 extern _RXFCON1 extern _SDFLC extern _RXFBCON0 extern _RXFBCON1 extern _RXFBCON2 extern _RXFBCON3 extern _RXFBCON4 extern _RXFBCON5 extern _RXFBCON6 extern _RXFBCON7 extern _MSEL0 extern _MSEL1 extern _MSEL2 extern _MSEL3 extern _BSEL0 extern _BIE0 extern _TXBIE extern _B0CON extern _B0SIDH extern _B0SIDL extern _B0EIDH extern _B0EIDL extern _B0DLC extern _B0D0 extern _B0D1 extern _B0D2 extern _B0D3 extern _B0D4 extern _B0D5 extern _B0D6 extern _B0D7 extern _CANSTAT_RO9 extern _CANCON_RO9 extern _B1CON extern _B1SIDH extern _B1SIDL extern _B1EIDH extern _B1EIDL extern _B1DLC extern _B1D0 extern _B1D1 extern _B1D2 extern _B1D3 extern _B1D4 extern _B1D5 extern _B1D6 extern _B1D7 extern _CANSTAT_RO8 extern _CANCON_RO8 extern _B2CON extern _B2SIDH extern _B2SIDL extern _B2EIDH extern _B2EIDL extern _B2DLC extern _B2D0 extern _B2D1 extern _B2D2 extern _B2D3 extern _B2D4 extern _B2D5 extern _B2D6 extern _B2D7 extern _CANSTAT_RO7 extern _CANCON_RO7 extern _B3CON extern _B3SIDH extern _B3SIDL extern _B3EIDH extern _B3EIDL extern _B3DLC extern _B3D0 extern _B3D1 extern _B3D2 extern _B3D3 extern _B3D4 extern _B3D5 extern _B3D6 extern _B3D7 extern _CANSTAT_RO6 extern _CANCON_RO6 extern _B4CON extern _B4SIDH extern _B4SIDL extern _B4EIDH extern _B4EIDL extern _B4DLC extern _B4D0 extern _B4D1 extern _B4D2 extern _B4D3 extern _B4D4 extern _B4D5 extern _B4D6 extern _B4D7 extern _CANSTAT_RO5 extern _CANCON_RO5 extern _B5CON extern _B5SIDH extern _B5SIDL extern _B5EIDH extern _B5EIDL extern _B5DLC extern _B5D0 extern _B5D1 extern _B5D2 extern _B5D3 extern _B5D4 extern _B5D5 extern _B5D6 extern _B5D7 extern _CANSTAT_RO4 extern _CANCON_RO4 extern _RXF0SIDH extern _RXF0SIDL extern _RXF0EIDH extern _RXF0EIDL extern _RXF1SIDH extern _RXF1SIDL extern _RXF1EIDH extern _RXF1EIDL extern _RXF2SIDH extern _RXF2SIDL extern _RXF2EIDH extern _RXF2EIDL extern _RXF3SIDH extern _RXF3SIDL extern _RXF3EIDH extern _RXF3EIDL extern _RXF4SIDH extern _RXF4SIDL extern _RXF4EIDH extern _RXF4EIDL extern _RXF5SIDH extern _RXF5SIDL extern _RXF5EIDH extern _RXF5EIDL extern _RXM0SIDH extern _RXM0SIDL extern _RXM0EIDH extern _RXM0EIDL extern _RXM1SIDH extern _RXM1SIDL extern _RXM1EIDH extern _RXM1EIDL extern _TXB2CON extern _TXB2SIDH extern _TXB2SIDL extern _TXB2EIDH extern _TXB2EIDL extern _TXB2DLC extern _TXB2D0 extern _TXB2D1 extern _TXB2D2 extern _TXB2D3 extern _TXB2D4 extern _TXB2D5 extern _TXB2D6 extern _TXB2D7 extern _CANSTAT_RO3 extern _CANCON_RO3 extern _TXB1CON extern _TXB1SIDH extern _TXB1SIDL extern _TXB1EIDH extern _TXB1EIDL extern _TXB1DLC extern _TXB1D0 extern _TXB1D1 extern _TXB1D2 extern _TXB1D3 extern _TXB1D4 extern _TXB1D5 extern _TXB1D6 extern _TXB1D7 extern _CANSTAT_RO2 extern _CANCON_RO2 extern _TXB0CON extern _TXB0SIDH extern _TXB0SIDL extern _TXB0EIDH extern _TXB0EIDL extern _TXB0DLC extern _TXB0D0 extern _TXB0D1 extern _TXB0D2 extern _TXB0D3 extern _TXB0D4 extern _TXB0D5 extern _TXB0D6 extern _TXB0D7 extern _CANSTAT_RO1 extern _CANCON_RO1 extern _RXB1CON extern _RXB1SIDH extern _RXB1SIDL extern _RXB1EIDH extern _RXB1EIDL extern _RXB1DLC extern _RXB1D0 extern _RXB1D1 extern _RXB1D2 extern _RXB1D3 extern _RXB1D4 extern _RXB1D5 extern _RXB1D6 extern _RXB1D7 extern _CANSTAT_RO0 extern _CANCON_RO0 extern _RXB0CON extern _RXB0SIDH extern _RXB0SIDL extern _RXB0EIDH extern _RXB0EIDL extern _RXB0DLC extern _RXB0D0 extern _RXB0D1 extern _RXB0D2 extern _RXB0D3 extern _RXB0D4 extern _RXB0D5 extern _RXB0D6 extern _RXB0D7 extern _CANSTAT extern _CANCON extern _BRGCON1 extern _BRGCON2 extern _BRGCON3 extern _CIOCON extern _COMSTAT extern _RXERRCNT extern _TXERRCNT extern _ECANCON extern _PORTA extern _PORTB extern _PORTC extern _LATA extern _LATB extern _LATC extern _DDRA extern _TRISA extern _DDRB extern _TRISB extern _DDRC extern _TRISC extern _OSCTUNE extern _PIE1 extern _PIR1 extern _IPR1 extern _PIE2 extern _PIR2 extern _IPR2 extern _PIE3 extern _PIR3 extern _IPR3 extern _EECON1 extern _EECON2 extern _EEDATA extern _EEADR extern _EEADRH extern _RCSTA extern _TXSTA extern _TXREG extern _RCREG extern _SPBRG extern _SPBRGH extern _T3CON extern _TMR3L extern _TMR3H extern _BAUDCON extern _CCP1CON extern _CCPR1 extern _CCPR1L extern _CCPR1H extern _ADCON2 extern _ADCON1 extern _ADCON0 extern _ADRES extern _ADRESL extern _ADRESH extern _SSPCON2 extern _SSPCON1 extern _SSPSTAT extern _SSPADD extern _SSPBUF extern _T2CON extern _PR2 extern _TMR2 extern _T1CON extern _TMR1L extern _TMR1H extern _RCON extern _WDTCON extern _HLVDCON extern _LVDCON extern _OSCCON extern _T0CON extern _TMR0L extern _TMR0H extern _STATUS extern _FSR2L extern _FSR2H extern _PLUSW2 extern _PREINC2 extern _POSTDEC2 extern _POSTINC2 extern _INDF2 extern _BSR extern _FSR1L extern _FSR1H extern _PLUSW1 extern _PREINC1 extern _POSTDEC1 extern _POSTINC1 extern _INDF1 extern _WREG extern _FSR0L extern _FSR0H extern _PLUSW0 extern _PREINC0 extern _POSTDEC0 extern _POSTINC0 extern _INDF0 extern _INTCON3 extern _INTCON2 extern _INTCON extern _PROD extern _PRODL extern _PRODH extern _TABLAT extern _TBLPTR extern _TBLPTRL extern _TBLPTRH extern _TBLPTRU extern _PC extern _PCL extern _PCLATH extern _PCLATU extern _STKPTR extern _TOS extern _TOSL extern _TOSH extern _TOSU ;-------------------------------------------------------- ; Equates to used internal registers ;-------------------------------------------------------- STATUS equ 0xfd8 WREG equ 0xfe8 FSR0L equ 0xfe9 FSR0H equ 0xfea FSR1L equ 0xfe1 FSR2L equ 0xfd9 INDF0 equ 0xfef POSTINC0 equ 0xfee POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 PRODH equ 0xff4 ; Internal registers .registers udata_ovr 0x0000 r0x00 res 1 r0x01 res 1 r0x02 res 1 r0x03 res 1 r0x04 res 1 r0x05 res 1 r0x06 res 1 r0x07 res 1 r0x08 res 1 r0x09 res 1 r0x0a res 1 r0x0b res 1 r0x0c res 1 r0x0d res 1 r0x0e res 1 r0x0f res 1 r0x10 res 1 r0x11 res 1 r0x12 res 1 r0x13 res 1 r0x14 res 1 r0x15 res 1 udata_ecan_0 udata _ECANSendMessage_pb_1_1 res 27 udata_ecan_1 udata __ECANRxFilterHitInfo res 1 udata_ecan_2 udata _ECANReceiveMessage_temp_1_1 res 1 udata_ecan_3 udata __CANIDToRegs_val_1_1 res 4 ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; I code from now on! ; ; Starting pCode block S_ecan___RegsToCANID code __RegsToCANID: ; .line 1149; ecan.c void _RegsToCANID( BYTE* ptr, 000a96 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000a98 ffe5 000a9a cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000a9c ffd9 000a9e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000aa0 ffe5 000aa2 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000aa4 ffe5 000aa6 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 000aa8 ffe5 000aaa c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 000aac ffe5 000aae c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 000ab0 ffe5 000ab2 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 000ab4 ffe5 000ab6 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 000ab8 ffe5 000aba c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000abc ffe5 000abe c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 000ac0 ffe5 000ac2 c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 000ac4 ffe5 000ac6 c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 000ac8 ffe5 000aca c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 000acc ffe5 000ace c00c movff 0xc, 0xfe5 MOVFF r0x0c, POSTDEC1 000ad0 ffe5 000ad2 c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 000ad4 ffe5 000ad6 0e02 movlw 0x2 MOVLW 0x02 000ad8 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000ada f000 000adc 0e03 movlw 0x3 MOVLW 0x03 000ade cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000ae0 f001 000ae2 0e04 movlw 0x4 MOVLW 0x04 000ae4 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 000ae6 f002 000ae8 0e05 movlw 0x5 MOVLW 0x05 000aea cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 000aec f003 000aee 0e06 movlw 0x6 MOVLW 0x06 000af0 cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 000af2 f004 000af4 0e07 movlw 0x7 MOVLW 0x07 000af6 cfdb movff 0xfdb, 0x5 MOVFF PLUSW2, r0x05 000af8 f005 000afa 0e08 movlw 0x8 MOVLW 0x08 000afc cfdb movff 0xfdb, 0x6 MOVFF PLUSW2, r0x06 000afe f006 ; .line 1157; ecan.c if ( type == ECAN_MSG_STD ) 000b00 5006 movf 0x6, 0, 0 MOVF r0x06, W 000b02 a4d8 btfss 0xd8, 0x2, 0 BTFSS STATUS, 2 000b04 d06c bra 0xbde BRA _00227_DS_ ; .line 1160; ecan.c Value->BYTES.BYTE_1 = (*ptr << 3); // Copy SIDH<4:0> to SID<7:3> 000b06 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000b08 ffe9 000b0a c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000b0c fff3 000b0e 5002 movf 0x2, 0, 0 MOVF r0x02, W 000b10 ece0 call 0x23c0, 0 CALL __gptrget1 000b12 f011 000b14 6e06 movwf 0x6, 0 MOVWF r0x06 000b16 3806 swapf 0x6, 0, 0 SWAPF r0x06, W 000b18 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 000b1a 0bf8 andlw 0xf8 ANDLW 0xf8 000b1c 6e07 movwf 0x7, 0 MOVWF r0x07 000b1e c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000b20 ffe5 000b22 c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 000b24 ffe9 000b26 c004 movff 0x4, 0xff3 MOVFF r0x04, PRODL 000b28 fff3 000b2a 5005 movf 0x5, 0, 0 MOVF r0x05, W 000b2c ec24 call 0x2448, 0 CALL __gptrput1 000b2e f012 ; .line 1161; ecan.c Value->BYTES.BYTE_2 = *ptr >> 5; // Copy SIDH<7:5> to SID<10:8> 000b30 5003 movf 0x3, 0, 0 MOVF r0x03, W 000b32 0f01 addlw 0x1 ADDLW 0x01 000b34 6e08 movwf 0x8, 0 MOVWF r0x08 000b36 0e00 movlw 0 MOVLW 0x00 000b38 2004 addwfc 0x4, 0, 0 ADDWFC r0x04, W 000b3a 6e09 movwf 0x9, 0 MOVWF r0x09 000b3c 0e00 movlw 0 MOVLW 0x00 000b3e 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000b40 6e0a movwf 0xa, 0 MOVWF r0x0a 000b42 3806 swapf 0x6, 0, 0 SWAPF r0x06, W 000b44 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 000b46 0b07 andlw 0x7 ANDLW 0x07 000b48 6e06 movwf 0x6, 0 MOVWF r0x06 000b4a c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 000b4c ffe5 000b4e c008 movff 0x8, 0xfe9 MOVFF r0x08, FSR0L 000b50 ffe9 000b52 c009 movff 0x9, 0xff3 MOVFF r0x09, PRODL 000b54 fff3 000b56 500a movf 0xa, 0, 0 MOVF r0x0a, W 000b58 ec24 call 0x2448, 0 CALL __gptrput1 000b5a f012 ; .line 1162; ecan.c ptr++; // Point to SIDL 000b5c 2a00 incf 0, 0x1, 0 INCF r0x00, F 000b5e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000b60 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000b62 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000b64 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1163; ecan.c Value->BYTES.BYTE_1 |= (*ptr >> 5); // Copy SIDL<7:6> to SID<2:0> 000b66 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000b68 ffe9 000b6a c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000b6c fff3 000b6e 5002 movf 0x2, 0, 0 MOVF r0x02, W 000b70 ece0 call 0x23c0, 0 CALL __gptrget1 000b72 f011 000b74 6e06 movwf 0x6, 0 MOVWF r0x06 000b76 3806 swapf 0x6, 0, 0 SWAPF r0x06, W 000b78 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 000b7a 0b07 andlw 0x7 ANDLW 0x07 000b7c 6e06 movwf 0x6, 0 MOVWF r0x06 000b7e 5006 movf 0x6, 0, 0 MOVF r0x06, W 000b80 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 000b82 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000b84 ffe5 000b86 c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 000b88 ffe9 000b8a c004 movff 0x4, 0xff3 MOVFF r0x04, PRODL 000b8c fff3 000b8e 5005 movf 0x5, 0, 0 MOVF r0x05, W 000b90 ec24 call 0x2448, 0 CALL __gptrput1 000b92 f012 ; .line 1164; ecan.c Value->BYTES.BYTE_3 = 0x00; 000b94 5003 movf 0x3, 0, 0 MOVF r0x03, W 000b96 0f02 addlw 0x2 ADDLW 0x02 000b98 6e06 movwf 0x6, 0 MOVWF r0x06 000b9a 0e00 movlw 0 MOVLW 0x00 000b9c 2004 addwfc 0x4, 0, 0 ADDWFC r0x04, W 000b9e 6e07 movwf 0x7, 0 MOVWF r0x07 000ba0 0e00 movlw 0 MOVLW 0x00 000ba2 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000ba4 6e08 movwf 0x8, 0 MOVWF r0x08 000ba6 0e00 movlw 0 MOVLW 0x00 000ba8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000baa c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000bac ffe9 000bae c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000bb0 fff3 000bb2 5008 movf 0x8, 0, 0 MOVF r0x08, W 000bb4 ec24 call 0x2448, 0 CALL __gptrput1 000bb6 f012 ; .line 1165; ecan.c Value->BYTES.BYTE_4 = 0x00; 000bb8 5003 movf 0x3, 0, 0 MOVF r0x03, W 000bba 0f03 addlw 0x3 ADDLW 0x03 000bbc 6e06 movwf 0x6, 0 MOVWF r0x06 000bbe 0e00 movlw 0 MOVLW 0x00 000bc0 2004 addwfc 0x4, 0, 0 ADDWFC r0x04, W 000bc2 6e07 movwf 0x7, 0 MOVWF r0x07 000bc4 0e00 movlw 0 MOVLW 0x00 000bc6 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000bc8 6e08 movwf 0x8, 0 MOVWF r0x08 000bca 0e00 movlw 0 MOVLW 0x00 000bcc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000bce c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000bd0 ffe9 000bd2 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000bd4 fff3 000bd6 5008 movf 0x8, 0, 0 MOVF r0x08, W 000bd8 ec24 call 0x2448, 0 CALL __gptrput1 000bda f012 000bdc d0a5 bra 0xd28 BRA _00229_DS_ _00227_DS_: ; .line 1170; ecan.c Value->BYTES.BYTE_3 = (*ptr << 5); // Copy SIDH<2:0> to EID<23:21> 000bde 5003 movf 0x3, 0, 0 MOVF r0x03, W 000be0 0f02 addlw 0x2 ADDLW 0x02 000be2 6e06 movwf 0x6, 0 MOVWF r0x06 000be4 0e00 movlw 0 MOVLW 0x00 000be6 2004 addwfc 0x4, 0, 0 ADDWFC r0x04, W 000be8 6e07 movwf 0x7, 0 MOVWF r0x07 000bea 0e00 movlw 0 MOVLW 0x00 000bec 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000bee 6e08 movwf 0x8, 0 MOVWF r0x08 000bf0 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000bf2 ffe9 000bf4 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000bf6 fff3 000bf8 5002 movf 0x2, 0, 0 MOVF r0x02, W 000bfa ece0 call 0x23c0, 0 CALL __gptrget1 000bfc f011 000bfe 6e09 movwf 0x9, 0 MOVWF r0x09 000c00 3809 swapf 0x9, 0, 0 SWAPF r0x09, W 000c02 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 000c04 0be0 andlw 0xe0 ANDLW 0xe0 000c06 6e0a movwf 0xa, 0 MOVWF r0x0a 000c08 c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 000c0a ffe5 000c0c c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000c0e ffe9 000c10 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000c12 fff3 000c14 5008 movf 0x8, 0, 0 MOVF r0x08, W 000c16 ec24 call 0x2448, 0 CALL __gptrput1 000c18 f012 ; .line 1171; ecan.c Value->BYTES.BYTE_4 = (*ptr >> 3); // Copy SIDH<7:3> to EID<29:25> 000c1a 5003 movf 0x3, 0, 0 MOVF r0x03, W 000c1c 0f03 addlw 0x3 ADDLW 0x03 000c1e 6e0b movwf 0xb, 0 MOVWF r0x0b 000c20 0e00 movlw 0 MOVLW 0x00 000c22 2004 addwfc 0x4, 0, 0 ADDWFC r0x04, W 000c24 6e0c movwf 0xc, 0 MOVWF r0x0c 000c26 0e00 movlw 0 MOVLW 0x00 000c28 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000c2a 6e0d movwf 0xd, 0 MOVWF r0x0d 000c2c 3809 swapf 0x9, 0, 0 SWAPF r0x09, W 000c2e 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 000c30 0b1f andlw 0x1f ANDLW 0x1f 000c32 6e09 movwf 0x9, 0 MOVWF r0x09 000c34 c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 000c36 ffe5 000c38 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 000c3a ffe9 000c3c c00c movff 0xc, 0xff3 MOVFF r0x0c, PRODL 000c3e fff3 000c40 500d movf 0xd, 0, 0 MOVF r0x0d, W 000c42 ec24 call 0x2448, 0 CALL __gptrput1 000c44 f012 ; .line 1172; ecan.c ptr++; // Point to SIDL 000c46 2a00 incf 0, 0x1, 0 INCF r0x00, F 000c48 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000c4a 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000c4c b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000c4e 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; ;;!!! pic16_aopOp:1071 called for a spillLocation -- assigning WREG instead --- CHECK ; .line 1173; ecan.c Value->BYTES.BYTE_3 |= (*ptr & 0x03); // Copy SIDH<1:0> to EID<17:16> 000c50 c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000c52 ffe9 000c54 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000c56 fff3 000c58 5008 movf 0x8, 0, 0 MOVF r0x08, W 000c5a ece0 call 0x23c0, 0 CALL __gptrget1 000c5c f011 000c5e 6ee8 movwf 0xe8, 0 MOVWF WREG 000c60 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000c62 ffe9 000c64 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000c66 fff3 000c68 5002 movf 0x2, 0, 0 MOVF r0x02, W 000c6a ece0 call 0x23c0, 0 CALL __gptrget1 000c6c f011 000c6e 6e09 movwf 0x9, 0 MOVWF r0x09 000c70 0e03 movlw 0x3 MOVLW 0x03 000c72 1409 andwf 0x9, 0, 0 ANDWF r0x09, W 000c74 6e0b movwf 0xb, 0 MOVWF r0x0b 000c76 500b movf 0xb, 0, 0 MOVF r0x0b, W 000c78 120a iorwf 0xa, 0x1, 0 IORWF r0x0a, F 000c7a c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 000c7c ffe5 000c7e c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000c80 ffe9 000c82 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000c84 fff3 000c86 5008 movf 0x8, 0, 0 MOVF r0x08, W 000c88 ec24 call 0x2448, 0 CALL __gptrput1 000c8a f012 ; ;;!!! pic16_aopOp:1071 called for a spillLocation -- assigning WREG instead --- CHECK ; .line 1175; ecan.c Value->BYTES.BYTE_3 |= ((*ptr & 0xe0) >> 3); // Copy SIDL<7:6> to EID<20:18> 000c8c c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000c8e ffe9 000c90 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000c92 fff3 000c94 5008 movf 0x8, 0, 0 MOVF r0x08, W 000c96 ece0 call 0x23c0, 0 CALL __gptrget1 000c98 f011 000c9a 6ee8 movwf 0xe8, 0 MOVWF WREG 000c9c 0ee0 movlw 0xe0 MOVLW 0xe0 000c9e 1609 andwf 0x9, 0x1, 0 ANDWF r0x09, F 000ca0 3809 swapf 0x9, 0, 0 SWAPF r0x09, W 000ca2 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 000ca4 0b1f andlw 0x1f ANDLW 0x1f 000ca6 6e09 movwf 0x9, 0 MOVWF r0x09 000ca8 5009 movf 0x9, 0, 0 MOVF r0x09, W 000caa 120a iorwf 0xa, 0x1, 0 IORWF r0x0a, F 000cac c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 000cae ffe5 000cb0 c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000cb2 ffe9 000cb4 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000cb6 fff3 000cb8 5008 movf 0x8, 0, 0 MOVF r0x08, W 000cba ec24 call 0x2448, 0 CALL __gptrput1 000cbc f012 ; .line 1176; ecan.c ptr++; // Point to EIDH 000cbe 2a00 incf 0, 0x1, 0 INCF r0x00, F 000cc0 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000cc2 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000cc4 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000cc6 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1177; ecan.c Value->BYTES.BYTE_2 = *ptr; // Copy EIDH<15:8> to EID<15:8> 000cc8 5003 movf 0x3, 0, 0 MOVF r0x03, W 000cca 0f01 addlw 0x1 ADDLW 0x01 000ccc 6e06 movwf 0x6, 0 MOVWF r0x06 000cce 0e00 movlw 0 MOVLW 0x00 000cd0 2004 addwfc 0x4, 0, 0 ADDWFC r0x04, W 000cd2 6e07 movwf 0x7, 0 MOVWF r0x07 000cd4 0e00 movlw 0 MOVLW 0x00 000cd6 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000cd8 6e08 movwf 0x8, 0 MOVWF r0x08 000cda c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000cdc ffe9 000cde c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000ce0 fff3 000ce2 5002 movf 0x2, 0, 0 MOVF r0x02, W 000ce4 ece0 call 0x23c0, 0 CALL __gptrget1 000ce6 f011 000ce8 6e09 movwf 0x9, 0 MOVWF r0x09 000cea c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 000cec ffe5 000cee c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 000cf0 ffe9 000cf2 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000cf4 fff3 000cf6 5008 movf 0x8, 0, 0 MOVF r0x08, W 000cf8 ec24 call 0x2448, 0 CALL __gptrput1 000cfa f012 ; .line 1178; ecan.c ptr++; // Point to EIDL 000cfc 2a00 incf 0, 0x1, 0 INCF r0x00, F 000cfe b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000d00 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000d02 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000d04 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1179; ecan.c Value->BYTES.BYTE_1 = *ptr; // Copy EIDH<7:0> to EID<7:0> 000d06 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000d08 ffe9 000d0a c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000d0c fff3 000d0e 5002 movf 0x2, 0, 0 MOVF r0x02, W 000d10 ece0 call 0x23c0, 0 CALL __gptrget1 000d12 f011 000d14 6e00 movwf 0, 0 MOVWF r0x00 000d16 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000d18 ffe5 000d1a c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 000d1c ffe9 000d1e c004 movff 0x4, 0xff3 MOVFF r0x04, PRODL 000d20 fff3 000d22 5005 movf 0x5, 0, 0 MOVF r0x05, W 000d24 ec24 call 0x2448, 0 CALL __gptrput1 000d26 f012 _00229_DS_: 000d28 cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 000d2a f00d 000d2c cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 000d2e f00c 000d30 cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 000d32 f00b 000d34 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 000d36 f00a 000d38 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 000d3a f009 000d3c cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 000d3e f008 000d40 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 000d42 f007 000d44 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 000d46 f006 000d48 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 000d4a f005 000d4c cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 000d4e f004 000d50 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 000d52 f003 000d54 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 000d56 f002 000d58 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000d5a f001 000d5c cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000d5e f000 000d60 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000d62 ffd9 000d64 0012 return 0 RETURN ; ; Starting pCode block S_ecan___CANIDToRegs code __CANIDToRegs: ; .line 1092; ecan.c void _CANIDToRegs(BYTE* ptr, 000d66 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000d68 ffe5 000d6a cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000d6c ffd9 000d6e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000d70 ffe5 000d72 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000d74 ffe5 000d76 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 000d78 ffe5 000d7a c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 000d7c ffe5 000d7e c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 000d80 ffe5 000d82 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 000d84 ffe5 000d86 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 000d88 ffe5 000d8a c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000d8c ffe5 000d8e c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 000d90 ffe5 000d92 c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 000d94 ffe5 000d96 c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 000d98 ffe5 000d9a 0e02 movlw 0x2 MOVLW 0x02 000d9c cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000d9e f000 000da0 0e03 movlw 0x3 MOVLW 0x03 000da2 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000da4 f001 000da6 0e04 movlw 0x4 MOVLW 0x04 000da8 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 000daa f002 000dac 0e05 movlw 0x5 MOVLW 0x05 000dae cfdb movff 0xfdb, 0xb3 MOVFF PLUSW2, __CANIDToRegs_val_1_1 000db0 f0b3 000db2 0e06 movlw 0x6 MOVLW 0x06 000db4 cfdb movff 0xfdb, 0xb4 MOVFF PLUSW2, (__CANIDToRegs_val_1_1 + 1) 000db6 f0b4 000db8 0e07 movlw 0x7 MOVLW 0x07 000dba cfdb movff 0xfdb, 0xb5 MOVFF PLUSW2, (__CANIDToRegs_val_1_1 + 2) 000dbc f0b5 000dbe 0e08 movlw 0x8 MOVLW 0x08 000dc0 cfdb movff 0xfdb, 0xb6 MOVFF PLUSW2, (__CANIDToRegs_val_1_1 + 3) 000dc2 f0b6 000dc4 0e09 movlw 0x9 MOVLW 0x09 000dc6 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 000dc8 f003 ; .line 1098; ecan.c Value = (CAN_MESSAGE_ID*)&val; 000dca 0e00 movlw 0 MOVLW HIGH(__CANIDToRegs_val_1_1) 000dcc 6e05 movwf 0x5, 0 MOVWF r0x05 000dce 0eb3 movlw 0xb3 MOVLW LOW(__CANIDToRegs_val_1_1) 000dd0 6e04 movwf 0x4, 0 MOVWF r0x04 000dd2 0e80 movlw 0x80 MOVLW 0x80 000dd4 6e06 movwf 0x6, 0 MOVWF r0x06 ; .line 1100; ecan.c if ( type == ECAN_MSG_STD ) 000dd6 5003 movf 0x3, 0, 0 MOVF r0x03, W 000dd8 a4d8 btfss 0xd8, 0x2, 0 BTFSS STATUS, 2 000dda d050 bra 0xe7c BRA _00219_DS_ ; .line 1103; ecan.c *ptr = Value->BYTES.BYTE_1 >> 3; // Copy SID<7:3> to SIDH<4:0> 000ddc c004 movff 0x4, 0xfe9 MOVFF r0x04, FSR0L 000dde ffe9 000de0 c005 movff 0x5, 0xff3 MOVFF r0x05, PRODL 000de2 fff3 000de4 5006 movf 0x6, 0, 0 MOVF r0x06, W 000de6 ece0 call 0x23c0, 0 CALL __gptrget1 000de8 f011 000dea 6e03 movwf 0x3, 0 MOVWF r0x03 000dec 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 000dee 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 000df0 0b1f andlw 0x1f ANDLW 0x1f 000df2 6e07 movwf 0x7, 0 MOVWF r0x07 000df4 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000df6 ffe5 000df8 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000dfa ffe9 000dfc c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000dfe fff3 000e00 5002 movf 0x2, 0, 0 MOVF r0x02, W 000e02 ec24 call 0x2448, 0 CALL __gptrput1 000e04 f012 ; .line 1104; ecan.c *ptr |= (Value->BYTES.BYTE_2 << 5); // Copy SID<10:8> to SIDH<7:5> 000e06 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000e08 ffe9 000e0a c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000e0c fff3 000e0e 5002 movf 0x2, 0, 0 MOVF r0x02, W 000e10 ece0 call 0x23c0, 0 CALL __gptrget1 000e12 f011 000e14 6e07 movwf 0x7, 0 MOVWF r0x07 000e16 5004 movf 0x4, 0, 0 MOVF r0x04, W 000e18 0f01 addlw 0x1 ADDLW 0x01 000e1a 6e08 movwf 0x8, 0 MOVWF r0x08 000e1c 0e00 movlw 0 MOVLW 0x00 000e1e 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000e20 6e09 movwf 0x9, 0 MOVWF r0x09 000e22 0e00 movlw 0 MOVLW 0x00 000e24 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 000e26 6e0a movwf 0xa, 0 MOVWF r0x0a 000e28 c008 movff 0x8, 0xfe9 MOVFF r0x08, FSR0L 000e2a ffe9 000e2c c009 movff 0x9, 0xff3 MOVFF r0x09, PRODL 000e2e fff3 000e30 500a movf 0xa, 0, 0 MOVF r0x0a, W 000e32 ece0 call 0x23c0, 0 CALL __gptrget1 000e34 f011 000e36 6e08 movwf 0x8, 0 MOVWF r0x08 000e38 3808 swapf 0x8, 0, 0 SWAPF r0x08, W 000e3a 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 000e3c 0be0 andlw 0xe0 ANDLW 0xe0 000e3e 6e09 movwf 0x9, 0 MOVWF r0x09 000e40 5009 movf 0x9, 0, 0 MOVF r0x09, W 000e42 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 000e44 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000e46 ffe5 000e48 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000e4a ffe9 000e4c c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000e4e fff3 000e50 5002 movf 0x2, 0, 0 MOVF r0x02, W 000e52 ec24 call 0x2448, 0 CALL __gptrput1 000e54 f012 ; .line 1105; ecan.c ptr++; // Point to SIDL 000e56 2a00 incf 0, 0x1, 0 INCF r0x00, F 000e58 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000e5a 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000e5c b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000e5e 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1106; ecan.c *ptr = Value->BYTES.BYTE_1 << 5; // Copy SID<2:0> to SIDL<7:5> 000e60 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 000e62 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 000e64 0be0 andlw 0xe0 ANDLW 0xe0 000e66 6e07 movwf 0x7, 0 MOVWF r0x07 000e68 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000e6a ffe5 000e6c c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000e6e ffe9 000e70 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000e72 fff3 000e74 5002 movf 0x2, 0, 0 MOVF r0x02, W 000e76 ec24 call 0x2448, 0 CALL __gptrput1 000e78 f012 000e7a d0a6 bra 0xfc8 BRA _00221_DS_ _00219_DS_: ; .line 1111; ecan.c *ptr = Value->BYTES.BYTE_3 >> 5; // Copy EID<23:21> to SIDH<2:0> 000e7c 5004 movf 0x4, 0, 0 MOVF r0x04, W 000e7e 0f02 addlw 0x2 ADDLW 0x02 000e80 6e03 movwf 0x3, 0 MOVWF r0x03 000e82 0e00 movlw 0 MOVLW 0x00 000e84 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000e86 6e07 movwf 0x7, 0 MOVWF r0x07 000e88 0e00 movlw 0 MOVLW 0x00 000e8a 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 000e8c 6e08 movwf 0x8, 0 MOVWF r0x08 000e8e c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 000e90 ffe9 000e92 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000e94 fff3 000e96 5008 movf 0x8, 0, 0 MOVF r0x08, W 000e98 ece0 call 0x23c0, 0 CALL __gptrget1 000e9a f011 000e9c 6e03 movwf 0x3, 0 MOVWF r0x03 000e9e 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 000ea0 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 000ea2 0b07 andlw 0x7 ANDLW 0x07 000ea4 6e07 movwf 0x7, 0 MOVWF r0x07 000ea6 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000ea8 ffe5 000eaa c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000eac ffe9 000eae c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000eb0 fff3 000eb2 5002 movf 0x2, 0, 0 MOVF r0x02, W 000eb4 ec24 call 0x2448, 0 CALL __gptrput1 000eb6 f012 ; .line 1112; ecan.c *ptr |= Value->BYTES.BYTE_4 << 3; // Copy EID<28:24> to SIDH<7:3> 000eb8 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000eba ffe9 000ebc c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000ebe fff3 000ec0 5002 movf 0x2, 0, 0 MOVF r0x02, W 000ec2 ece0 call 0x23c0, 0 CALL __gptrget1 000ec4 f011 000ec6 6e07 movwf 0x7, 0 MOVWF r0x07 000ec8 5004 movf 0x4, 0, 0 MOVF r0x04, W 000eca 0f03 addlw 0x3 ADDLW 0x03 000ecc 6e08 movwf 0x8, 0 MOVWF r0x08 000ece 0e00 movlw 0 MOVLW 0x00 000ed0 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000ed2 6e09 movwf 0x9, 0 MOVWF r0x09 000ed4 0e00 movlw 0 MOVLW 0x00 000ed6 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 000ed8 6e0a movwf 0xa, 0 MOVWF r0x0a 000eda c008 movff 0x8, 0xfe9 MOVFF r0x08, FSR0L 000edc ffe9 000ede c009 movff 0x9, 0xff3 MOVFF r0x09, PRODL 000ee0 fff3 000ee2 500a movf 0xa, 0, 0 MOVF r0x0a, W 000ee4 ece0 call 0x23c0, 0 CALL __gptrget1 000ee6 f011 000ee8 6e08 movwf 0x8, 0 MOVWF r0x08 000eea 3808 swapf 0x8, 0, 0 SWAPF r0x08, W 000eec 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 000eee 0bf8 andlw 0xf8 ANDLW 0xf8 000ef0 6e09 movwf 0x9, 0 MOVWF r0x09 000ef2 5009 movf 0x9, 0, 0 MOVF r0x09, W 000ef4 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 000ef6 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000ef8 ffe5 000efa c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000efc ffe9 000efe c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000f00 fff3 000f02 5002 movf 0x2, 0, 0 MOVF r0x02, W 000f04 ec24 call 0x2448, 0 CALL __gptrput1 000f06 f012 ; .line 1113; ecan.c ptr++; // Point to SIDL 000f08 2a00 incf 0, 0x1, 0 INCF r0x00, F 000f0a b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000f0c 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000f0e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000f10 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1114; ecan.c *ptr = (Value->BYTES.BYTE_3 << 3) & 0xE0; // Copy EID<20:18> to SIDL<7:5> 000f12 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 000f14 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 000f16 0bf8 andlw 0xf8 ANDLW 0xf8 000f18 6e07 movwf 0x7, 0 MOVWF r0x07 000f1a 0ee0 movlw 0xe0 MOVLW 0xe0 000f1c 1607 andwf 0x7, 0x1, 0 ANDWF r0x07, F 000f1e c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000f20 ffe5 000f22 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000f24 ffe9 000f26 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000f28 fff3 000f2a 5002 movf 0x2, 0, 0 MOVF r0x02, W 000f2c ec24 call 0x2448, 0 CALL __gptrput1 000f2e f012 ; .line 1116; ecan.c *ptr |= 0b00001000; // Set EXIDEN bit to SIDL<3> 000f30 8607 bsf 0x7, 0x3, 0 BSF r0x07, 3 000f32 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000f34 ffe5 000f36 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000f38 ffe9 000f3a c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000f3c fff3 000f3e 5002 movf 0x2, 0, 0 MOVF r0x02, W 000f40 ec24 call 0x2448, 0 CALL __gptrput1 000f42 f012 ; .line 1117; ecan.c *ptr |= Value->BYTES.BYTE_3 & 0x03; // Copy EID<17:16> to SIDL<1:0> 000f44 0e03 movlw 0x3 MOVLW 0x03 000f46 1603 andwf 0x3, 0x1, 0 ANDWF r0x03, F 000f48 5003 movf 0x3, 0, 0 MOVF r0x03, W 000f4a 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 000f4c c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000f4e ffe5 000f50 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000f52 ffe9 000f54 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000f56 fff3 000f58 5002 movf 0x2, 0, 0 MOVF r0x02, W 000f5a ec24 call 0x2448, 0 CALL __gptrput1 000f5c f012 ; .line 1118; ecan.c ptr++; // Point to EIDH 000f5e 2a00 incf 0, 0x1, 0 INCF r0x00, F 000f60 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000f62 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000f64 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000f66 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1119; ecan.c *ptr = Value->BYTES.BYTE_2; // Copy EID<15:8> to EIDH<7:0> 000f68 5004 movf 0x4, 0, 0 MOVF r0x04, W 000f6a 0f01 addlw 0x1 ADDLW 0x01 000f6c 6e03 movwf 0x3, 0 MOVWF r0x03 000f6e 0e00 movlw 0 MOVLW 0x00 000f70 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 000f72 6e07 movwf 0x7, 0 MOVWF r0x07 000f74 0e00 movlw 0 MOVLW 0x00 000f76 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 000f78 6e08 movwf 0x8, 0 MOVWF r0x08 000f7a c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 000f7c ffe9 000f7e c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 000f80 fff3 000f82 5008 movf 0x8, 0, 0 MOVF r0x08, W 000f84 ece0 call 0x23c0, 0 CALL __gptrget1 000f86 f011 000f88 6e03 movwf 0x3, 0 MOVWF r0x03 000f8a c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 000f8c ffe5 000f8e c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000f90 ffe9 000f92 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000f94 fff3 000f96 5002 movf 0x2, 0, 0 MOVF r0x02, W 000f98 ec24 call 0x2448, 0 CALL __gptrput1 000f9a f012 ; .line 1120; ecan.c ptr++; // Point to EIDL 000f9c 2a00 incf 0, 0x1, 0 INCF r0x00, F 000f9e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000fa0 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000fa2 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000fa4 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 1121; ecan.c *ptr = Value->BYTES.BYTE_1; // Copy EID<7:0> to EIDL<7:0> 000fa6 c004 movff 0x4, 0xfe9 MOVFF r0x04, FSR0L 000fa8 ffe9 000faa c005 movff 0x5, 0xff3 MOVFF r0x05, PRODL 000fac fff3 000fae 5006 movf 0x6, 0, 0 MOVF r0x06, W 000fb0 ece0 call 0x23c0, 0 CALL __gptrget1 000fb2 f011 000fb4 6e04 movwf 0x4, 0 MOVWF r0x04 000fb6 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 000fb8 ffe5 000fba c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000fbc ffe9 000fbe c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000fc0 fff3 000fc2 5002 movf 0x2, 0, 0 MOVF r0x02, W 000fc4 ec24 call 0x2448, 0 CALL __gptrput1 000fc6 f012 _00221_DS_: 000fc8 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 000fca f00a 000fcc cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 000fce f009 000fd0 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 000fd2 f008 000fd4 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 000fd6 f007 000fd8 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 000fda f006 000fdc cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 000fde f005 000fe0 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 000fe2 f004 000fe4 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 000fe6 f003 000fe8 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 000fea f002 000fec cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000fee f001 000ff0 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000ff2 f000 000ff4 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000ff6 ffd9 000ff8 0012 return 0 RETURN ; ; Starting pCode block S_ecan__ECANSetOperationMode code _ECANSetOperationMode: ; .line 1007; ecan.c void ECANSetOperationMode(ECAN_OP_MODE mode) 002312 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002314 ffe5 002316 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002318 ffd9 00231a c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00231c ffe5 00231e c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 002320 ffe5 002322 0e02 movlw 0x2 MOVLW 0x02 002324 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 002326 f000 ; .line 1009; ecan.c CANCON &= 0x1F; // clear previous mode 002328 0e1f movlw 0x1f MOVLW 0x1f 00232a 166f andwf 0x6f, 0x1, 0 ANDWF _CANCON, F ; .line 1010; ecan.c CANCON |= mode; // set new mode 00232c 5000 movf 0, 0, 0 MOVF r0x00, W 00232e 126f iorwf 0x6f, 0x1, 0 IORWF _CANCON, F _00203_DS_: ; .line 1012; ecan.c while( ECANGetOperationMode() != mode ); // Wait till desired mode is set. 002330 0ee0 movlw 0xe0 MOVLW 0xe0 002332 146f andwf 0x6f, 0, 0 ANDWF _CANCON, W 002334 6e01 movwf 0x1, 0 MOVWF r0x01 002336 5001 movf 0x1, 0, 0 MOVF r0x01, W 002338 1800 xorwf 0, 0, 0 XORWF r0x00, W 00233a e1fa bnz 0x2330 BNZ _00203_DS_ 00233c cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00233e f001 002340 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 002342 f000 002344 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002346 ffd9 002348 0012 return 0 RETURN ; ; Starting pCode block S_ecan__ECANReceiveMessage code _ECANReceiveMessage: ; .line 795; ecan.c BOOL ECANReceiveMessage(unsigned long *id, 00000c cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00000e ffe5 000010 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000012 ffd9 000014 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000016 ffe5 000018 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 00001a ffe5 00001c c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 00001e ffe5 000020 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 000022 ffe5 000024 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 000026 ffe5 000028 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 00002a ffe5 00002c c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 00002e ffe5 000030 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 000032 ffe5 000034 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 000036 ffe5 000038 c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 00003a ffe5 00003c c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 00003e ffe5 000040 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 000042 ffe5 000044 c00c movff 0xc, 0xfe5 MOVFF r0x0c, POSTDEC1 000046 ffe5 000048 c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 00004a ffe5 00004c c00e movff 0xe, 0xfe5 MOVFF r0x0e, POSTDEC1 00004e ffe5 000050 c00f movff 0xf, 0xfe5 MOVFF r0x0f, POSTDEC1 000052 ffe5 000054 c010 movff 0x10, 0xfe5 MOVFF r0x10, POSTDEC1 000056 ffe5 000058 c011 movff 0x11, 0xfe5 MOVFF r0x11, POSTDEC1 00005a ffe5 00005c c012 movff 0x12, 0xfe5 MOVFF r0x12, POSTDEC1 00005e ffe5 000060 c013 movff 0x13, 0xfe5 MOVFF r0x13, POSTDEC1 000062 ffe5 000064 c014 movff 0x14, 0xfe5 MOVFF r0x14, POSTDEC1 000066 ffe5 000068 0e02 movlw 0x2 MOVLW 0x02 00006a cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 00006c f000 00006e 0e03 movlw 0x3 MOVLW 0x03 000070 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000072 f001 000074 0e04 movlw 0x4 MOVLW 0x04 000076 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 000078 f002 00007a 0e05 movlw 0x5 MOVLW 0x05 00007c cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 00007e f003 000080 0e06 movlw 0x6 MOVLW 0x06 000082 cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 000084 f004 000086 0e07 movlw 0x7 MOVLW 0x07 000088 cfdb movff 0xfdb, 0x5 MOVFF PLUSW2, r0x05 00008a f005 00008c 0e08 movlw 0x8 MOVLW 0x08 00008e cfdb movff 0xfdb, 0x6 MOVFF PLUSW2, r0x06 000090 f006 000092 0e09 movlw 0x9 MOVLW 0x09 000094 cfdb movff 0xfdb, 0x7 MOVFF PLUSW2, r0x07 000096 f007 000098 0e0a movlw 0xa MOVLW 0x0a 00009a cfdb movff 0xfdb, 0x8 MOVFF PLUSW2, r0x08 00009c f008 00009e 0e0b movlw 0xb MOVLW 0x0b 0000a0 cfdb movff 0xfdb, 0x9 MOVFF PLUSW2, r0x09 0000a2 f009 0000a4 0e0c movlw 0xc MOVLW 0x0c 0000a6 cfdb movff 0xfdb, 0xa MOVFF PLUSW2, r0x0a 0000a8 f00a 0000aa 0e0d movlw 0xd MOVLW 0x0d 0000ac cfdb movff 0xfdb, 0xb MOVFF PLUSW2, r0x0b 0000ae f00b 0000b0 0100 movlb 0 BANKSEL __ECANRxFilterHitInfo ; .line 808; ecan.c _ECANRxFilterHitInfo.Val = 0; 0000b2 6bc0 clrf 0xc0, 0x1 CLRF __ECANRxFilterHitInfo, B ; .line 820; ecan.c if ( RXB0CON_RXFUL ) 0000b4 ae60 btfss 0x60, 0x7, 0 BTFSS _RXB0CONbits, 7 0000b6 d029 bra 0x10a BRA _00163_DS_ ; .line 823; ecan.c PIR3_RXB0IF = 0; 0000b8 90a4 bcf 0xa4, 0, 0 BCF _PIR3bits, 0 ; .line 826; ecan.c if ( COMSTAT_RXB0OVFL ) 0000ba ae74 btfss 0x74, 0x7, 0 BTFSS _COMSTATbits, 7 0000bc d013 bra 0xe4 BRA _00154_DS_ ; .line 828; ecan.c *msgFlags |= ECAN_RX_OVERFLOW; 0000be c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 0000c0 ffe9 0000c2 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 0000c4 fff3 0000c6 500b movf 0xb, 0, 0 MOVF r0x0b, W 0000c8 ece0 call 0x23c0, 0 CALL __gptrget1 0000ca f011 0000cc 6e0c movwf 0xc, 0 MOVWF r0x0c 0000ce 860c bsf 0xc, 0x3, 0 BSF r0x0c, 3 0000d0 c00c movff 0xc, 0xfe5 MOVFF r0x0c, POSTDEC1 0000d2 ffe5 0000d4 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 0000d6 ffe9 0000d8 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 0000da fff3 0000dc 500b movf 0xb, 0, 0 MOVF r0x0b, W 0000de ec24 call 0x2448, 0 CALL __gptrput1 0000e0 f012 ; .line 829; ecan.c COMSTAT_RXB0OVFL = 0; 0000e2 9e74 bcf 0x74, 0x7, 0 BCF _COMSTATbits, 7 _00154_DS_: ; .line 832; ecan.c _ECANRxFilterHitInfo.bits.b0 = RXB0CON_FILHIT0; 0000e4 6a0c clrf 0xc, 0 CLRF r0x0c 0000e6 b060 btfsc 0x60, 0, 0 BTFSC _RXB0CONbits, 0 0000e8 2a0c incf 0xc, 0x1, 0 INCF r0x0c, F 0000ea 500c movf 0xc, 0, 0 MOVF r0x0c, W 0000ec 0b01 andlw 0x1 ANDLW 0x01 0000ee 6ef4 movwf 0xf4, 0 MOVWF PRODH 0000f0 0100 movlb 0 BANKSEL __ECANRxFilterHitInfo 0000f2 51c0 movf 0xc0, 0, 0x1 MOVF __ECANRxFilterHitInfo, W, B 0000f4 0bfe andlw 0xfe ANDLW 0xfe 0000f6 10f4 iorwf 0xf4, 0, 0 IORWF PRODH, W 0000f8 0100 movlb 0 BANKSEL __ECANRxFilterHitInfo 0000fa 6fc0 movwf 0xc0, 0x1 MOVWF __ECANRxFilterHitInfo, B ; .line 834; ecan.c ptr = (BYTE*)&RXB0CON; 0000fc 0e0f movlw 0xf MOVLW HIGH(_RXB0CON) 0000fe 6e0d movwf 0xd, 0 MOVWF r0x0d 000100 0e60 movlw 0x60 MOVLW LOW(_RXB0CON) 000102 6e0c movwf 0xc, 0 MOVWF r0x0c 000104 0e80 movlw 0x80 MOVLW 0x80 000106 6e0e movwf 0xe, 0 MOVWF r0x0e 000108 d040 bra 0x18a BRA _00165_DS_ _00163_DS_: 00010a 010f movlb 0xf BANKSEL _RXB1CONbits ; .line 837; ecan.c else if ( RXB1CON_RXFUL ) 00010c af50 btfss 0x50, 0x7, 0x1 BTFSS _RXB1CONbits, 7, B 00010e d03b bra 0x186 BRA _00160_DS_ ; .line 840; ecan.c PIR3_RXB1IF = 0; 000110 92a4 bcf 0xa4, 0x1, 0 BCF _PIR3bits, 1 ; .line 843; ecan.c if ( COMSTAT_RXB1OVFL ) 000112 ac74 btfss 0x74, 0x6, 0 BTFSS _COMSTATbits, 6 000114 d013 bra 0x13c BRA _00156_DS_ ; .line 845; ecan.c *msgFlags |= ECAN_RX_OVERFLOW; 000116 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 000118 ffe9 00011a c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 00011c fff3 00011e 500b movf 0xb, 0, 0 MOVF r0x0b, W 000120 ece0 call 0x23c0, 0 CALL __gptrget1 000122 f011 000124 6e0f movwf 0xf, 0 MOVWF r0x0f 000126 860f bsf 0xf, 0x3, 0 BSF r0x0f, 3 000128 c00f movff 0xf, 0xfe5 MOVFF r0x0f, POSTDEC1 00012a ffe5 00012c c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 00012e ffe9 000130 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 000132 fff3 000134 500b movf 0xb, 0, 0 MOVF r0x0b, W 000136 ec24 call 0x2448, 0 CALL __gptrput1 000138 f012 ; .line 846; ecan.c COMSTAT_RXB1OVFL = 0; 00013a 9c74 bcf 0x74, 0x6, 0 BCF _COMSTATbits, 6 _00156_DS_: ; .line 849; ecan.c _ECANRxFilterHitInfo.Val = RXB1CON & 0x07; 00013c 0e07 movlw 0x7 MOVLW 0x07 00013e 010f movlb 0xf BANKSEL _RXB1CON 000140 1550 andwf 0x50, 0, 0x1 ANDWF _RXB1CON, W, B 000142 6e0f movwf 0xf, 0 MOVWF r0x0f 000144 500f movf 0xf, 0, 0 MOVF r0x0f, W 000146 0100 movlb 0 BANKSEL __ECANRxFilterHitInfo 000148 6fc0 movwf 0xc0, 0x1 MOVWF __ECANRxFilterHitInfo, B ; ;;!!! pic16_aopOp:1071 called for a spillLocation -- assigning WREG instead --- CHECK ; .line 851; ecan.c if ( _ECANRxFilterHitInfo.Val < 0x02 ) 00014a c0c0 movff 0xc0, 0xfe8 MOVFF __ECANRxFilterHitInfo, WREG 00014c ffe8 00014e 0e02 movlw 0x2 MOVLW 0x02 000150 5c0f subwf 0xf, 0, 0 SUBWF r0x0f, W 000152 e212 bc 0x178 BC _00158_DS_ ; .line 852; ecan.c *msgFlags |= ECAN_RX_DBL_BUFFERED; 000154 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 000156 ffe9 000158 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 00015a fff3 00015c 500b movf 0xb, 0, 0 MOVF r0x0b, W 00015e ece0 call 0x23c0, 0 CALL __gptrget1 000160 f011 000162 6e0f movwf 0xf, 0 MOVWF r0x0f 000164 8e0f bsf 0xf, 0x7, 0 BSF r0x0f, 7 000166 c00f movff 0xf, 0xfe5 MOVFF r0x0f, POSTDEC1 000168 ffe5 00016a c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 00016c ffe9 00016e c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 000170 fff3 000172 500b movf 0xb, 0, 0 MOVF r0x0b, W 000174 ec24 call 0x2448, 0 CALL __gptrput1 000176 f012 _00158_DS_: ; .line 855; ecan.c ptr = (BYTE*)&RXB1CON; 000178 0e0f movlw 0xf MOVLW HIGH(_RXB1CON) 00017a 6e0d movwf 0xd, 0 MOVWF r0x0d 00017c 0e50 movlw 0x50 MOVLW LOW(_RXB1CON) 00017e 6e0c movwf 0xc, 0 MOVWF r0x0c 000180 0e80 movlw 0x80 MOVLW 0x80 000182 6e0e movwf 0xe, 0 MOVWF r0x0e 000184 d002 bra 0x18a BRA _00165_DS_ _00160_DS_: ; .line 858; ecan.c return FALSE; 000186 6ae8 clrf 0xe8, 0 CLRF WREG 000188 d0ff bra 0x388 BRA _00177_DS_ _00165_DS_: ; .line 938; ecan.c savedPtr = ptr; 00018a c00c movff 0xc, 0xf MOVFF r0x0c, r0x0f 00018c f00f 00018e c00d movff 0xd, 0x10 MOVFF r0x0d, r0x10 000190 f010 000192 c00e movff 0xe, 0x11 MOVFF r0x0e, r0x11 000194 f011 ; .line 939; ecan.c *msgFlags = 0; 000196 0e00 movlw 0 MOVLW 0x00 000198 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00019a c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 00019c ffe9 00019e c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 0001a0 fff3 0001a2 500b movf 0xb, 0, 0 MOVF r0x0b, W 0001a4 ec24 call 0x2448, 0 CALL __gptrput1 0001a6 f012 ; .line 942; ecan.c temp.Val = *(ptr+5); 0001a8 500c movf 0xc, 0, 0 MOVF r0x0c, W 0001aa 0f05 addlw 0x5 ADDLW 0x05 0001ac 6e12 movwf 0x12, 0 MOVWF r0x12 0001ae 0e00 movlw 0 MOVLW 0x00 0001b0 200d addwfc 0xd, 0, 0 ADDWFC r0x0d, W 0001b2 6e13 movwf 0x13, 0 MOVWF r0x13 0001b4 0e00 movlw 0 MOVLW 0x00 0001b6 200e addwfc 0xe, 0, 0 ADDWFC r0x0e, W 0001b8 6e14 movwf 0x14, 0 MOVWF r0x14 0001ba c012 movff 0x12, 0xfe9 MOVFF r0x12, FSR0L 0001bc ffe9 0001be c013 movff 0x13, 0xff3 MOVFF r0x13, PRODL 0001c0 fff3 0001c2 5014 movf 0x14, 0, 0 MOVF r0x14, W 0001c4 ece0 call 0x23c0, 0 CALL __gptrget1 0001c6 f011 0001c8 6e12 movwf 0x12, 0 MOVWF r0x12 0001ca 5012 movf 0x12, 0, 0 MOVF r0x12, W 0001cc 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 0001ce 6fc1 movwf 0xc1, 0x1 MOVWF _ECANReceiveMessage_temp_1_1, B ; ;;!!! pic16_aopOp:1071 called for a spillLocation -- assigning WREG instead --- CHECK ; .line 943; ecan.c *data1Len = temp.Val & 0b00001111; 0001d0 c0c1 movff 0xc1, 0xfe8 MOVFF _ECANReceiveMessage_temp_1_1, WREG 0001d2 ffe8 0001d4 0e0f movlw 0xf MOVLW 0x0f 0001d6 1612 andwf 0x12, 0x1, 0 ANDWF r0x12, F 0001d8 c012 movff 0x12, 0xfe5 MOVFF r0x12, POSTDEC1 0001da ffe5 0001dc c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 0001de ffe9 0001e0 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 0001e2 fff3 0001e4 5008 movf 0x8, 0, 0 MOVF r0x08, W 0001e6 ec24 call 0x2448, 0 CALL __gptrput1 0001e8 f012 0001ea 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 ; .line 946; ecan.c if ( temp.bits.b6 ) 0001ec adc1 btfss 0xc1, 0x6, 0x1 BTFSS _ECANReceiveMessage_temp_1_1, 6, B 0001ee d012 bra 0x214 BRA _00167_DS_ ; .line 947; ecan.c *msgFlags |= ECAN_RX_RTR_FRAME; 0001f0 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 0001f2 ffe9 0001f4 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 0001f6 fff3 0001f8 500b movf 0xb, 0, 0 MOVF r0x0b, W 0001fa ece0 call 0x23c0, 0 CALL __gptrget1 0001fc f011 0001fe 6e12 movwf 0x12, 0 MOVWF r0x12 000200 8c12 bsf 0x12, 0x6, 0 BSF r0x12, 6 000202 c012 movff 0x12, 0xfe5 MOVFF r0x12, POSTDEC1 000204 ffe5 000206 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 000208 ffe9 00020a c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 00020c fff3 00020e 500b movf 0xb, 0, 0 MOVF r0x0b, W 000210 ec24 call 0x2448, 0 CALL __gptrput1 000212 f012 _00167_DS_: ; .line 950; ecan.c temp.Val = *(ptr+2); 000214 500c movf 0xc, 0, 0 MOVF r0x0c, W 000216 0f02 addlw 0x2 ADDLW 0x02 000218 6e12 movwf 0x12, 0 MOVWF r0x12 00021a 0e00 movlw 0 MOVLW 0x00 00021c 200d addwfc 0xd, 0, 0 ADDWFC r0x0d, W 00021e 6e13 movwf 0x13, 0 MOVWF r0x13 000220 0e00 movlw 0 MOVLW 0x00 000222 200e addwfc 0xe, 0, 0 ADDWFC r0x0e, W 000224 6e14 movwf 0x14, 0 MOVWF r0x14 000226 c012 movff 0x12, 0xfe9 MOVFF r0x12, FSR0L 000228 ffe9 00022a c013 movff 0x13, 0xff3 MOVFF r0x13, PRODL 00022c fff3 00022e 5014 movf 0x14, 0, 0 MOVF r0x14, W 000230 ece0 call 0x23c0, 0 CALL __gptrget1 000232 f011 000234 6e12 movwf 0x12, 0 MOVWF r0x12 000236 5012 movf 0x12, 0, 0 MOVF r0x12, W 000238 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 00023a 6fc1 movwf 0xc1, 0x1 MOVWF _ECANReceiveMessage_temp_1_1, B 00023c 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 ; .line 951; ecan.c if ( temp.bits.b3 ) 00023e a7c1 btfss 0xc1, 0x3, 0x1 BTFSS _ECANReceiveMessage_temp_1_1, 3, B 000240 d016 bra 0x26e BRA _00169_DS_ ; .line 953; ecan.c *msgFlags |= ECAN_RX_XTD_FRAME; 000242 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 000244 ffe9 000246 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 000248 fff3 00024a 500b movf 0xb, 0, 0 MOVF r0x0b, W 00024c ece0 call 0x23c0, 0 CALL __gptrget1 00024e f011 000250 6e12 movwf 0x12, 0 MOVWF r0x12 000252 8a12 bsf 0x12, 0x5, 0 BSF r0x12, 5 000254 c012 movff 0x12, 0xfe5 MOVFF r0x12, POSTDEC1 000256 ffe5 000258 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 00025a ffe9 00025c c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 00025e fff3 000260 500b movf 0xb, 0, 0 MOVF r0x0b, W 000262 ec24 call 0x2448, 0 CALL __gptrput1 000264 f012 ; .line 954; ecan.c temp.Val = ECAN_MSG_XTD; 000266 0e01 movlw 0x1 MOVLW 0x01 000268 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 00026a 6fc1 movwf 0xc1, 0x1 MOVWF _ECANReceiveMessage_temp_1_1, B 00026c d002 bra 0x272 BRA _00170_DS_ _00169_DS_: 00026e 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 ; .line 957; ecan.c temp.Val = ECAN_MSG_STD; 000270 6bc1 clrf 0xc1, 0x1 CLRF _ECANReceiveMessage_temp_1_1, B _00170_DS_: ; .line 959; ecan.c _RegsToCANID(ptr+1, id, temp.Val); 000272 500c movf 0xc, 0, 0 MOVF r0x0c, W 000274 0f01 addlw 0x1 ADDLW 0x01 000276 6e12 movwf 0x12, 0 MOVWF r0x12 000278 0e00 movlw 0 MOVLW 0x00 00027a 200d addwfc 0xd, 0, 0 ADDWFC r0x0d, W 00027c 6e13 movwf 0x13, 0 MOVWF r0x13 00027e 0e00 movlw 0 MOVLW 0x00 000280 200e addwfc 0xe, 0, 0 ADDWFC r0x0e, W 000282 6e14 movwf 0x14, 0 MOVWF r0x14 000284 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 000286 51c1 movf 0xc1, 0, 0x1 MOVF _ECANReceiveMessage_temp_1_1, W, B 000288 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00028a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00028c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00028e 5001 movf 0x1, 0, 0 MOVF r0x01, W 000290 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000292 5000 movf 0, 0, 0 MOVF r0x00, W 000294 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000296 5014 movf 0x14, 0, 0 MOVF r0x14, W 000298 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00029a 5013 movf 0x13, 0, 0 MOVF r0x13, W 00029c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00029e 5012 movf 0x12, 0, 0 MOVF r0x12, W 0002a0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0002a2 ec4b call 0xa96, 0 CALL __RegsToCANID 0002a4 f005 0002a6 0e07 movlw 0x7 MOVLW 0x07 0002a8 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 962; ecan.c ptr += 6; 0002aa 0e06 movlw 0x6 MOVLW 0x06 0002ac 260c addwf 0xc, 0x1, 0 ADDWF r0x0c, F 0002ae 0e00 movlw 0 MOVLW 0x00 0002b0 220d addwfc 0xd, 0x1, 0 ADDWFC r0x0d, F 0002b2 0e00 movlw 0 MOVLW 0x00 0002b4 220e addwfc 0xe, 0x1, 0 ADDWFC r0x0e, F ; .line 963; ecan.c temp.Val = *data1Len; 0002b6 c006 movff 0x6, 0xfe9 MOVFF r0x06, FSR0L 0002b8 ffe9 0002ba c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 0002bc fff3 0002be 5008 movf 0x8, 0, 0 MOVF r0x08, W 0002c0 ece0 call 0x23c0, 0 CALL __gptrget1 0002c2 f011 0002c4 6e06 movwf 0x6, 0 MOVWF r0x06 0002c6 5006 movf 0x6, 0, 0 MOVF r0x06, W 0002c8 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 0002ca 6fc1 movwf 0xc1, 0x1 MOVWF _ECANReceiveMessage_temp_1_1, B ; .line 964; ecan.c for ( i = 0; i < temp.Val; i++ ) 0002cc c00c movff 0xc, 0 MOVFF r0x0c, r0x00 0002ce f000 0002d0 c00d movff 0xd, 0x1 MOVFF r0x0d, r0x01 0002d2 f001 0002d4 c00e movff 0xe, 0x2 MOVFF r0x0e, r0x02 0002d6 f002 0002d8 6a06 clrf 0x6, 0 CLRF r0x06 _00173_DS_: 0002da c006 movff 0x6, 0x7 MOVFF r0x06, r0x07 0002dc f007 0002de 6a08 clrf 0x8, 0 CLRF r0x08 0002e0 be06 btfsc 0x6, 0x7, 0 BTFSC r0x06, 7 0002e2 6808 setf 0x8, 0 SETF r0x08 0002e4 c0c1 movff 0xc1, 0xc MOVFF _ECANReceiveMessage_temp_1_1, r0x0c 0002e6 f00c 0002e8 6a0d clrf 0xd, 0 CLRF r0x0d 0002ea 5008 movf 0x8, 0, 0 MOVF r0x08, W 0002ec 0f80 addlw 0x80 ADDLW 0x80 0002ee 6ef3 movwf 0xf3, 0 MOVWF PRODL 0002f0 500d movf 0xd, 0, 0 MOVF r0x0d, W 0002f2 0f80 addlw 0x80 ADDLW 0x80 0002f4 5cf3 subwf 0xf3, 0, 0 SUBWF PRODL, W 0002f6 e102 bnz 0x2fc BNZ _00198_DS_ 0002f8 500c movf 0xc, 0, 0 MOVF r0x0c, W 0002fa 5c07 subwf 0x7, 0, 0 SUBWF r0x07, W _00198_DS_: 0002fc e21d bc 0x338 BC _00176_DS_ ; .line 965; ecan.c *data1++ = *ptr++; 0002fe c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 000300 ffe9 000302 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 000304 fff3 000306 5002 movf 0x2, 0, 0 MOVF r0x02, W 000308 ece0 call 0x23c0, 0 CALL __gptrget1 00030a f011 00030c 6e07 movwf 0x7, 0 MOVWF r0x07 00030e 2a00 incf 0, 0x1, 0 INCF r0x00, F 000310 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000312 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000314 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000316 2a02 incf 0x2, 0x1, 0 INCF r0x02, F 000318 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 00031a ffe5 00031c c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 00031e ffe9 000320 c004 movff 0x4, 0xff3 MOVFF r0x04, PRODL 000322 fff3 000324 5005 movf 0x5, 0, 0 MOVF r0x05, W 000326 ec24 call 0x2448, 0 CALL __gptrput1 000328 f012 00032a 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 00032c b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 00032e 2a04 incf 0x4, 0x1, 0 INCF r0x04, F 000330 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000332 2a05 incf 0x5, 0x1, 0 INCF r0x05, F ; .line 964; ecan.c for ( i = 0; i < temp.Val; i++ ) 000334 2a06 incf 0x6, 0x1, 0 INCF r0x06, F 000336 d7d1 bra 0x2da BRA _00173_DS_ _00176_DS_: ; .line 968; ecan.c if ( PIR3_IRXIF ) 000338 aea4 btfss 0xa4, 0x7, 0 BTFSS _PIR3bits, 7 00033a d013 bra 0x362 BRA _00172_DS_ ; .line 970; ecan.c *msgFlags |= ECAN_RX_INVALID_MSG; 00033c c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 00033e ffe9 000340 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 000342 fff3 000344 500b movf 0xb, 0, 0 MOVF r0x0b, W 000346 ece0 call 0x23c0, 0 CALL __gptrget1 000348 f011 00034a 6e00 movwf 0, 0 MOVWF r0x00 00034c 8800 bsf 0, 0x4, 0 BSF r0x00, 4 00034e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000350 ffe5 000352 c009 movff 0x9, 0xfe9 MOVFF r0x09, FSR0L 000354 ffe9 000356 c00a movff 0xa, 0xff3 MOVFF r0x0a, PRODL 000358 fff3 00035a 500b movf 0xb, 0, 0 MOVF r0x0b, W 00035c ec24 call 0x2448, 0 CALL __gptrput1 00035e f012 ; .line 971; ecan.c PIR3_IRXIF = 0; 000360 9ea4 bcf 0xa4, 0x7, 0 BCF _PIR3bits, 7 _00172_DS_: ; .line 975; ecan.c *savedPtr &= 0x7f; 000362 c00f movff 0xf, 0xfe9 MOVFF r0x0f, FSR0L 000364 ffe9 000366 c010 movff 0x10, 0xff3 MOVFF r0x10, PRODL 000368 fff3 00036a 5011 movf 0x11, 0, 0 MOVF r0x11, W 00036c ece0 call 0x23c0, 0 CALL __gptrget1 00036e f011 000370 6e00 movwf 0, 0 MOVWF r0x00 000372 9e00 bcf 0, 0x7, 0 BCF r0x00, 7 000374 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000376 ffe5 000378 c00f movff 0xf, 0xfe9 MOVFF r0x0f, FSR0L 00037a ffe9 00037c c010 movff 0x10, 0xff3 MOVFF r0x10, PRODL 00037e fff3 000380 5011 movf 0x11, 0, 0 MOVF r0x11, W 000382 ec24 call 0x2448, 0 CALL __gptrput1 000384 f012 ; .line 986; ecan.c return TRUE; 000386 0e01 movlw 0x1 MOVLW 0x01 _00177_DS_: 000388 cfe4 movff 0xfe4, 0x14 MOVFF PREINC1, r0x14 00038a f014 00038c cfe4 movff 0xfe4, 0x13 MOVFF PREINC1, r0x13 00038e f013 000390 cfe4 movff 0xfe4, 0x12 MOVFF PREINC1, r0x12 000392 f012 000394 cfe4 movff 0xfe4, 0x11 MOVFF PREINC1, r0x11 000396 f011 000398 cfe4 movff 0xfe4, 0x10 MOVFF PREINC1, r0x10 00039a f010 00039c cfe4 movff 0xfe4, 0xf MOVFF PREINC1, r0x0f 00039e f00f 0003a0 cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 0003a2 f00e 0003a4 cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 0003a6 f00d 0003a8 cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 0003aa f00c 0003ac cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 0003ae f00b 0003b0 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 0003b2 f00a 0003b4 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 0003b6 f009 0003b8 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 0003ba f008 0003bc cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 0003be f007 0003c0 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 0003c2 f006 0003c4 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 0003c6 f005 0003c8 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 0003ca f004 0003cc cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 0003ce f003 0003d0 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0003d2 f002 0003d4 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0003d6 f001 0003d8 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0003da f000 0003dc cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0003de ffd9 0003e0 0012 return 0 RETURN ; ; Starting pCode block S_ecan__ECANSendMessage code _ECANSendMessage: ; .line 609; ecan.c BOOL ECANSendMessage( unsigned long id, 0007b0 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0007b2 ffe5 0007b4 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0007b6 ffd9 0007b8 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 0007ba ffe5 0007bc c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 0007be ffe5 0007c0 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 0007c2 ffe5 0007c4 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 0007c6 ffe5 0007c8 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 0007ca ffe5 0007cc c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 0007ce ffe5 0007d0 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 0007d2 ffe5 0007d4 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0007d6 ffe5 0007d8 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 0007da ffe5 0007dc c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 0007de ffe5 0007e0 c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 0007e2 ffe5 0007e4 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 0007e6 ffe5 0007e8 c00c movff 0xc, 0xfe5 MOVFF r0x0c, POSTDEC1 0007ea ffe5 0007ec c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 0007ee ffe5 0007f0 c00e movff 0xe, 0xfe5 MOVFF r0x0e, POSTDEC1 0007f2 ffe5 0007f4 c00f movff 0xf, 0xfe5 MOVFF r0x0f, POSTDEC1 0007f6 ffe5 0007f8 c010 movff 0x10, 0xfe5 MOVFF r0x10, POSTDEC1 0007fa ffe5 0007fc c011 movff 0x11, 0xfe5 MOVFF r0x11, POSTDEC1 0007fe ffe5 000800 c012 movff 0x12, 0xfe5 MOVFF r0x12, POSTDEC1 000802 ffe5 000804 c013 movff 0x13, 0xfe5 MOVFF r0x13, POSTDEC1 000806 ffe5 000808 c014 movff 0x14, 0xfe5 MOVFF r0x14, POSTDEC1 00080a ffe5 00080c c015 movff 0x15, 0xfe5 MOVFF r0x15, POSTDEC1 00080e ffe5 000810 0e02 movlw 0x2 MOVLW 0x02 000812 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000814 f000 000816 0e03 movlw 0x3 MOVLW 0x03 000818 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00081a f001 00081c 0e04 movlw 0x4 MOVLW 0x04 00081e cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 000820 f002 000822 0e05 movlw 0x5 MOVLW 0x05 000824 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 000826 f003 000828 0e06 movlw 0x6 MOVLW 0x06 00082a cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 00082c f004 00082e 0e07 movlw 0x7 MOVLW 0x07 000830 cfdb movff 0xfdb, 0x5 MOVFF PLUSW2, r0x05 000832 f005 000834 0e08 movlw 0x8 MOVLW 0x08 000836 cfdb movff 0xfdb, 0x6 MOVFF PLUSW2, r0x06 000838 f006 00083a 0e09 movlw 0x9 MOVLW 0x09 00083c cfdb movff 0xfdb, 0x7 MOVFF PLUSW2, r0x07 00083e f007 000840 0e0a movlw 0xa MOVLW 0x0a 000842 cfdb movff 0xfdb, 0x8 MOVFF PLUSW2, r0x08 000844 f008 ; .line 637; ecan.c pb[0]=(BYTE*)&TXB0CON; 000846 0e0f movlw 0xf MOVLW HIGH(_TXB0CON) 000848 6e0a movwf 0xa, 0 MOVWF r0x0a 00084a 0e40 movlw 0x40 MOVLW LOW(_TXB0CON) 00084c 6e09 movwf 0x9, 0 MOVWF r0x09 00084e 0e80 movlw 0x80 MOVLW 0x80 000850 6e0b movwf 0xb, 0 MOVWF r0x0b 000852 5009 movf 0x9, 0, 0 MOVF r0x09, W 000854 0100 movlb 0 BANKSEL _ECANSendMessage_pb_1_1 000856 6f60 movwf 0x60, 0x1 MOVWF _ECANSendMessage_pb_1_1, B 000858 500a movf 0xa, 0, 0 MOVF r0x0a, W 00085a 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 1) 00085c 6f61 movwf 0x61, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 1), B 00085e 500b movf 0xb, 0, 0 MOVF r0x0b, W 000860 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 2) 000862 6f62 movwf 0x62, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 2), B ; .line 638; ecan.c pb[1]=(BYTE*)&TXB1CON; 000864 0e0f movlw 0xf MOVLW HIGH(_TXB1CON) 000866 6e0a movwf 0xa, 0 MOVWF r0x0a 000868 0e30 movlw 0x30 MOVLW LOW(_TXB1CON) 00086a 6e09 movwf 0x9, 0 MOVWF r0x09 00086c 0e80 movlw 0x80 MOVLW 0x80 00086e 6e0b movwf 0xb, 0 MOVWF r0x0b 000870 5009 movf 0x9, 0, 0 MOVF r0x09, W 000872 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 3) 000874 6f63 movwf 0x63, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 3), B 000876 500a movf 0xa, 0, 0 MOVF r0x0a, W 000878 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 4) 00087a 6f64 movwf 0x64, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 4), B 00087c 500b movf 0xb, 0, 0 MOVF r0x0b, W 00087e 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 5) 000880 6f65 movwf 0x65, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 5), B ; .line 639; ecan.c pb[2]=(BYTE*)&TXB2CON; 000882 0e0f movlw 0xf MOVLW HIGH(_TXB2CON) 000884 6e0a movwf 0xa, 0 MOVWF r0x0a 000886 0e20 movlw 0x20 MOVLW LOW(_TXB2CON) 000888 6e09 movwf 0x9, 0 MOVWF r0x09 00088a 0e80 movlw 0x80 MOVLW 0x80 00088c 6e0b movwf 0xb, 0 MOVWF r0x0b 00088e 5009 movf 0x9, 0, 0 MOVF r0x09, W 000890 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 6) 000892 6f66 movwf 0x66, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 6), B 000894 500a movf 0xa, 0, 0 MOVF r0x0a, W 000896 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 7) 000898 6f67 movwf 0x67, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 7), B 00089a 500b movf 0xb, 0, 0 MOVF r0x0b, W 00089c 0100 movlb 0 BANKSEL (_ECANSendMessage_pb_1_1 + 8) 00089e 6f68 movwf 0x68, 0x1 MOVWF (_ECANSendMessage_pb_1_1 + 8), B ; .line 669; ecan.c for ( i = 0; i < buffers; i++ ) 0008a0 6a09 clrf 0x9, 0 CLRF r0x09 0008a2 6a0a clrf 0xa, 0 CLRF r0x0a _00124_DS_: 0008a4 0e02 movlw 0x2 MOVLW 0x02 0008a6 5c09 subwf 0x9, 0, 0 SUBWF r0x09, W 0008a8 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0008aa d0c5 bra 0xa36 BRA _00127_DS_ ; .line 689; ecan.c ptr = pb[i]; 0008ac 0e60 movlw 0x60 MOVLW LOW(_ECANSendMessage_pb_1_1) 0008ae 240a addwf 0xa, 0, 0 ADDWF r0x0a, W 0008b0 6e0b movwf 0xb, 0 MOVWF r0x0b 0008b2 6a0c clrf 0xc, 0 CLRF r0x0c 0008b4 0e00 movlw 0 MOVLW HIGH(_ECANSendMessage_pb_1_1) 0008b6 220c addwfc 0xc, 0x1, 0 ADDWFC r0x0c, F 0008b8 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 0008ba ffe9 0008bc c00c movff 0xc, 0xfea MOVFF r0x0c, FSR0H 0008be ffea 0008c0 cfee movff 0xfee, 0xb MOVFF POSTINC0, r0x0b 0008c2 f00b 0008c4 cfee movff 0xfee, 0xc MOVFF POSTINC0, r0x0c 0008c6 f00c 0008c8 cfef movff 0xfef, 0xd MOVFF INDF0, r0x0d 0008ca f00d ; .line 690; ecan.c tempPtr = ptr; 0008cc c00b movff 0xb, 0xe MOVFF r0x0b, r0x0e 0008ce f00e 0008d0 c00c movff 0xc, 0xf MOVFF r0x0c, r0x0f 0008d2 f00f 0008d4 c00d movff 0xd, 0x10 MOVFF r0x0d, r0x10 0008d6 f010 ; .line 716; ecan.c if ( !(*ptr & 0x08) ) 0008d8 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 0008da ffe9 0008dc c00c movff 0xc, 0xff3 MOVFF r0x0c, PRODL 0008de fff3 0008e0 500d movf 0xd, 0, 0 MOVF r0x0d, W 0008e2 ece0 call 0x23c0, 0 CALL __gptrget1 0008e4 f011 0008e6 6e11 movwf 0x11, 0 MOVWF r0x11 0008e8 b611 btfsc 0x11, 0x3, 0 BTFSC r0x11, 3 0008ea d0a1 bra 0xa2e BRA _00126_DS_ ; .line 719; ecan.c *ptr &= ~ECAN_TX_PRIORITY_BITS; 0008ec 0efc movlw 0xfc MOVLW 0xfc 0008ee 1611 andwf 0x11, 0x1, 0 ANDWF r0x11, F 0008f0 c011 movff 0x11, 0xfe5 MOVFF r0x11, POSTDEC1 0008f2 ffe5 0008f4 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 0008f6 ffe9 0008f8 c00c movff 0xc, 0xff3 MOVFF r0x0c, PRODL 0008fa fff3 0008fc 500d movf 0xd, 0, 0 MOVF r0x0d, W 0008fe ec24 call 0x2448, 0 CALL __gptrput1 000900 f012 ; .line 720; ecan.c *ptr |= msgFlags & ECAN_TX_PRIORITY_BITS; 000902 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 000904 ffe9 000906 c00c movff 0xc, 0xff3 MOVFF r0x0c, PRODL 000908 fff3 00090a 500d movf 0xd, 0, 0 MOVF r0x0d, W 00090c ece0 call 0x23c0, 0 CALL __gptrget1 00090e f011 000910 6e11 movwf 0x11, 0 MOVWF r0x11 000912 0e03 movlw 0x3 MOVLW 0x03 000914 1408 andwf 0x8, 0, 0 ANDWF r0x08, W 000916 6e12 movwf 0x12, 0 MOVWF r0x12 000918 5012 movf 0x12, 0, 0 MOVF r0x12, W 00091a 1211 iorwf 0x11, 0x1, 0 IORWF r0x11, F 00091c c011 movff 0x11, 0xfe5 MOVFF r0x11, POSTDEC1 00091e ffe5 000920 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 000922 ffe9 000924 c00c movff 0xc, 0xff3 MOVFF r0x0c, PRODL 000926 fff3 000928 500d movf 0xd, 0, 0 MOVF r0x0d, W 00092a ec24 call 0x2448, 0 CALL __gptrput1 00092c f012 ; .line 723; ecan.c if ( msgFlags & ECAN_TX_RTR_BIT ) 00092e ac08 btfss 0x8, 0x6, 0 BTFSS r0x08, 6 000930 d004 bra 0x93a BRA _00111_DS_ ; .line 724; ecan.c temp = 0x40 | data1Len; 000932 0e40 movlw 0x40 MOVLW 0x40 000934 1007 iorwf 0x7, 0, 0 IORWF r0x07, W 000936 6e11 movwf 0x11, 0 MOVWF r0x11 000938 d002 bra 0x93e BRA _00112_DS_ _00111_DS_: ; .line 726; ecan.c temp = data1Len; 00093a c007 movff 0x7, 0x11 MOVFF r0x07, r0x11 00093c f011 _00112_DS_: ; .line 728; ecan.c *(ptr+5) = temp; 00093e 500b movf 0xb, 0, 0 MOVF r0x0b, W 000940 0f05 addlw 0x5 ADDLW 0x05 000942 6e12 movwf 0x12, 0 MOVWF r0x12 000944 0e00 movlw 0 MOVLW 0x00 000946 200c addwfc 0xc, 0, 0 ADDWFC r0x0c, W 000948 6e13 movwf 0x13, 0 MOVWF r0x13 00094a 0e00 movlw 0 MOVLW 0x00 00094c 200d addwfc 0xd, 0, 0 ADDWFC r0x0d, W 00094e 6e14 movwf 0x14, 0 MOVWF r0x14 000950 c011 movff 0x11, 0xfe5 MOVFF r0x11, POSTDEC1 000952 ffe5 000954 c012 movff 0x12, 0xfe9 MOVFF r0x12, FSR0L 000956 ffe9 000958 c013 movff 0x13, 0xff3 MOVFF r0x13, PRODL 00095a fff3 00095c 5014 movf 0x14, 0, 0 MOVF r0x14, W 00095e ec24 call 0x2448, 0 CALL __gptrput1 000960 f012 ; .line 731; ecan.c if ( msgFlags & ECAN_TX_FRAME_BIT ) 000962 aa08 btfss 0x8, 0x5, 0 BTFSS r0x08, 5 000964 d003 bra 0x96c BRA _00114_DS_ ; .line 732; ecan.c temp = ECAN_MSG_XTD; 000966 0e01 movlw 0x1 MOVLW 0x01 000968 6e11 movwf 0x11, 0 MOVWF r0x11 00096a d001 bra 0x96e BRA _00115_DS_ _00114_DS_: ; .line 735; ecan.c temp = ECAN_MSG_STD; 00096c 6a11 clrf 0x11, 0 CLRF r0x11 _00115_DS_: ; .line 738; ecan.c _CANIDToRegs((BYTE*)(ptr+1), id, temp); 00096e 500b movf 0xb, 0, 0 MOVF r0x0b, W 000970 0f01 addlw 0x1 ADDLW 0x01 000972 6e12 movwf 0x12, 0 MOVWF r0x12 000974 0e00 movlw 0 MOVLW 0x00 000976 200c addwfc 0xc, 0, 0 ADDWFC r0x0c, W 000978 6e13 movwf 0x13, 0 MOVWF r0x13 00097a 0e00 movlw 0 MOVLW 0x00 00097c 200d addwfc 0xd, 0, 0 ADDWFC r0x0d, W 00097e 6e14 movwf 0x14, 0 MOVWF r0x14 000980 5011 movf 0x11, 0, 0 MOVF r0x11, W 000982 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000984 5003 movf 0x3, 0, 0 MOVF r0x03, W 000986 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000988 5002 movf 0x2, 0, 0 MOVF r0x02, W 00098a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00098c 5001 movf 0x1, 0, 0 MOVF r0x01, W 00098e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000990 5000 movf 0, 0, 0 MOVF r0x00, W 000992 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000994 5014 movf 0x14, 0, 0 MOVF r0x14, W 000996 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000998 5013 movf 0x13, 0, 0 MOVF r0x13, W 00099a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00099c 5012 movf 0x12, 0, 0 MOVF r0x12, W 00099e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0009a0 ecb3 call 0xd66, 0 CALL __CANIDToRegs 0009a2 f006 0009a4 0e08 movlw 0x8 MOVLW 0x08 0009a6 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 741; ecan.c ptr += 6; 0009a8 0e06 movlw 0x6 MOVLW 0x06 0009aa 260b addwf 0xb, 0x1, 0 ADDWF r0x0b, F 0009ac 0e00 movlw 0 MOVLW 0x00 0009ae 220c addwfc 0xc, 0x1, 0 ADDWFC r0x0c, F 0009b0 0e00 movlw 0 MOVLW 0x00 0009b2 220d addwfc 0xd, 0x1, 0 ADDWFC r0x0d, F ; .line 743; ecan.c for ( j = 0 ; j < data1Len; j++ ) 0009b4 c004 movff 0x4, 0x11 MOVFF r0x04, r0x11 0009b6 f011 0009b8 c005 movff 0x5, 0x12 MOVFF r0x05, r0x12 0009ba f012 0009bc c006 movff 0x6, 0x13 MOVFF r0x06, r0x13 0009be f013 0009c0 6a14 clrf 0x14, 0 CLRF r0x14 _00120_DS_: 0009c2 5007 movf 0x7, 0, 0 MOVF r0x07, W 0009c4 5c14 subwf 0x14, 0, 0 SUBWF r0x14, W 0009c6 e21d bc 0xa02 BC _00123_DS_ ; .line 744; ecan.c *ptr++ = *data1++; 0009c8 c011 movff 0x11, 0xfe9 MOVFF r0x11, FSR0L 0009ca ffe9 0009cc c012 movff 0x12, 0xff3 MOVFF r0x12, PRODL 0009ce fff3 0009d0 5013 movf 0x13, 0, 0 MOVF r0x13, W 0009d2 ece0 call 0x23c0, 0 CALL __gptrget1 0009d4 f011 0009d6 6e15 movwf 0x15, 0 MOVWF r0x15 0009d8 2a11 incf 0x11, 0x1, 0 INCF r0x11, F 0009da b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0009dc 2a12 incf 0x12, 0x1, 0 INCF r0x12, F 0009de b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0009e0 2a13 incf 0x13, 0x1, 0 INCF r0x13, F 0009e2 c015 movff 0x15, 0xfe5 MOVFF r0x15, POSTDEC1 0009e4 ffe5 0009e6 c00b movff 0xb, 0xfe9 MOVFF r0x0b, FSR0L 0009e8 ffe9 0009ea c00c movff 0xc, 0xff3 MOVFF r0x0c, PRODL 0009ec fff3 0009ee 500d movf 0xd, 0, 0 MOVF r0x0d, W 0009f0 ec24 call 0x2448, 0 CALL __gptrput1 0009f2 f012 0009f4 2a0b incf 0xb, 0x1, 0 INCF r0x0b, F 0009f6 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0009f8 2a0c incf 0xc, 0x1, 0 INCF r0x0c, F 0009fa b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0009fc 2a0d incf 0xd, 0x1, 0 INCF r0x0d, F ; .line 743; ecan.c for ( j = 0 ; j < data1Len; j++ ) 0009fe 2a14 incf 0x14, 0x1, 0 INCF r0x14, F 000a00 d7e0 bra 0x9c2 BRA _00120_DS_ _00123_DS_: ; .line 748; ecan.c if ( !(*tempPtr & 0x04) ) 000a02 c00e movff 0xe, 0xfe9 MOVFF r0x0e, FSR0L 000a04 ffe9 000a06 c00f movff 0xf, 0xff3 MOVFF r0x0f, PRODL 000a08 fff3 000a0a 5010 movf 0x10, 0, 0 MOVF r0x10, W 000a0c ece0 call 0x23c0, 0 CALL __gptrget1 000a0e f011 000a10 6e0b movwf 0xb, 0 MOVWF r0x0b 000a12 b40b btfsc 0xb, 0x2, 0 BTFSC r0x0b, 2 000a14 d00a bra 0xa2a BRA _00117_DS_ ; .line 749; ecan.c *tempPtr |= 0x08; 000a16 860b bsf 0xb, 0x3, 0 BSF r0x0b, 3 000a18 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 000a1a ffe5 000a1c c00e movff 0xe, 0xfe9 MOVFF r0x0e, FSR0L 000a1e ffe9 000a20 c00f movff 0xf, 0xff3 MOVFF r0x0f, PRODL 000a22 fff3 000a24 5010 movf 0x10, 0, 0 MOVF r0x10, W 000a26 ec24 call 0x2448, 0 CALL __gptrput1 000a28 f012 _00117_DS_: ; .line 751; ecan.c return TRUE; 000a2a 0e01 movlw 0x1 MOVLW 0x01 000a2c d005 bra 0xa38 BRA _00128_DS_ _00126_DS_: ; .line 669; ecan.c for ( i = 0; i < buffers; i++ ) 000a2e 0e03 movlw 0x3 MOVLW 0x03 000a30 260a addwf 0xa, 0x1, 0 ADDWF r0x0a, F 000a32 2a09 incf 0x9, 0x1, 0 INCF r0x09, F 000a34 d737 bra 0x8a4 BRA _00124_DS_ _00127_DS_: ; .line 756; ecan.c return FALSE; 000a36 6ae8 clrf 0xe8, 0 CLRF WREG _00128_DS_: 000a38 cfe4 movff 0xfe4, 0x15 MOVFF PREINC1, r0x15 000a3a f015 000a3c cfe4 movff 0xfe4, 0x14 MOVFF PREINC1, r0x14 000a3e f014 000a40 cfe4 movff 0xfe4, 0x13 MOVFF PREINC1, r0x13 000a42 f013 000a44 cfe4 movff 0xfe4, 0x12 MOVFF PREINC1, r0x12 000a46 f012 000a48 cfe4 movff 0xfe4, 0x11 MOVFF PREINC1, r0x11 000a4a f011 000a4c cfe4 movff 0xfe4, 0x10 MOVFF PREINC1, r0x10 000a4e f010 000a50 cfe4 movff 0xfe4, 0xf MOVFF PREINC1, r0x0f 000a52 f00f 000a54 cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 000a56 f00e 000a58 cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 000a5a f00d 000a5c cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 000a5e f00c 000a60 cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 000a62 f00b 000a64 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 000a66 f00a 000a68 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 000a6a f009 000a6c cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 000a6e f008 000a70 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 000a72 f007 000a74 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 000a76 f006 000a78 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 000a7a f005 000a7c cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 000a7e f004 000a80 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 000a82 f003 000a84 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 000a86 f002 000a88 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000a8a f001 000a8c cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000a8e f000 000a90 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000a92 ffd9 000a94 0012 return 0 RETURN ; ; Starting pCode block S_ecan__ECANInitialize code _ECANInitialize: ; .line 163; ecan.c void ECANInitialize(void) 001efa cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001efc ffe5 001efe cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001f00 ffd9 ; .line 167; ecan.c ECANSetOperationMode(ECAN_OP_MODE_CONFIG); 001f02 0e80 movlw 0x80 MOVLW 0x80 001f04 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001f06 ec89 call 0x2312, 0 CALL _ECANSetOperationMode 001f08 f011 001f0a 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F ; .line 171; ecan.c BRGCON1 = ((ECAN_SJW_VAL-1) << 6) | (ECAN_BRP_VAL-1); 001f0c 0e01 movlw 0x1 MOVLW 0x01 001f0e 6e70 movwf 0x70, 0 MOVWF _BRGCON1 ; .line 172; ecan.c BRGCON2 = (ECAN_PHSEG2_MODE_VAL << 7) | \ 001f10 0eae movlw 0xae MOVLW 0xae 001f12 6e71 movwf 0x71, 0 MOVWF _BRGCON2 ; .line 178; ecan.c (ECAN_PHSEG2_VAL-1); 001f14 0e05 movlw 0x5 MOVLW 0x05 001f16 6e72 movwf 0x72, 0 MOVWF _BRGCON3 ; .line 181; ecan.c CIOCON = ECAN_TX2_SOURCE_VAL << 7 | \ 001f18 0e20 movlw 0x20 MOVLW 0x20 001f1a 6e73 movwf 0x73, 0 MOVWF _CIOCON ; .line 188; ecan.c ECANCON_MDSEL1 = 0; 001f1c 9e77 bcf 0x77, 0x7, 0 BCF _ECANCONbits, 7 ; .line 189; ecan.c ECANCON_MDSEL0 = 0; 001f1e 9c77 bcf 0x77, 0x6, 0 BCF _ECANCONbits, 6 ; .line 194; ecan.c RXB0CON = (ECAN_RXB0_MODE_VAL << 5) | (ECAN_RXB0_DBL_BUFFER_MODE_VAL << 2); 001f20 0e04 movlw 0x4 MOVLW 0x04 001f22 6e60 movwf 0x60, 0 MOVWF _RXB0CON 001f24 010f movlb 0xf BANKSEL _RXB1CON ; .line 195; ecan.c RXB1CON = ECAN_RXB1_MODE_VAL << 5; 001f26 6b50 clrf 0x50, 0x1 CLRF _RXB1CON, B 001f28 010f movlb 0xf BANKSEL _RXF0SIDH ; .line 289; ecan.c _SetStdRXFnValue(RXF0, ECAN_RXF0_VAL); 001f2a 6b00 clrf 0, 0x1 CLRF _RXF0SIDH, B 001f2c 010f movlb 0xf BANKSEL _RXF0SIDL 001f2e 6b01 clrf 0x1, 0x1 CLRF _RXF0SIDL, B 001f30 010f movlb 0xf BANKSEL _RXF1SIDH ; .line 297; ecan.c _SetStdRXFnValue(RXF1, ECAN_RXF1_VAL); 001f32 6b04 clrf 0x4, 0x1 CLRF _RXF1SIDH, B 001f34 010f movlb 0xf BANKSEL _RXF1SIDL 001f36 6b05 clrf 0x5, 0x1 CLRF _RXF1SIDL, B 001f38 010f movlb 0xf BANKSEL _RXF2SIDH ; .line 306; ecan.c _SetStdRXFnValue(RXF2, ECAN_RXF2_VAL); 001f3a 6b08 clrf 0x8, 0x1 CLRF _RXF2SIDH, B 001f3c 010f movlb 0xf BANKSEL _RXF2SIDL 001f3e 6b09 clrf 0x9, 0x1 CLRF _RXF2SIDL, B 001f40 010f movlb 0xf BANKSEL _RXF3SIDH ; .line 315; ecan.c _SetStdRXFnValue(RXF3, ECAN_RXF3_VAL); 001f42 6b0c clrf 0xc, 0x1 CLRF _RXF3SIDH, B 001f44 010f movlb 0xf BANKSEL _RXF3SIDL 001f46 6b0d clrf 0xd, 0x1 CLRF _RXF3SIDL, B 001f48 010f movlb 0xf BANKSEL _RXF4SIDH ; .line 324; ecan.c _SetStdRXFnValue(RXF4, ECAN_RXF4_VAL); 001f4a 6b10 clrf 0x10, 0x1 CLRF _RXF4SIDH, B 001f4c 010f movlb 0xf BANKSEL _RXF4SIDL 001f4e 6b11 clrf 0x11, 0x1 CLRF _RXF4SIDL, B 001f50 010f movlb 0xf BANKSEL _RXF5SIDH ; .line 332; ecan.c _SetStdRXFnValue(RXF5, ECAN_RXF4_VAL); 001f52 6b14 clrf 0x14, 0x1 CLRF _RXF5SIDH, B 001f54 010f movlb 0xf BANKSEL _RXF5SIDL 001f56 6b15 clrf 0x15, 0x1 CLRF _RXF5SIDL, B 001f58 010f movlb 0xf BANKSEL _RXM0SIDH ; .line 474; ecan.c _SetStdRXMnValue(0, ECAN_RXM0_VAL); 001f5a 6b18 clrf 0x18, 0x1 CLRF _RXM0SIDH, B 001f5c 010f movlb 0xf BANKSEL _RXM0SIDL 001f5e 6b19 clrf 0x19, 0x1 CLRF _RXM0SIDL, B 001f60 010f movlb 0xf BANKSEL _RXM0SIDLbits ; .line 475; ecan.c RXM0SIDL_EXIDEN = 0; 001f62 9719 bcf 0x19, 0x3, 0x1 BCF _RXM0SIDLbits, 3, B 001f64 010f movlb 0xf BANKSEL _RXM1SIDH ; .line 482; ecan.c _SetStdRXMnValue(1, ECAN_RXM1_VAL); 001f66 6b1c clrf 0x1c, 0x1 CLRF _RXM1SIDH, B 001f68 010f movlb 0xf BANKSEL _RXM1SIDL 001f6a 6b1d clrf 0x1d, 0x1 CLRF _RXM1SIDL, B 001f6c 010f movlb 0xf BANKSEL _RXM1SIDLbits ; .line 483; ecan.c RXM1SIDL_EXIDEN = 0; 001f6e 971d bcf 0x1d, 0x3, 0x1 BCF _RXM1SIDLbits, 3, B ; .line 494; ecan.c ECANSetOperationMode(ECAN_INIT_MODE); 001f70 0e00 movlw 0 MOVLW 0x00 001f72 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001f74 ec89 call 0x2312, 0 CALL _ECANSetOperationMode 001f76 f011 001f78 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F 001f7a cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001f7c ffd9 001f7e 0012 return 0 RETURN ; Statistics: ; code size: 3294 (0x0cde) bytes ( 2.51%) ; 1647 (0x066f) words ; udata size: 33 (0x0021) bytes ( 0.86%) ; access size: 22 (0x0016) bytes end ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 2.9.7 #5883 (Jul 21 2010) (CYGWIN) ; This file was generated Mon Jan 3 21:46:51 2011 ;-------------------------------------------------------- ; PIC16 port for the Microchip 16-bit core micros ;-------------------------------------------------------- list p=18f2680 radix dec ;-------------------------------------------------------- ; public variables in this module ;-------------------------------------------------------- global _HAL_read_eeprom_byte global _HAL_write_eeprom_byte ;-------------------------------------------------------- ; extern variables in this module ;-------------------------------------------------------- extern __gptrput1 extern __gptrget1 extern _RXF6SIDHbits extern _RXF6SIDLbits extern _RXF6EIDHbits extern _RXF6EIDLbits extern _RXF7SIDHbits extern _RXF7SIDLbits extern _RXF7EIDHbits extern _RXF7EIDLbits extern _RXF8SIDHbits extern _RXF8SIDLbits extern _RXF8EIDHbits extern _RXF8EIDLbits extern _RXF9SIDHbits extern _RXF9SIDLbits extern _RXF9EIDHbits extern _RXF9EIDLbits extern _RXF10SIDHbits extern _RXF10SIDLbits extern _RXF10EIDHbits extern _RXF10EIDLbits extern _RXF11SIDHbits extern _RXF11SIDLbits extern _RXF11EIDHbits extern _RXF11EIDLbits extern _RXF12SIDHbits extern _RXF12SIDLbits extern _RXF12EIDHbits extern _RXF12EIDLbits extern _RXF13SIDHbits extern _RXF13SIDLbits extern _RXF13EIDHbits extern _RXF13EIDLbits extern _RXF14SIDHbits extern _RXF14SIDLbits extern _RXF14EIDHbits extern _RXF14EIDLbits extern _RXF15SIDHbits extern _RXF15SIDLbits extern _RXF15EIDHbits extern _RXF15EIDLbits extern _RXFCON0bits extern _RXFCON1bits extern _SDFLCbits extern _RXFBCON0bits extern _RXFBCON1bits extern _RXFBCON2bits extern _RXFBCON3bits extern _RXFBCON4bits extern _RXFBCON5bits extern _RXFBCON6bits extern _RXFBCON7bits extern _MSEL0bits extern _MSEL1bits extern _MSEL2bits extern _MSEL3bits extern _BSEL0bits extern _BIE0bits extern _TXBIEbits extern _B0CONbits extern _B0SIDHbits extern _B0SIDLbits extern _B0EIDHbits extern _B0EIDLbits extern _B0DLCbits extern _B0D0bits extern _B0D1bits extern _B0D2bits extern _B0D3bits extern _B0D4bits extern _B0D5bits extern _B0D6bits extern _B0D7bits extern _CANSTAT_RO9bits extern _CANCON_RO9bits extern _B1CONbits extern _B1SIDHbits extern _B1SIDLbits extern _B1EIDHbits extern _B1EIDLbits extern _B1DLCbits extern _B1D0bits extern _B1D1bits extern _B1D2bits extern _B1D3bits extern _B1D4bits extern _B1D5bits extern _B1D6bits extern _B1D7bits extern _CANSTAT_RO8bits extern _CANCON_RO8bits extern _B2CONbits extern _B2SIDHbits extern _B2SIDLbits extern _B2EIDHbits extern _B2EIDLbits extern _B2DLCbits extern _B2D0bits extern _B2D1bits extern _B2D2bits extern _B2D3bits extern _B2D4bits extern _B2D5bits extern _B2D6bits extern _B2D7bits extern _CANSTAT_RO7bits extern _CANCON_RO7bits extern _B3CONbits extern _B3SIDHbits extern _B3SIDLbits extern _B3EIDHbits extern _B3EIDLbits extern _B3DLCbits extern _B3D0bits extern _B3D1bits extern _B3D2bits extern _B3D3bits extern _B3D4bits extern _B3D5bits extern _B3D6bits extern _B3D7bits extern _CANSTAT_RO6bits extern _CANCON_RO6bits extern _B4CONbits extern _B4SIDHbits extern _B4SIDLbits extern _B4EIDHbits extern _B4EIDLbits extern _B4DLCbits extern _B4D0bits extern _B4D1bits extern _B4D2bits extern _B4D3bits extern _B4D4bits extern _B4D5bits extern _B4D6bits extern _B4D7bits extern _CANSTAT_RO5bits extern _CANCON_RO5bits extern _B5CONbits extern _B5SIDHbits extern _B5SIDLbits extern _B5EIDHbits extern _B5EIDLbits extern _B5DLCbits extern _B5D0bits extern _B5D1bits extern _B5D2bits extern _B5D3bits extern _B5D4bits extern _B5D5bits extern _B5D6bits extern _B5D7bits extern _CANSTAT_RO4bits extern _CANCON_RO4bits extern _RXF0SIDHbits extern _RXF0SIDLbits extern _RXF0EIDHbits extern _RXF0EIDLbits extern _RXF1SIDHbits extern _RXF1SIDLbits extern _RXF1EIDHbits extern _RXF1EIDLbits extern _RXF2SIDHbits extern _RXF2SIDLbits extern _RXF2EIDHbits extern _RXF2EIDLbits extern _RXF3SIDHbits extern _RXF3SIDLbits extern _RXF3EIDHbits extern _RXF3EIDLbits extern _RXF4SIDHbits extern _RXF4SIDLbits extern _RXF4EIDHbits extern _RXF4EIDLbits extern _RXF5SIDHbits extern _RXF5SIDLbits extern _RXF5EIDHbits extern _RXF5EIDLbits extern _RXM0SIDHbits extern _RXM0SIDLbits extern _RXM0EIDHbits extern _RXM0EIDLbits extern _RXM1SIDHbits extern _RXM1SIDLbits extern _RXM1EIDHbits extern _RXM1EIDLbits extern _TXB2CONbits extern _TXB2SIDHbits extern _TXB2SIDLbits extern _TXB2EIDHbits extern _TXB2EIDLbits extern _TXB2DLCbits extern _TXB2D0bits extern _TXB2D1bits extern _TXB2D2bits extern _TXB2D3bits extern _TXB2D4bits extern _TXB2D5bits extern _TXB2D6bits extern _TXB2D7bits extern _CANSTAT_RO3bits extern _CANCON_RO3bits extern _TXB1CONbits extern _TXB1SIDHbits extern _TXB1SIDLbits extern _TXB1EIDHbits extern _TXB1EIDLbits extern _TXB1DLCbits extern _TXB1D0bits extern _TXB1D1bits extern _TXB1D2bits extern _TXB1D3bits extern _TXB1D4bits extern _TXB1D5bits extern _TXB1D6bits extern _TXB1D7bits extern _CANSTAT_RO2bits extern _CANCON_RO2bits extern _TXB0CONbits extern _TXB0SIDHbits extern _TXB0SIDLbits extern _TXB0EIDHbits extern _TXB0EIDLbits extern _TXB0DLCbits extern _TXB0D0bits extern _TXB0D1bits extern _TXB0D2bits extern _TXB0D3bits extern _TXB0D4bits extern _TXB0D5bits extern _TXB0D6bits extern _TXB0D7bits extern _CANSTAT_RO1bits extern _CANCON_RO1bits extern _RXB1CONbits extern _RXB1SIDHbits extern _RXB1SIDLbits extern _RXB1EIDHbits extern _RXB1EIDLbits extern _RXB1DLCbits extern _RXB1D0bits extern _RXB1D1bits extern _RXB1D2bits extern _RXB1D3bits extern _RXB1D4bits extern _RXB1D5bits extern _RXB1D6bits extern _RXB1D7bits extern _CANSTAT_RO0bits extern _CANCON_RO0bits extern _RXB0CONbits extern _RXB0SIDHbits extern _RXB0SIDLbits extern _RXB0EIDHbits extern _RXB0EIDLbits extern _RXB0DLCbits extern _RXB0D0bits extern _RXB0D1bits extern _RXB0D2bits extern _RXB0D3bits extern _RXB0D4bits extern _RXB0D5bits extern _RXB0D6bits extern _RXB0D7bits extern _CANSTATbits extern _CANCONbits extern _BRGCON1bits extern _BRGCON2bits extern _BRGCON3bits extern _CIOCONbits extern _COMSTATbits extern _RXERRCNTbits extern _TXERRCNTbits extern _ECANCONbits extern _PORTAbits extern _PORTBbits extern _PORTCbits extern _LATAbits extern _LATBbits extern _LATCbits extern _DDRAbits extern _TRISAbits extern _DDRBbits extern _TRISBbits extern _DDRCbits extern _TRISCbits extern _OSCTUNEbits extern _PIE1bits extern _PIR1bits extern _IPR1bits extern _PIE2bits extern _PIR2bits extern _IPR2bits extern _PIE3bits extern _PIR3bits extern _IPR3bits extern _EECON1bits extern _RCSTAbits extern _TXSTAbits extern _T3CONbits extern _BAUDCONbits extern _CCP1CONbits extern _ADCON2bits extern _ADCON1bits extern _ADCON0bits extern _SSPCON2bits extern _SSPCON1bits extern _SSPSTATbits extern _T2CONbits extern _T1CONbits extern _RCONbits extern _WDTCONbits extern _HLVDCONbits extern _LVDCONbits extern _OSCCONbits extern _T0CONbits extern _STATUSbits extern _INTCON3bits extern _INTCON2bits extern _INTCONbits extern _STKPTRbits extern _RXF6SIDH extern _RXF6SIDL extern _RXF6EIDH extern _RXF6EIDL extern _RXF7SIDH extern _RXF7SIDL extern _RXF7EIDH extern _RXF7EIDL extern _RXF8SIDH extern _RXF8SIDL extern _RXF8EIDH extern _RXF8EIDL extern _RXF9SIDH extern _RXF9SIDL extern _RXF9EIDH extern _RXF9EIDL extern _RXF10SIDH extern _RXF10SIDL extern _RXF10EIDH extern _RXF10EIDL extern _RXF11SIDH extern _RXF11SIDL extern _RXF11EIDH extern _RXF11EIDL extern _RXF12SIDH extern _RXF12SIDL extern _RXF12EIDH extern _RXF12EIDL extern _RXF13SIDH extern _RXF13SIDL extern _RXF13EIDH extern _RXF13EIDL extern _RXF14SIDH extern _RXF14SIDL extern _RXF14EIDH extern _RXF14EIDL extern _RXF15SIDH extern _RXF15SIDL extern _RXF15EIDH extern _RXF15EIDL extern _RXFCON0 extern _RXFCON1 extern _SDFLC extern _RXFBCON0 extern _RXFBCON1 extern _RXFBCON2 extern _RXFBCON3 extern _RXFBCON4 extern _RXFBCON5 extern _RXFBCON6 extern _RXFBCON7 extern _MSEL0 extern _MSEL1 extern _MSEL2 extern _MSEL3 extern _BSEL0 extern _BIE0 extern _TXBIE extern _B0CON extern _B0SIDH extern _B0SIDL extern _B0EIDH extern _B0EIDL extern _B0DLC extern _B0D0 extern _B0D1 extern _B0D2 extern _B0D3 extern _B0D4 extern _B0D5 extern _B0D6 extern _B0D7 extern _CANSTAT_RO9 extern _CANCON_RO9 extern _B1CON extern _B1SIDH extern _B1SIDL extern _B1EIDH extern _B1EIDL extern _B1DLC extern _B1D0 extern _B1D1 extern _B1D2 extern _B1D3 extern _B1D4 extern _B1D5 extern _B1D6 extern _B1D7 extern _CANSTAT_RO8 extern _CANCON_RO8 extern _B2CON extern _B2SIDH extern _B2SIDL extern _B2EIDH extern _B2EIDL extern _B2DLC extern _B2D0 extern _B2D1 extern _B2D2 extern _B2D3 extern _B2D4 extern _B2D5 extern _B2D6 extern _B2D7 extern _CANSTAT_RO7 extern _CANCON_RO7 extern _B3CON extern _B3SIDH extern _B3SIDL extern _B3EIDH extern _B3EIDL extern _B3DLC extern _B3D0 extern _B3D1 extern _B3D2 extern _B3D3 extern _B3D4 extern _B3D5 extern _B3D6 extern _B3D7 extern _CANSTAT_RO6 extern _CANCON_RO6 extern _B4CON extern _B4SIDH extern _B4SIDL extern _B4EIDH extern _B4EIDL extern _B4DLC extern _B4D0 extern _B4D1 extern _B4D2 extern _B4D3 extern _B4D4 extern _B4D5 extern _B4D6 extern _B4D7 extern _CANSTAT_RO5 extern _CANCON_RO5 extern _B5CON extern _B5SIDH extern _B5SIDL extern _B5EIDH extern _B5EIDL extern _B5DLC extern _B5D0 extern _B5D1 extern _B5D2 extern _B5D3 extern _B5D4 extern _B5D5 extern _B5D6 extern _B5D7 extern _CANSTAT_RO4 extern _CANCON_RO4 extern _RXF0SIDH extern _RXF0SIDL extern _RXF0EIDH extern _RXF0EIDL extern _RXF1SIDH extern _RXF1SIDL extern _RXF1EIDH extern _RXF1EIDL extern _RXF2SIDH extern _RXF2SIDL extern _RXF2EIDH extern _RXF2EIDL extern _RXF3SIDH extern _RXF3SIDL extern _RXF3EIDH extern _RXF3EIDL extern _RXF4SIDH extern _RXF4SIDL extern _RXF4EIDH extern _RXF4EIDL extern _RXF5SIDH extern _RXF5SIDL extern _RXF5EIDH extern _RXF5EIDL extern _RXM0SIDH extern _RXM0SIDL extern _RXM0EIDH extern _RXM0EIDL extern _RXM1SIDH extern _RXM1SIDL extern _RXM1EIDH extern _RXM1EIDL extern _TXB2CON extern _TXB2SIDH extern _TXB2SIDL extern _TXB2EIDH extern _TXB2EIDL extern _TXB2DLC extern _TXB2D0 extern _TXB2D1 extern _TXB2D2 extern _TXB2D3 extern _TXB2D4 extern _TXB2D5 extern _TXB2D6 extern _TXB2D7 extern _CANSTAT_RO3 extern _CANCON_RO3 extern _TXB1CON extern _TXB1SIDH extern _TXB1SIDL extern _TXB1EIDH extern _TXB1EIDL extern _TXB1DLC extern _TXB1D0 extern _TXB1D1 extern _TXB1D2 extern _TXB1D3 extern _TXB1D4 extern _TXB1D5 extern _TXB1D6 extern _TXB1D7 extern _CANSTAT_RO2 extern _CANCON_RO2 extern _TXB0CON extern _TXB0SIDH extern _TXB0SIDL extern _TXB0EIDH extern _TXB0EIDL extern _TXB0DLC extern _TXB0D0 extern _TXB0D1 extern _TXB0D2 extern _TXB0D3 extern _TXB0D4 extern _TXB0D5 extern _TXB0D6 extern _TXB0D7 extern _CANSTAT_RO1 extern _CANCON_RO1 extern _RXB1CON extern _RXB1SIDH extern _RXB1SIDL extern _RXB1EIDH extern _RXB1EIDL extern _RXB1DLC extern _RXB1D0 extern _RXB1D1 extern _RXB1D2 extern _RXB1D3 extern _RXB1D4 extern _RXB1D5 extern _RXB1D6 extern _RXB1D7 extern _CANSTAT_RO0 extern _CANCON_RO0 extern _RXB0CON extern _RXB0SIDH extern _RXB0SIDL extern _RXB0EIDH extern _RXB0EIDL extern _RXB0DLC extern _RXB0D0 extern _RXB0D1 extern _RXB0D2 extern _RXB0D3 extern _RXB0D4 extern _RXB0D5 extern _RXB0D6 extern _RXB0D7 extern _CANSTAT extern _CANCON extern _BRGCON1 extern _BRGCON2 extern _BRGCON3 extern _CIOCON extern _COMSTAT extern _RXERRCNT extern _TXERRCNT extern _ECANCON extern _PORTA extern _PORTB extern _PORTC extern _LATA extern _LATB extern _LATC extern _DDRA extern _TRISA extern _DDRB extern _TRISB extern _DDRC extern _TRISC extern _OSCTUNE extern _PIE1 extern _PIR1 extern _IPR1 extern _PIE2 extern _PIR2 extern _IPR2 extern _PIE3 extern _PIR3 extern _IPR3 extern _EECON1 extern _EECON2 extern _EEDATA extern _EEADR extern _EEADRH extern _RCSTA extern _TXSTA extern _TXREG extern _RCREG extern _SPBRG extern _SPBRGH extern _T3CON extern _TMR3L extern _TMR3H extern _BAUDCON extern _CCP1CON extern _CCPR1 extern _CCPR1L extern _CCPR1H extern _ADCON2 extern _ADCON1 extern _ADCON0 extern _ADRES extern _ADRESL extern _ADRESH extern _SSPCON2 extern _SSPCON1 extern _SSPSTAT extern _SSPADD extern _SSPBUF extern _T2CON extern _PR2 extern _TMR2 extern _T1CON extern _TMR1L extern _TMR1H extern _RCON extern _WDTCON extern _HLVDCON extern _LVDCON extern _OSCCON extern _T0CON extern _TMR0L extern _TMR0H extern _STATUS extern _FSR2L extern _FSR2H extern _PLUSW2 extern _PREINC2 extern _POSTDEC2 extern _POSTINC2 extern _INDF2 extern _BSR extern _FSR1L extern _FSR1H extern _PLUSW1 extern _PREINC1 extern _POSTDEC1 extern _POSTINC1 extern _INDF1 extern _WREG extern _FSR0L extern _FSR0H extern _PLUSW0 extern _PREINC0 extern _POSTDEC0 extern _POSTINC0 extern _INDF0 extern _INTCON3 extern _INTCON2 extern _INTCON extern _PROD extern _PRODL extern _PRODH extern _TABLAT extern _TBLPTR extern _TBLPTRL extern _TBLPTRH extern _TBLPTRU extern _PC extern _PCL extern _PCLATH extern _PCLATU extern _STKPTR extern _TOS extern _TOSL extern _TOSH extern _TOSU extern _usart_busy extern _usart_putc ;-------------------------------------------------------- ; Equates to used internal registers ;-------------------------------------------------------- STATUS equ 0xfd8 WREG equ 0xfe8 FSR0L equ 0xfe9 FSR1L equ 0xfe1 FSR2L equ 0xfd9 POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 ; Internal registers .registers udata_ovr 0x0000 r0x00 res 1 r0x01 res 1 r0x02 res 1 r0x03 res 1 r0x04 res 1 r0x05 res 1 r0x06 res 1 r0x07 res 1 ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; I code from now on! ; ; Starting pCode block S_eeprom__HAL_write_eeprom_byte code _HAL_write_eeprom_byte: ; .line 15; eeprom.c void HAL_write_eeprom_byte(uint8_t addr, uint8_t dat) 00206e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002070 ffe5 002072 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002074 ffd9 002076 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 002078 ffe5 00207a 0e02 movlw 0x2 MOVLW 0x02 00207c cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 00207e f000 002080 0e03 movlw 0x3 MOVLW 0x03 002082 cfdb movff 0xfdb, 0xfa8 MOVFF PLUSW2, _EEDATA 002084 ffa8 ; .line 18; eeprom.c EEADR = addr; 002086 c000 movff 0, 0xfa9 MOVFF r0x00, _EEADR 002088 ffa9 ; .line 20; eeprom.c EECON1bits.EEPGD = 0; 00208a 9ea6 bcf 0xa6, 0x7, 0 BCF _EECON1bits, 7 ; .line 21; eeprom.c EECON1bits.CFGS = 0; 00208c 9ca6 bcf 0xa6, 0x6, 0 BCF _EECON1bits, 6 ; .line 22; eeprom.c EECON1bits.WREN = 1; // enable writes to data EEPROM 00208e 84a6 bsf 0xa6, 0x2, 0 BSF _EECON1bits, 2 ; .line 23; eeprom.c INTCONbits.GIE = 0; // disable interrupts 002090 9ef2 bcf 0xf2, 0x7, 0 BCF _INTCONbits, 7 ; .line 24; eeprom.c EECON2 = 0x55; 002092 0e55 movlw 0x55 MOVLW 0x55 002094 6ea7 movwf 0xa7, 0 MOVWF _EECON2 ; .line 25; eeprom.c EECON2 = 0x0AA; 002096 0eaa movlw 0xaa MOVLW 0xaa 002098 6ea7 movwf 0xa7, 0 MOVWF _EECON2 ; .line 26; eeprom.c EECON1bits.WR = 1; // start writing 00209a 82a6 bsf 0xa6, 0x1, 0 BSF _EECON1bits, 1 _00138_DS_: ; .line 27; eeprom.c while(EECON1bits.WR){ 00209c a2a6 btfss 0xa6, 0x1, 0 BTFSS _EECON1bits, 1 00209e d002 bra 0x20a4 BRA _00140_DS_ 0020a0 0000 nop nop 0020a2 d7fc bra 0x209c BRA _00138_DS_ _00140_DS_: ; .line 29; eeprom.c if(EECON1bits.WRERR){ 0020a4 a6a6 btfss 0xa6, 0x3, 0 BTFSS _EECON1bits, 3 0020a6 d013 bra 0x20ce BRA _00148_DS_ ; .line 30; eeprom.c usart_putc('E'); 0020a8 0e45 movlw 0x45 MOVLW 0x45 0020aa ec36 call 0x246c, 0 CALL _usart_putc 0020ac f012 _00141_DS_: ; .line 31; eeprom.c while(usart_busy()); 0020ae ec61 call 0x24c2, 0 CALL _usart_busy 0020b0 f012 0020b2 6e00 movwf 0, 0 MOVWF r0x00 0020b4 5000 movf 0, 0, 0 MOVF r0x00, W 0020b6 e1fb bnz 0x20ae BNZ _00141_DS_ ; .line 32; eeprom.c usart_putc('R'); 0020b8 0e52 movlw 0x52 MOVLW 0x52 0020ba ec36 call 0x246c, 0 CALL _usart_putc 0020bc f012 _00144_DS_: ; .line 33; eeprom.c while(usart_busy()); 0020be ec61 call 0x24c2, 0 CALL _usart_busy 0020c0 f012 0020c2 6e00 movwf 0, 0 MOVWF r0x00 0020c4 5000 movf 0, 0, 0 MOVF r0x00, W 0020c6 e1fb bnz 0x20be BNZ _00144_DS_ ; .line 34; eeprom.c usart_putc('R'); 0020c8 0e52 movlw 0x52 MOVLW 0x52 0020ca ec36 call 0x246c, 0 CALL _usart_putc 0020cc f012 _00148_DS_: ; .line 37; eeprom.c EECON1bits.WREN = 0; 0020ce 94a6 bcf 0xa6, 0x2, 0 BCF _EECON1bits, 2 ; .line 38; eeprom.c INTCONbits.GIE = 1; // enable interrupts 0020d0 8ef2 bsf 0xf2, 0x7, 0 BSF _INTCONbits, 7 0020d2 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0020d4 f000 0020d6 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0020d8 ffd9 0020da 0012 return 0 RETURN ; ; Starting pCode block S_eeprom__HAL_read_eeprom_byte code _HAL_read_eeprom_byte: ; .line 5; eeprom.c uint8_t HAL_read_eeprom_byte(uint8_t addr) 0023e2 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0023e4 ffe5 0023e6 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0023e8 ffd9 0023ea 0e02 movlw 0x2 MOVLW 0x02 0023ec cfdb movff 0xfdb, 0xfa9 MOVFF PLUSW2, _EEADR 0023ee ffa9 ; .line 8; eeprom.c EECON1bits.CFGS = 0; 0023f0 9ca6 bcf 0xa6, 0x6, 0 BCF _EECON1bits, 6 ; .line 9; eeprom.c EECON1bits.EEPGD = 0; 0023f2 9ea6 bcf 0xa6, 0x7, 0 BCF _EECON1bits, 7 ; .line 10; eeprom.c EECON1bits.RD = 1; 0023f4 80a6 bsf 0xa6, 0, 0 BSF _EECON1bits, 0 ; .line 11; eeprom.c return EEDATA; 0023f6 50a8 movf 0xa8, 0, 0 MOVF _EEDATA, W 0023f8 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0023fa ffd9 0023fc 0012 return 0 RETURN ; ; Starting pCode block S_eeprom__EEPROM_memset code _EEPROM_memset: ; .line 29; eeprom.h static uint8_t EEPROM_memset( uint8_t addr, void *src, uint8_t len ) { 001bf6 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001bf8 ffe5 001bfa cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001bfc ffd9 001bfe c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001c00 ffe5 001c02 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 001c04 ffe5 001c06 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001c08 ffe5 001c0a c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001c0c ffe5 001c0e c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001c10 ffe5 001c12 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 001c14 ffe5 001c16 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 001c18 ffe5 001c1a c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001c1c ffe5 001c1e 0e02 movlw 0x2 MOVLW 0x02 001c20 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001c22 f000 001c24 0e03 movlw 0x3 MOVLW 0x03 001c26 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 001c28 f001 001c2a 0e04 movlw 0x4 MOVLW 0x04 001c2c cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001c2e f002 001c30 0e05 movlw 0x5 MOVLW 0x05 001c32 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 001c34 f003 001c36 0e06 movlw 0x6 MOVLW 0x06 001c38 cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 001c3a f004 ; .line 31; eeprom.h for (i=0; i