gplink-0.13.7 beta Copyright (c) 1998-2005 gputils project Listing File Generated: 1-19-2011 19:39:35 Address Value Disassembly Source ------- ----- ----------- ------ ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.0.1 #6101 (Jan 12 2011) (Linux) ; This file was generated Wed Jan 19 19:39:35 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 _CAN_status_ptr global _pt global _ui global _TIMER_setup global _TIMER_set_T0 global _TIMER_set_T1 global _TIMER_set_T2 global _TIMER_get global _CAN_init global _CAN_recv global _CAN_send global _CAN_setFilters global _HAL_read_eeprom_byte global _HAL_write_eeprom_byte global _SERIAL_initialize global _SERIAL_putc global _SERIAL_getc global _SERIAL_write global _SERIAL_readable global _SERIAL_writable global _HAL_INT_TIMER0 global _CAN_status1 global _rxdata global _CAN_runOnce global _INTERRUPTS_init global _INTERRUPTS_runOnce global _main ;-------------------------------------------------------- ; extern variables in this module ;-------------------------------------------------------- extern __gptrget1 extern __gptrput2 extern __gptrget2 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 __ECANRxFilterHitInfo 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_open extern _usart_busy extern _usart_getc extern _usart_putc extern _ECANInitialize extern _ECANSendMessage extern _ECANReceiveMessage extern _ECANSetOperationMode extern __CANIDToRegs extern __mulint extern __divslong ;-------------------------------------------------------- ; Equates to used internal registers ;-------------------------------------------------------- STATUS equ 0xfd8 PCL equ 0xff9 PCLATH equ 0xffa PCLATU equ 0xffb WREG equ 0xfe8 BSR equ 0xfe0 FSR0L equ 0xfe9 FSR0H equ 0xfea FSR1L equ 0xfe1 FSR2L equ 0xfd9 INDF0 equ 0xfef POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 PRODH equ 0xff4 idata _ui db 0x61 _pt db LOW(_ui), HIGH(_ui), 0x80 _CAN_status_ptr db LOW(_CAN_status1), HIGH(_CAN_status1), 0x80 _CAN_send_rr_1_1 db 0x00 _CAN_setFilters_fltId_1_1 db 0x00, 0x01, 0x02, 0x03, 0x04, 0x05 _rxdata db 0xaa ; 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 udata_jgjh_0 udata _CAN_status1 res 5 udata_jgjh_1 udata _CAN_recv_temp_1_1 res 4 udata_jgjh_2 udata _CAN_recv_flags_1_1 res 1 udata_jgjh_3 udata _main_tcon_1_1 res 2 udata_jgjh_4 udata _main_serial_setting_1_1 res 6 udata_jgjh_5 udata _main_spi_setting_1_1 res 6 ;-------------------------------------------------------- ; interrupt vector ;-------------------------------------------------------- ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; ; Starting pCode block for absolute section ; ;----------------------------------------- S_jgjh_ivec_0x1_isr code 0X000008 ivec_0x1_isr: 000008 ef6b goto 0x1ed6 GOTO _isr 00000a f00f ; I code from now on! ; ; Starting pCode block S_jgjh__main code _main: 0015fc 0100 movlb 0 BANKSEL _main_tcon_1_1 ; .line 26; jgjh.c struct TIMER_config tcon = {0,6}; 0015fe 6ba4 clrf 0xa4, 0x1 CLRF _main_tcon_1_1, B 001600 0e06 movlw 0x6 MOVLW 0x06 001602 0100 movlb 0 BANKSEL (_main_tcon_1_1 + 1) 001604 6fa5 movwf 0xa5, 0x1 MOVWF (_main_tcon_1_1 + 1), B ; .line 30; jgjh.c serial_setting.baud = SERIAL_BAUD_1200; 001606 0e02 movlw 0x2 MOVLW 0x02 001608 0100 movlb 0 BANKSEL _main_serial_setting_1_1 00160a 6f8b movwf 0x8b, 0x1 MOVWF _main_serial_setting_1_1, B 00160c 0100 movlb 0 BANKSEL (_main_serial_setting_1_1 + 1) 00160e 6b8c clrf 0x8c, 0x1 CLRF (_main_serial_setting_1_1 + 1), B ; .line 31; jgjh.c serial_setting.stopbit = 1; 001610 0e01 movlw 0x1 MOVLW 0x01 001612 0100 movlb 0 BANKSEL (_main_serial_setting_1_1 + 3) 001614 6f8e movwf 0x8e, 0x1 MOVWF (_main_serial_setting_1_1 + 3), B ; .line 33; jgjh.c spi_setting.mstr_slv = 1; // set Master 001616 0e01 movlw 0x1 MOVLW 0x01 001618 0100 movlb 0 BANKSEL (_main_spi_setting_1_1 + 4) 00161a 6f95 movwf 0x95, 0x1 MOVWF (_main_spi_setting_1_1 + 4), B ; .line 36; jgjh.c SERIAL_initialize(uart, &serial_setting); 00161c 0e00 movlw 0 MOVLW HIGH(_main_serial_setting_1_1) 00161e 6e01 movwf 0x1, 0 MOVWF r0x01 001620 0e8b movlw 0x8b MOVLW LOW(_main_serial_setting_1_1) 001622 6e00 movwf 0, 0 MOVWF r0x00 001624 0e80 movlw 0x80 MOVLW 0x80 001626 6e02 movwf 0x2, 0 MOVWF r0x02 001628 5002 movf 0x2, 0, 0 MOVF r0x02, W 00162a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00162c 5001 movf 0x1, 0, 0 MOVF r0x01, W 00162e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001630 5000 movf 0, 0, 0 MOVF r0x00, W 001632 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001634 0e00 movlw 0 MOVLW 0x00 001636 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001638 0e00 movlw 0 MOVLW 0x00 00163a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00163c ecb3 call 0xd66, 0 CALL _SERIAL_initialize 00163e f006 001640 0e05 movlw 0x5 MOVLW 0x05 001642 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 37; jgjh.c SERIAL_initialize(spi, &spi_setting); 001644 0e00 movlw 0 MOVLW HIGH(_main_spi_setting_1_1) 001646 6e01 movwf 0x1, 0 MOVWF r0x01 001648 0e91 movlw 0x91 MOVLW LOW(_main_spi_setting_1_1) 00164a 6e00 movwf 0, 0 MOVWF r0x00 00164c 0e80 movlw 0x80 MOVLW 0x80 00164e 6e02 movwf 0x2, 0 MOVWF r0x02 001650 5002 movf 0x2, 0, 0 MOVF r0x02, W 001652 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001654 5001 movf 0x1, 0, 0 MOVF r0x01, W 001656 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001658 5000 movf 0, 0, 0 MOVF r0x00, W 00165a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00165c 0e00 movlw 0 MOVLW 0x00 00165e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001660 0e01 movlw 0x1 MOVLW 0x01 001662 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001664 ecb3 call 0xd66, 0 CALL _SERIAL_initialize 001666 f006 001668 0e05 movlw 0x5 MOVLW 0x05 00166a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 40; jgjh.c TIMER_setup(tim,&tcon); 00166c 0e00 movlw 0 MOVLW HIGH(_main_tcon_1_1) 00166e 6e01 movwf 0x1, 0 MOVWF r0x01 001670 0ea4 movlw 0xa4 MOVLW LOW(_main_tcon_1_1) 001672 6e00 movwf 0, 0 MOVWF r0x00 001674 0e80 movlw 0x80 MOVLW 0x80 001676 6e02 movwf 0x2, 0 MOVWF r0x02 001678 5002 movf 0x2, 0, 0 MOVF r0x02, W 00167a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00167c 5001 movf 0x1, 0, 0 MOVF r0x01, W 00167e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001680 5000 movf 0, 0, 0 MOVF r0x00, W 001682 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001684 0e00 movlw 0 MOVLW 0x00 001686 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001688 ec4a call 0x1a94, 0 CALL _TIMER_setup 00168a f00d 00168c 0e04 movlw 0x4 MOVLW 0x04 00168e 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 43; jgjh.c INTERRUPTS_init(); 001690 ec8a call 0x2314, 0 CALL _INTERRUPTS_init 001692 f011 ; .line 45; jgjh.c TRISB = TRISB & 0xfc; // set pin B1 & B0 to output 001694 0efc movlw 0xfc MOVLW 0xfc 001696 1693 andwf 0x93, 0x1, 0 ANDWF _TRISB, F ; .line 46; jgjh.c LATBbits.LATB1 = 1; 001698 828a bsf 0x8a, 0x1, 0 BSF _LATBbits, 1 ; .line 47; jgjh.c LATBbits.LATB0 = 0; 00169a 908a bcf 0x8a, 0, 0 BCF _LATBbits, 0 ; .line 59; jgjh.c while(1) 00169c 6a00 clrf 0, 0 CLRF r0x00 00169e 6a01 clrf 0x1, 0 CLRF r0x01 0016a0 0e01 movlw 0x1 MOVLW 0x01 0016a2 6e02 movwf 0x2, 0 MOVWF r0x02 0016a4 6a03 clrf 0x3, 0 CLRF r0x03 _00426_DS_: ; .line 64; jgjh.c if(SERIAL_readable(spi)) // check if data has been received 0016a6 0e00 movlw 0 MOVLW 0x00 0016a8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016aa 0e01 movlw 0x1 MOVLW 0x01 0016ac 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016ae eca2 call 0x2144, 0 CALL _SERIAL_readable 0016b0 f010 0016b2 6e04 movwf 0x4, 0 MOVWF r0x04 0016b4 0e02 movlw 0x2 MOVLW 0x02 0016b6 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0016b8 5004 movf 0x4, 0, 0 MOVF r0x04, W 0016ba e015 bz 0x16e6 BZ _00417_DS_ ; .line 66; jgjh.c rxdata = SERIAL_getc(spi); 0016bc 0e00 movlw 0 MOVLW 0x00 0016be 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016c0 0e01 movlw 0x1 MOVLW 0x01 0016c2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016c4 ec75 call 0x20ea, 0 CALL _SERIAL_getc 0016c6 f010 0016c8 0100 movlb 0 BANKSEL _rxdata 0016ca 6f89 movwf 0x89, 0x1 MOVWF _rxdata, B 0016cc 0e02 movlw 0x2 MOVLW 0x02 0016ce 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0016d0 0100 movlb 0 BANKSEL _rxdata ; .line 67; jgjh.c SERIAL_putc(uart,rxdata); 0016d2 5189 movf 0x89, 0, 0x1 MOVF _rxdata, W, B 0016d4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016d6 0e00 movlw 0 MOVLW 0x00 0016d8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016da 0e00 movlw 0 MOVLW 0x00 0016dc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016de ec42 call 0x2084, 0 CALL _SERIAL_putc 0016e0 f010 0016e2 0e03 movlw 0x3 MOVLW 0x03 0016e4 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00417_DS_: ; .line 70; jgjh.c if(counter == 15000) // transmit data 0016e6 5000 movf 0, 0, 0 MOVF r0x00, W 0016e8 0a98 xorlw 0x98 XORLW 0x98 0016ea e103 bnz 0x16f2 BNZ _00436_DS_ 0016ec 5001 movf 0x1, 0, 0 MOVF r0x01, W 0016ee 0a3a xorlw 0x3a XORLW 0x3a 0016f0 e001 bz 0x16f4 BZ _00437_DS_ _00436_DS_: 0016f2 d00a bra 0x1708 BRA _00419_DS_ _00437_DS_: ; .line 72; jgjh.c SERIAL_putc(uart,0xdd); 0016f4 0edd movlw 0xdd MOVLW 0xdd 0016f6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016f8 0e00 movlw 0 MOVLW 0x00 0016fa 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0016fc 0e00 movlw 0 MOVLW 0x00 0016fe 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001700 ec42 call 0x2084, 0 CALL _SERIAL_putc 001702 f010 001704 0e03 movlw 0x3 MOVLW 0x03 001706 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00419_DS_: ; .line 74; jgjh.c if(SERIAL_readable(uart) == 1) 001708 0e00 movlw 0 MOVLW 0x00 00170a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00170c 0e00 movlw 0 MOVLW 0x00 00170e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001710 eca2 call 0x2144, 0 CALL _SERIAL_readable 001712 f010 001714 6e04 movwf 0x4, 0 MOVWF r0x04 001716 0e02 movlw 0x2 MOVLW 0x02 001718 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00171a 5004 movf 0x4, 0, 0 MOVF r0x04, W 00171c 0a01 xorlw 0x1 XORLW 0x01 00171e e113 bnz 0x1746 BNZ _00421_DS_ ; .line 77; jgjh.c temp = SERIAL_getc(uart); 001720 0e00 movlw 0 MOVLW 0x00 001722 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001724 0e00 movlw 0 MOVLW 0x00 001726 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001728 ec75 call 0x20ea, 0 CALL _SERIAL_getc 00172a f010 00172c 6e04 movwf 0x4, 0 MOVWF r0x04 00172e 0e02 movlw 0x2 MOVLW 0x02 001730 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 80; jgjh.c SERIAL_putc(spi,temp); 001732 5004 movf 0x4, 0, 0 MOVF r0x04, W 001734 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001736 0e00 movlw 0 MOVLW 0x00 001738 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00173a 0e01 movlw 0x1 MOVLW 0x01 00173c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00173e ec42 call 0x2084, 0 CALL _SERIAL_putc 001740 f010 001742 0e03 movlw 0x3 MOVLW 0x03 001744 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00421_DS_: ; .line 83; jgjh.c counter++; 001746 2a00 incf 0, 0x1, 0 INCF r0x00, F 001748 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 00174a 2a01 incf 0x1, 0x1, 0 INCF r0x01, F ; .line 85; jgjh.c ACK++; 00174c 2a02 incf 0x2, 0x1, 0 INCF r0x02, F 00174e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001750 2a03 incf 0x3, 0x1, 0 INCF r0x03, F ; .line 86; jgjh.c if(ACK>15000) 001752 5003 movf 0x3, 0, 0 MOVF r0x03, W 001754 0f80 addlw 0x80 ADDLW 0x80 001756 0f46 addlw 0x46 ADDLW 0x46 001758 e102 bnz 0x175e BNZ _00440_DS_ 00175a 0e99 movlw 0x99 MOVLW 0x99 00175c 5c02 subwf 0x2, 0, 0 SUBWF r0x02, W _00440_DS_: 00175e e302 bnc 0x1764 BNC _00423_DS_ ; .line 88; jgjh.c LATBbits.LATB0 = 1; 001760 808a bsf 0x8a, 0, 0 BSF _LATBbits, 0 001762 d7a1 bra 0x16a6 BRA _00426_DS_ _00423_DS_: ; .line 93; jgjh.c LATBbits.LATB0 = 0; 001764 908a bcf 0x8a, 0, 0 BCF _LATBbits, 0 001766 d79f bra 0x16a6 BRA _00426_DS_ 001768 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__HAL_INT_TIMER0 code _HAL_INT_TIMER0: ; .line 102; jgjh.c void HAL_INT_TIMER0() 0022b2 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0022b4 ffe5 0022b6 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0022b8 ffd9 0022ba 0100 movlb 0 BANKSEL _rxdata ; .line 104; jgjh.c SERIAL_putc(0,rxdata); 0022bc 5189 movf 0x89, 0, 0x1 MOVF _rxdata, W, B 0022be 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0022c0 0e00 movlw 0 MOVLW 0x00 0022c2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0022c4 0e00 movlw 0 MOVLW 0x00 0022c6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0022c8 ec42 call 0x2084, 0 CALL _SERIAL_putc 0022ca f010 0022cc 0e03 movlw 0x3 MOVLW 0x03 0022ce 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0022d0 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0022d2 ffd9 0022d4 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__INTERRUPTS_runOnce code _INTERRUPTS_runOnce: ; .line 70; interrupts.c void INTERRUPTS_runOnce( void ){} 002390 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002392 ffe5 002394 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 002396 ffd9 002398 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 00239a ffd9 00239c 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__INTERRUPTS_init code _INTERRUPTS_init: ; .line 40; interrupts.c int INTERRUPTS_init(void){ 002314 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002316 ffe5 002318 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00231a ffd9 ; .line 55; interrupts.c INTCONbits.TMR0IE = 1; // enable timer 0 interrupts 00231c 8af2 bsf 0xf2, 0x5, 0 BSF _INTCONbits, 5 ; .line 56; interrupts.c INTCON2bits.TMR0IP = 1; // set high priority 00231e 84f1 bsf 0xf1, 0x2, 0 BSF _INTCON2bits, 2 ; .line 66; interrupts.c INTCONbits.GIEH = 1; //enable global interrupts 002320 8ef2 bsf 0xf2, 0x7, 0 BSF _INTCONbits, 7 ; .line 67; interrupts.c return i; 002322 6af3 clrf 0xf3, 0 CLRF PRODL 002324 0e01 movlw 0x1 MOVLW 0x01 002326 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002328 ffd9 00232a 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__isr code _isr: ; .line 18; interrupts.c static void isr(void) __interrupt 1 001ed6 cfe8 movff 0xfe8, 0xfe5 MOVFF WREG, POSTDEC1 001ed8 ffe5 001eda cfd8 movff 0xfd8, 0xfe5 MOVFF STATUS, POSTDEC1 001edc ffe5 001ede cfe0 movff 0xfe0, 0xfe5 MOVFF BSR, POSTDEC1 001ee0 ffe5 001ee2 cff3 movff 0xff3, 0xfe5 MOVFF PRODL, POSTDEC1 001ee4 ffe5 001ee6 cff4 movff 0xff4, 0xfe5 MOVFF PRODH, POSTDEC1 001ee8 ffe5 001eea cfe9 movff 0xfe9, 0xfe5 MOVFF FSR0L, POSTDEC1 001eec ffe5 001eee cfea movff 0xfea, 0xfe5 MOVFF FSR0H, POSTDEC1 001ef0 ffe5 001ef2 cffa movff 0xffa, 0xfe5 MOVFF PCLATH, POSTDEC1 001ef4 ffe5 001ef6 cffb movff 0xffb, 0xfe5 MOVFF PCLATU, POSTDEC1 001ef8 ffe5 001efa cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001efc ffe5 001efe cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001f00 ffd9 001f02 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001f04 ffe5 ; .line 31; interrupts.c if(INTCONbits.TMR0IF==1) 001f06 6a00 clrf 0, 0 CLRF r0x00 001f08 b4f2 btfsc 0xf2, 0x2, 0 BTFSC _INTCONbits, 2 001f0a 2a00 incf 0, 0x1, 0 INCF r0x00, F 001f0c 5000 movf 0, 0, 0 MOVF r0x00, W 001f0e 0a01 xorlw 0x1 XORLW 0x01 001f10 e103 bnz 0x1f18 BNZ _00397_DS_ ; .line 33; interrupts.c HAL_INT_TIMER0(); 001f12 ec59 call 0x22b2, 0 CALL _HAL_INT_TIMER0 001f14 f011 ; .line 34; interrupts.c INTCONbits.TMR0IF = 0; // clear flag 001f16 94f2 bcf 0xf2, 0x2, 0 BCF _INTCONbits, 2 _00397_DS_: 001f18 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001f1a f000 001f1c cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001f1e ffd9 001f20 cfe4 movff 0xfe4, 0xffb MOVFF PREINC1, PCLATU 001f22 fffb 001f24 cfe4 movff 0xfe4, 0xffa MOVFF PREINC1, PCLATH 001f26 fffa 001f28 cfe4 movff 0xfe4, 0xfea MOVFF PREINC1, FSR0H 001f2a ffea 001f2c cfe4 movff 0xfe4, 0xfe9 MOVFF PREINC1, FSR0L 001f2e ffe9 001f30 cfe4 movff 0xfe4, 0xff4 MOVFF PREINC1, PRODH 001f32 fff4 001f34 cfe4 movff 0xfe4, 0xff3 MOVFF PREINC1, PRODL 001f36 fff3 001f38 cfe4 movff 0xfe4, 0xfe0 MOVFF PREINC1, BSR 001f3a ffe0 001f3c cfe4 movff 0xfe4, 0xfd8 MOVFF PREINC1, STATUS 001f3e ffd8 001f40 cfe4 movff 0xfe4, 0xfe8 MOVFF PREINC1, WREG 001f42 ffe8 001f44 0010 retfie 0 RETFIE ; ; Starting pCode block S_jgjh__SERIAL_writable code _SERIAL_writable: ; .line 173; serial.c bool SERIAL_writable(SERIAL_handle h) 0021e2 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0021e4 ffe5 0021e6 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0021e8 ffd9 0021ea c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 0021ec ffe5 0021ee c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 0021f0 ffe5 0021f2 0e02 movlw 0x2 MOVLW 0x02 0021f4 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0021f6 f000 0021f8 0e03 movlw 0x3 MOVLW 0x03 0021fa cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0021fc f001 ; .line 175; serial.c if(h==0) 0021fe 5000 movf 0, 0, 0 MOVF r0x00, W 002200 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 002202 e109 bnz 0x2216 BNZ _00389_DS_ ; .line 177; serial.c if(usart_busy()) 002204 eceb call 0x23d6, 0 CALL _usart_busy 002206 f011 002208 6e00 movwf 0, 0 MOVWF r0x00 00220a 5000 movf 0, 0, 0 MOVF r0x00, W 00220c e002 bz 0x2212 BZ _00386_DS_ ; .line 179; serial.c return 0; // not writable 00220e 6ae8 clrf 0xe8, 0 CLRF WREG 002210 d003 bra 0x2218 BRA _00390_DS_ _00386_DS_: ; .line 183; serial.c return 1; // writable 002212 0e01 movlw 0x1 MOVLW 0x01 002214 d001 bra 0x2218 BRA _00390_DS_ _00389_DS_: ; .line 187; serial.c return 0; 002216 6ae8 clrf 0xe8, 0 CLRF WREG _00390_DS_: 002218 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00221a f001 00221c cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 00221e f000 002220 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002222 ffd9 002224 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__SERIAL_readable code _SERIAL_readable: ; .line 155; serial.c bool SERIAL_readable(SERIAL_handle h) 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 0e02 movlw 0x2 MOVLW 0x02 002156 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 002158 f000 00215a 0e03 movlw 0x3 MOVLW 0x03 00215c cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00215e f001 ; .line 157; serial.c if(h == 0) //uart 002160 5000 movf 0, 0, 0 MOVF r0x00, W 002162 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 002164 e106 bnz 0x2172 BNZ _00366_DS_ ; .line 159; serial.c if(PIR1bits.RCIF)return 1; 002166 aa9e btfss 0x9e, 0x5, 0 BTFSS _PIR1bits, 5 002168 d002 bra 0x216e BRA _00363_DS_ 00216a 0e01 movlw 0x1 MOVLW 0x01 00216c d00f bra 0x218c BRA _00372_DS_ _00363_DS_: ; .line 160; serial.c else return 0; 00216e 6ae8 clrf 0xe8, 0 CLRF WREG 002170 d00d bra 0x218c BRA _00372_DS_ _00366_DS_: ; .line 162; serial.c if(h==1) //SPI 002172 5000 movf 0, 0, 0 MOVF r0x00, W 002174 0a01 xorlw 0x1 XORLW 0x01 002176 e102 bnz 0x217c BNZ _00378_DS_ 002178 5001 movf 0x1, 0, 0 MOVF r0x01, W 00217a e001 bz 0x217e BZ _00379_DS_ _00378_DS_: 00217c d006 bra 0x218a BRA _00371_DS_ _00379_DS_: ; .line 164; serial.c if(SSPSTAT & 0x01) return 1; 00217e a0c7 btfss 0xc7, 0, 0 BTFSS _SSPSTAT, 0 002180 d002 bra 0x2186 BRA _00368_DS_ 002182 0e01 movlw 0x1 MOVLW 0x01 002184 d003 bra 0x218c BRA _00372_DS_ _00368_DS_: ; .line 165; serial.c else return 0; 002186 6ae8 clrf 0xe8, 0 CLRF WREG 002188 d001 bra 0x218c BRA _00372_DS_ _00371_DS_: ; .line 168; serial.c return 0; 00218a 6ae8 clrf 0xe8, 0 CLRF WREG _00372_DS_: 00218c cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00218e f001 002190 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 002192 f000 002194 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002196 ffd9 002198 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__SERIAL_write code _SERIAL_write: ; .line 142; serial.c void SERIAL_write(SERIAL_handle h,SERIAL_datatype *t, int n) 001990 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001992 ffe5 001994 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001996 ffd9 001998 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00199a ffe5 00199c c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 00199e ffe5 0019a0 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 0019a2 ffe5 0019a4 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 0019a6 ffe5 0019a8 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 0019aa ffe5 0019ac c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 0019ae ffe5 0019b0 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 0019b2 ffe5 0019b4 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0019b6 ffe5 0019b8 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 0019ba ffe5 0019bc c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 0019be ffe5 0019c0 c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 0019c2 ffe5 0019c4 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 0019c6 ffe5 0019c8 0e02 movlw 0x2 MOVLW 0x02 0019ca cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0019cc f000 0019ce 0e03 movlw 0x3 MOVLW 0x03 0019d0 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0019d2 f001 0019d4 0e04 movlw 0x4 MOVLW 0x04 0019d6 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 0019d8 f002 0019da 0e05 movlw 0x5 MOVLW 0x05 0019dc cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 0019de f003 0019e0 0e06 movlw 0x6 MOVLW 0x06 0019e2 cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 0019e4 f004 0019e6 0e07 movlw 0x7 MOVLW 0x07 0019e8 cfdb movff 0xfdb, 0x5 MOVFF PLUSW2, r0x05 0019ea f005 0019ec 0e08 movlw 0x8 MOVLW 0x08 0019ee cfdb movff 0xfdb, 0x6 MOVFF PLUSW2, r0x06 0019f0 f006 ; .line 146; serial.c if(h==0 || h==1) // will spi pose a problem by overwriting previous data?. 0019f2 5000 movf 0, 0, 0 MOVF r0x00, W 0019f4 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 0019f6 e006 bz 0x1a04 BZ _00353_DS_ 0019f8 5000 movf 0, 0, 0 MOVF r0x00, W 0019fa 0a01 xorlw 0x1 XORLW 0x01 0019fc e102 bnz 0x1a02 BNZ _00355_DS_ 0019fe 5001 movf 0x1, 0, 0 MOVF r0x01, W 001a00 e001 bz 0x1a04 BZ _00353_DS_ _00355_DS_: 001a02 d02d bra 0x1a5e BRA _00349_DS_ _00353_DS_: ; .line 148; serial.c for( i = 0; ibaud) 000dc8 c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 000dca ffe9 000dcc c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 000dce fff3 000dd0 5004 movf 0x4, 0, 0 MOVF r0x04, W 000dd2 ec2f call 0x225e, 0 CALL __gptrget2 000dd4 f011 000dd6 6e05 movwf 0x5, 0 MOVWF r0x05 000dd8 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000dda f006 000ddc 0e00 movlw 0 MOVLW 0x00 000dde 5c06 subwf 0x6, 0, 0 SUBWF r0x06, W 000de0 e102 bnz 0xde6 BNZ _00298_DS_ 000de2 0e0a movlw 0xa MOVLW 0x0a 000de4 5c05 subwf 0x5, 0, 0 SUBWF r0x05, W _00298_DS_: 000de6 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000de8 d057 bra 0xe98 BRA _00283_DS_ 000dea c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 000dec ffe5 000dee c00e movff 0xe, 0xfe5 MOVFF r0x0e, POSTDEC1 000df0 ffe5 000df2 6a0e clrf 0xe, 0 CLRF r0x0e 000df4 3405 rlcf 0x5, 0, 0 RLCF r0x05, W 000df6 360e rlcf 0xe, 0x1, 0 RLCF r0x0e, F 000df8 34e8 rlcf 0xe8, 0, 0 RLCF WREG, W 000dfa 360e rlcf 0xe, 0x1, 0 RLCF r0x0e, F 000dfc 0bfc andlw 0xfc ANDLW 0xfc 000dfe 6e0d movwf 0xd, 0 MOVWF r0x0d 000e00 0e00 movlw 0 MOVLW UPPER(_00299_DS_) 000e02 6efb movwf 0xfb, 0 MOVWF PCLATU 000e04 0e0e movlw 0xe MOVLW HIGH(_00299_DS_) 000e06 6efa movwf 0xfa, 0 MOVWF PCLATH 000e08 0e20 movlw 0x20 MOVLW LOW(_00299_DS_) 000e0a 260d addwf 0xd, 0x1, 0 ADDWF r0x0d, F 000e0c 500e movf 0xe, 0, 0 MOVF r0x0e, W 000e0e 22fa addwfc 0xfa, 0x1, 0 ADDWFC PCLATH, F 000e10 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000e12 2afb incf 0xfb, 0x1, 0 INCF PCLATU, F 000e14 500d movf 0xd, 0, 0 MOVF r0x0d, W 000e16 cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 000e18 f00e 000e1a cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 000e1c f00d 000e1e 6ef9 movwf 0xf9, 0 MOVWF PCL _00299_DS_: 000e20 ef24 goto 0xe48 GOTO _00273_DS_ 000e22 f007 000e24 ef28 goto 0xe50 GOTO _00274_DS_ 000e26 f007 000e28 ef2c goto 0xe58 GOTO _00275_DS_ 000e2a f007 000e2c ef30 goto 0xe60 GOTO _00276_DS_ 000e2e f007 000e30 ef34 goto 0xe68 GOTO _00277_DS_ 000e32 f007 000e34 ef38 goto 0xe70 GOTO _00278_DS_ 000e36 f007 000e38 ef3c goto 0xe78 GOTO _00279_DS_ 000e3a f007 000e3c ef40 goto 0xe80 GOTO _00280_DS_ 000e3e f007 000e40 ef44 goto 0xe88 GOTO _00281_DS_ 000e42 f007 000e44 ef48 goto 0xe90 GOTO _00282_DS_ 000e46 f007 _00273_DS_: ; .line 16; serial.c uart_multiplier = 1; 000e48 0e01 movlw 0x1 MOVLW 0x01 000e4a 6e05 movwf 0x5, 0 MOVWF r0x05 000e4c 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 17; serial.c break; 000e4e d027 bra 0xe9e BRA _00284_DS_ _00274_DS_: ; .line 19; serial.c uart_multiplier = 2; 000e50 0e02 movlw 0x2 MOVLW 0x02 000e52 6e05 movwf 0x5, 0 MOVWF r0x05 000e54 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 20; serial.c break; 000e56 d023 bra 0xe9e BRA _00284_DS_ _00275_DS_: ; .line 22; serial.c uart_multiplier = 4; 000e58 0e04 movlw 0x4 MOVLW 0x04 000e5a 6e05 movwf 0x5, 0 MOVWF r0x05 000e5c 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 23; serial.c break; 000e5e d01f bra 0xe9e BRA _00284_DS_ _00276_DS_: ; .line 25; serial.c uart_multiplier = 8; 000e60 0e08 movlw 0x8 MOVLW 0x08 000e62 6e05 movwf 0x5, 0 MOVWF r0x05 000e64 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 26; serial.c break; 000e66 d01b bra 0xe9e BRA _00284_DS_ _00277_DS_: ; .line 28; serial.c uart_multiplier = 16; 000e68 0e10 movlw 0x10 MOVLW 0x10 000e6a 6e05 movwf 0x5, 0 MOVWF r0x05 000e6c 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 29; serial.c break; 000e6e d017 bra 0xe9e BRA _00284_DS_ _00278_DS_: ; .line 31; serial.c uart_multiplier = 32; 000e70 0e20 movlw 0x20 MOVLW 0x20 000e72 6e05 movwf 0x5, 0 MOVWF r0x05 000e74 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 32; serial.c break; 000e76 d013 bra 0xe9e BRA _00284_DS_ _00279_DS_: ; .line 34; serial.c uart_multiplier = 64; 000e78 0e40 movlw 0x40 MOVLW 0x40 000e7a 6e05 movwf 0x5, 0 MOVWF r0x05 000e7c 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 35; serial.c break; 000e7e d00f bra 0xe9e BRA _00284_DS_ _00280_DS_: ; .line 37; serial.c uart_multiplier = 128; 000e80 0e80 movlw 0x80 MOVLW 0x80 000e82 6e05 movwf 0x5, 0 MOVWF r0x05 000e84 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 38; serial.c break; 000e86 d00b bra 0xe9e BRA _00284_DS_ _00281_DS_: ; .line 40; serial.c uart_multiplier = 192; 000e88 0ec0 movlw 0xc0 MOVLW 0xc0 000e8a 6e05 movwf 0x5, 0 MOVWF r0x05 000e8c 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 41; serial.c break; 000e8e d007 bra 0xe9e BRA _00284_DS_ _00282_DS_: ; .line 43; serial.c uart_multiplier = 256; 000e90 6a05 clrf 0x5, 0 CLRF r0x05 000e92 0e01 movlw 0x1 MOVLW 0x01 000e94 6e06 movwf 0x6, 0 MOVWF r0x06 ; .line 44; serial.c break; 000e96 d003 bra 0xe9e BRA _00284_DS_ _00283_DS_: ; .line 46; serial.c uart_multiplier = 192; 000e98 0ec0 movlw 0xc0 MOVLW 0xc0 000e9a 6e05 movwf 0x5, 0 MOVWF r0x05 000e9c 6a06 clrf 0x6, 0 CLRF r0x06 _00284_DS_: ; .line 51; serial.c BAUDCONbits.BRG16 = 1; // use SPBRGH 000e9e 86b8 bsf 0xb8, 0x3, 0 BSF _BAUDCONbits, 3 ; .line 54; serial.c BAUD_SPBRG = ((CLOCK_FREQ+2*300*uart_multiplier)/(300*uart_multiplier)/4) - 1; 000ea0 5006 movf 0x6, 0, 0 MOVF r0x06, W 000ea2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ea4 5005 movf 0x5, 0, 0 MOVF r0x05, W 000ea6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ea8 0e02 movlw 0x2 MOVLW 0x02 000eaa 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000eac 0e58 movlw 0x58 MOVLW 0x58 000eae 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000eb0 ecfe call 0x1bfc, 0 CALL __mulint 000eb2 f00d 000eb4 6e07 movwf 0x7, 0 MOVWF r0x07 000eb6 cff3 movff 0xff3, 0x8 MOVFF PRODL, r0x08 000eb8 f008 000eba 0e04 movlw 0x4 MOVLW 0x04 000ebc 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000ebe 6a09 clrf 0x9, 0 CLRF r0x09 000ec0 6a0a clrf 0xa, 0 CLRF r0x0a 000ec2 0e2d movlw 0x2d MOVLW 0x2d 000ec4 2608 addwf 0x8, 0x1, 0 ADDWF r0x08, F 000ec6 0e31 movlw 0x31 MOVLW 0x31 000ec8 2209 addwfc 0x9, 0x1, 0 ADDWFC r0x09, F 000eca 0e01 movlw 0x1 MOVLW 0x01 000ecc 220a addwfc 0xa, 0x1, 0 ADDWFC r0x0a, F 000ece 5006 movf 0x6, 0, 0 MOVF r0x06, W 000ed0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ed2 5005 movf 0x5, 0, 0 MOVF r0x05, W 000ed4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ed6 0e01 movlw 0x1 MOVLW 0x01 000ed8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000eda 0e2c movlw 0x2c MOVLW 0x2c 000edc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ede ecfe call 0x1bfc, 0 CALL __mulint 000ee0 f00d 000ee2 6e05 movwf 0x5, 0 MOVWF r0x05 000ee4 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000ee6 f006 000ee8 0e04 movlw 0x4 MOVLW 0x04 000eea 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000eec 6a0b clrf 0xb, 0 CLRF r0x0b 000eee 6a0c clrf 0xc, 0 CLRF r0x0c 000ef0 500c movf 0xc, 0, 0 MOVF r0x0c, W 000ef2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ef4 500b movf 0xb, 0, 0 MOVF r0x0b, W 000ef6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000ef8 5006 movf 0x6, 0, 0 MOVF r0x06, W 000efa 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000efc 5005 movf 0x5, 0, 0 MOVF r0x05, W 000efe 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f00 500a movf 0xa, 0, 0 MOVF r0x0a, W 000f02 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f04 5009 movf 0x9, 0, 0 MOVF r0x09, W 000f06 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f08 5008 movf 0x8, 0, 0 MOVF r0x08, W 000f0a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f0c 5007 movf 0x7, 0, 0 MOVF r0x07, W 000f0e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f10 ec59 call 0x12b2, 0 CALL __divslong 000f12 f009 000f14 6e05 movwf 0x5, 0 MOVWF r0x05 000f16 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000f18 f006 000f1a cff4 movff 0xff4, 0x7 MOVFF PRODH, r0x07 000f1c f007 000f1e cfe9 movff 0xfe9, 0x8 MOVFF FSR0L, r0x08 000f20 f008 000f22 0e08 movlw 0x8 MOVLW 0x08 000f24 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000f26 0e00 movlw 0 MOVLW 0x00 000f28 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f2a 0e00 movlw 0 MOVLW 0x00 000f2c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f2e 0e00 movlw 0 MOVLW 0x00 000f30 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f32 0e04 movlw 0x4 MOVLW 0x04 000f34 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f36 5008 movf 0x8, 0, 0 MOVF r0x08, W 000f38 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f3a 5007 movf 0x7, 0, 0 MOVF r0x07, W 000f3c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f3e 5006 movf 0x6, 0, 0 MOVF r0x06, W 000f40 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f42 5005 movf 0x5, 0, 0 MOVF r0x05, W 000f44 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f46 ec59 call 0x12b2, 0 CALL __divslong 000f48 f009 000f4a 6e05 movwf 0x5, 0 MOVWF r0x05 000f4c cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000f4e f006 000f50 cff4 movff 0xff4, 0x7 MOVFF PRODH, r0x07 000f52 f007 000f54 cfe9 movff 0xfe9, 0x8 MOVFF FSR0L, r0x08 000f56 f008 000f58 0e08 movlw 0x8 MOVLW 0x08 000f5a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000f5c 0eff movlw 0xff MOVLW 0xff 000f5e 2605 addwf 0x5, 0x1, 0 ADDWF r0x05, F 000f60 0eff movlw 0xff MOVLW 0xff 000f62 2206 addwfc 0x6, 0x1, 0 ADDWFC r0x06, F 000f64 0eff movlw 0xff MOVLW 0xff 000f66 2207 addwfc 0x7, 0x1, 0 ADDWFC r0x07, F 000f68 0eff movlw 0xff MOVLW 0xff 000f6a 2208 addwfc 0x8, 0x1, 0 ADDWFC r0x08, F ; .line 60; serial.c USART_BRGH_HIGH, BAUD_SPBRG); 000f6c 5006 movf 0x6, 0, 0 MOVF r0x06, W 000f6e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f70 5005 movf 0x5, 0, 0 MOVF r0x05, W 000f72 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000f74 0e3c movlw 0x3c MOVLW 0x3c 000f76 ec28 call 0x1e50, 0 CALL _usart_open 000f78 f00f 000f7a 0e02 movlw 0x2 MOVLW 0x02 000f7c 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 62; serial.c usart_putc(14); 000f7e 0e0e movlw 0xe MOVLW 0x0e 000f80 ecc0 call 0x2380, 0 CALL _usart_putc 000f82 f011 ; .line 63; serial.c RCSTAbits.SPEN = 1; //enable uart 000f84 8eab bsf 0xab, 0x7, 0 BSF _RCSTAbits, 7 ; .line 64; serial.c RCSTAbits.CREN = 1; // continous receive enable 000f86 88ab bsf 0xab, 0x4, 0 BSF _RCSTAbits, 4 ; .line 65; serial.c usart_putc(15); 000f88 0e0f movlw 0xf MOVLW 0x0f 000f8a ecc0 call 0x2380, 0 CALL _usart_putc 000f8c f011 ; .line 66; serial.c return 1; 000f8e 6af3 clrf 0xf3, 0 CLRF PRODL 000f90 0e01 movlw 0x1 MOVLW 0x01 000f92 d028 bra 0xfe4 BRA _00292_DS_ _00286_DS_: ; .line 72; serial.c if(h==1) // SPI 000f94 5000 movf 0, 0, 0 MOVF r0x00, W 000f96 0a01 xorlw 0x1 XORLW 0x01 000f98 e102 bnz 0xf9e BNZ _00300_DS_ 000f9a 5001 movf 0x1, 0, 0 MOVF r0x01, W 000f9c e001 bz 0xfa0 BZ _00301_DS_ _00300_DS_: 000f9e d020 bra 0xfe0 BRA _00291_DS_ _00301_DS_: ; .line 75; serial.c if(ucon->mstr_slv) 000fa0 0e04 movlw 0x4 MOVLW 0x04 000fa2 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 000fa4 0e00 movlw 0 MOVLW 0x00 000fa6 2203 addwfc 0x3, 0x1, 0 ADDWFC r0x03, F 000fa8 0e00 movlw 0 MOVLW 0x00 000faa 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 000fac c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 000fae ffe9 000fb0 c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 000fb2 fff3 000fb4 5004 movf 0x4, 0, 0 MOVF r0x04, W 000fb6 ec6b call 0x22d6, 0 CALL __gptrget1 000fb8 f011 000fba 6e02 movwf 0x2, 0 MOVWF r0x02 000fbc 5002 movf 0x2, 0, 0 MOVF r0x02, W 000fbe e007 bz 0xfce BZ _00288_DS_ ; .line 78; serial.c TRISCbits.TRISC5 = 0; // serial data out SDO 000fc0 9a94 bcf 0x94, 0x5, 0 BCF _TRISCbits, 5 ; .line 79; serial.c TRISCbits.TRISC4 = 1; //SDI 000fc2 8894 bsf 0x94, 0x4, 0 BSF _TRISCbits, 4 ; .line 80; serial.c TRISCbits.TRISC3 = 0; // SCK 000fc4 9694 bcf 0x94, 0x3, 0 BCF _TRISCbits, 3 ; .line 82; serial.c SSPSTAT = 0; // set data sampled at middle & CKE = 0 000fc6 6ac7 clrf 0xc7, 0 CLRF _SSPSTAT ; .line 83; serial.c SSPCON1 = 0x21; // Master mode Fosc/16, enable SPI 000fc8 0e21 movlw 0x21 MOVLW 0x21 000fca 6ec6 movwf 0xc6, 0 MOVWF _SSPCON1 000fcc d006 bra 0xfda BRA _00289_DS_ _00288_DS_: ; .line 88; serial.c TRISCbits.TRISC5 = 0; // serial data out SDO 000fce 9a94 bcf 0x94, 0x5, 0 BCF _TRISCbits, 5 ; .line 89; serial.c TRISCbits.TRISC4 = 1; //SDI 000fd0 8894 bsf 0x94, 0x4, 0 BSF _TRISCbits, 4 ; .line 90; serial.c TRISCbits.TRISC3 = 1; // SCK set as input for slave 000fd2 8694 bsf 0x94, 0x3, 0 BSF _TRISCbits, 3 ; .line 92; serial.c SSPSTAT = 0; // set data sampled at middle & CKE = 0 000fd4 6ac7 clrf 0xc7, 0 CLRF _SSPSTAT ; .line 93; serial.c SSPCON1 = 0x25; // Slave mode,SS disabled enable SPI 000fd6 0e25 movlw 0x25 MOVLW 0x25 000fd8 6ec6 movwf 0xc6, 0 MOVWF _SSPCON1 _00289_DS_: ; .line 96; serial.c return 1; 000fda 6af3 clrf 0xf3, 0 CLRF PRODL 000fdc 0e01 movlw 0x1 MOVLW 0x01 000fde d002 bra 0xfe4 BRA _00292_DS_ _00291_DS_: ; .line 102; serial.c return 0; // not able to find the correct serial channel 000fe0 6af3 clrf 0xf3, 0 CLRF PRODL 000fe2 6ae8 clrf 0xe8, 0 CLRF WREG _00292_DS_: 000fe4 cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 000fe6 f00c 000fe8 cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 000fea f00b 000fec cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 000fee f00a 000ff0 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 000ff2 f009 000ff4 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 000ff6 f008 000ff8 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 000ffa f007 000ffc cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 000ffe f006 001000 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 001002 f005 001004 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 001006 f004 001008 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 00100a f003 00100c cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 00100e f002 001010 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 001012 f001 001014 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001016 f000 001018 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 00101a ffd9 00101c 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__HAL_write_eeprom_byte code _HAL_write_eeprom_byte: ; .line 14; eeprom.c void HAL_write_eeprom_byte(uint8_t addr, uint8_t dat) 001f46 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001f48 ffe5 001f4a cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001f4c ffd9 001f4e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001f50 ffe5 001f52 0e02 movlw 0x2 MOVLW 0x02 001f54 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001f56 f000 001f58 0e03 movlw 0x3 MOVLW 0x03 001f5a cfdb movff 0xfdb, 0xfa8 MOVFF PLUSW2, _EEDATA 001f5c ffa8 ; .line 17; eeprom.c EEADR = addr; 001f5e c000 movff 0, 0xfa9 MOVFF r0x00, _EEADR 001f60 ffa9 ; .line 19; eeprom.c EECON1bits.EEPGD = 0; 001f62 9ea6 bcf 0xa6, 0x7, 0 BCF _EECON1bits, 7 ; .line 20; eeprom.c EECON1bits.CFGS = 0; 001f64 9ca6 bcf 0xa6, 0x6, 0 BCF _EECON1bits, 6 ; .line 21; eeprom.c EECON1bits.WREN = 1; // enable writes to data EEPROM 001f66 84a6 bsf 0xa6, 0x2, 0 BSF _EECON1bits, 2 ; .line 22; eeprom.c INTCONbits.GIE = 0; // disable interrupts 001f68 9ef2 bcf 0xf2, 0x7, 0 BCF _INTCONbits, 7 ; .line 23; eeprom.c EECON2 = 0x55; 001f6a 0e55 movlw 0x55 MOVLW 0x55 001f6c 6ea7 movwf 0xa7, 0 MOVWF _EECON2 ; .line 24; eeprom.c EECON2 = 0x0AA; 001f6e 0eaa movlw 0xaa MOVLW 0xaa 001f70 6ea7 movwf 0xa7, 0 MOVWF _EECON2 ; .line 25; eeprom.c EECON1bits.WR = 1; // start writing 001f72 82a6 bsf 0xa6, 0x1, 0 BSF _EECON1bits, 1 _00257_DS_: ; .line 26; eeprom.c while(EECON1bits.WR){ 001f74 a2a6 btfss 0xa6, 0x1, 0 BTFSS _EECON1bits, 1 001f76 d002 bra 0x1f7c BRA _00259_DS_ 001f78 0000 nop nop 001f7a d7fc bra 0x1f74 BRA _00257_DS_ _00259_DS_: ; .line 28; eeprom.c if(EECON1bits.WRERR){ 001f7c a6a6 btfss 0xa6, 0x3, 0 BTFSS _EECON1bits, 3 001f7e d013 bra 0x1fa6 BRA _00267_DS_ ; .line 29; eeprom.c usart_putc('E');// TODO:just for debugging needs to be taken out later 001f80 0e45 movlw 0x45 MOVLW 0x45 001f82 ecc0 call 0x2380, 0 CALL _usart_putc 001f84 f011 _00260_DS_: ; .line 30; eeprom.c while(usart_busy()); 001f86 eceb call 0x23d6, 0 CALL _usart_busy 001f88 f011 001f8a 6e00 movwf 0, 0 MOVWF r0x00 001f8c 5000 movf 0, 0, 0 MOVF r0x00, W 001f8e e1fb bnz 0x1f86 BNZ _00260_DS_ ; .line 31; eeprom.c usart_putc('R'); 001f90 0e52 movlw 0x52 MOVLW 0x52 001f92 ecc0 call 0x2380, 0 CALL _usart_putc 001f94 f011 _00263_DS_: ; .line 32; eeprom.c while(usart_busy()); 001f96 eceb call 0x23d6, 0 CALL _usart_busy 001f98 f011 001f9a 6e00 movwf 0, 0 MOVWF r0x00 001f9c 5000 movf 0, 0, 0 MOVF r0x00, W 001f9e e1fb bnz 0x1f96 BNZ _00263_DS_ ; .line 33; eeprom.c usart_putc('R'); 001fa0 0e52 movlw 0x52 MOVLW 0x52 001fa2 ecc0 call 0x2380, 0 CALL _usart_putc 001fa4 f011 _00267_DS_: ; .line 36; eeprom.c EECON1bits.WREN = 0; 001fa6 94a6 bcf 0xa6, 0x2, 0 BCF _EECON1bits, 2 ; .line 37; eeprom.c INTCONbits.GIE = 1; // enable interrupts 001fa8 8ef2 bsf 0xf2, 0x7, 0 BSF _INTCONbits, 7 001faa cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001fac f000 001fae cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001fb0 ffd9 001fb2 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__HAL_read_eeprom_byte code _HAL_read_eeprom_byte: ; .line 4; eeprom.c uint8_t HAL_read_eeprom_byte(uint8_t addr) 0022f8 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0022fa ffe5 0022fc cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0022fe ffd9 002300 0e02 movlw 0x2 MOVLW 0x02 002302 cfdb movff 0xfdb, 0xfa9 MOVFF PLUSW2, _EEADR 002304 ffa9 ; .line 7; eeprom.c EECON1bits.CFGS = 0; 002306 9ca6 bcf 0xa6, 0x6, 0 BCF _EECON1bits, 6 ; .line 8; eeprom.c EECON1bits.EEPGD = 0; 002308 9ea6 bcf 0xa6, 0x7, 0 BCF _EECON1bits, 7 ; .line 9; eeprom.c EECON1bits.RD = 1; 00230a 80a6 bsf 0xa6, 0, 0 BSF _EECON1bits, 0 ; .line 10; eeprom.c return EEDATA; 00230c 50a8 movf 0xa8, 0, 0 MOVF _EEDATA, W 00230e cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 002310 ffd9 002312 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__EEPROM_memset code _EEPROM_memset: ; .line 29; eeprom.h static uint8_t EEPROM_memset( uint8_t addr, void *src, uint8_t len ) { 001b5c cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001b5e ffe5 001b60 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001b62 ffd9 001b64 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001b66 ffe5 001b68 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 001b6a ffe5 001b6c c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001b6e ffe5 001b70 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001b72 ffe5 001b74 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001b76 ffe5 001b78 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 001b7a ffe5 001b7c c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 001b7e ffe5 001b80 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001b82 ffe5 001b84 0e02 movlw 0x2 MOVLW 0x02 001b86 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001b88 f000 001b8a 0e03 movlw 0x3 MOVLW 0x03 001b8c cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 001b8e f001 001b90 0e04 movlw 0x4 MOVLW 0x04 001b92 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001b94 f002 001b96 0e05 movlw 0x5 MOVLW 0x05 001b98 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 001b9a f003 001b9c 0e06 movlw 0x6 MOVLW 0x06 001b9e cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 001ba0 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 ec2f call 0x225e, 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 ec6b call 0x22d6, 0 CALL __gptrget1 001908 f011 00190a 6e00 movwf 0, 0 MOVWF r0x00 ; .line 78; 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 80; 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 _00187_DS_ ; .line 81; can.c CAN_status1.tx++; 001942 c097 movff 0x97, 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 6f97 movwf 0x97, 0x1 MOVWF _CAN_status1, B 00194e d006 bra 0x195c BRA _00188_DS_ _00187_DS_: ; .line 83; can.c CAN_status1.txError++; 001950 c098 movff 0x98, 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 6f98 movwf 0x98, 0x1 MOVWF (_CAN_status1 + 1), B _00188_DS_: ; .line 85; 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_jgjh__CAN_recv code _CAN_recv: ; .line 43; can.c int CAN_recv( struct CAN_msg *msg ) { 001460 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001462 ffe5 001464 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001466 ffd9 001468 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00146a ffe5 00146c c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 00146e ffe5 001470 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001472 ffe5 001474 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001476 ffe5 001478 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 00147a ffe5 00147c c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 00147e ffe5 001480 c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 001482 ffe5 001484 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001486 ffe5 001488 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 00148a ffe5 00148c c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 00148e ffe5 001490 c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 001492 ffe5 001494 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 001496 ffe5 001498 c00c movff 0xc, 0xfe5 MOVFF r0x0c, POSTDEC1 00149a ffe5 00149c c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 00149e ffe5 0014a0 c00e movff 0xe, 0xfe5 MOVFF r0x0e, POSTDEC1 0014a2 ffe5 0014a4 0e02 movlw 0x2 MOVLW 0x02 0014a6 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0014a8 f000 0014aa 0e03 movlw 0x3 MOVLW 0x03 0014ac cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0014ae f001 0014b0 0e04 movlw 0x4 MOVLW 0x04 0014b2 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 0014b4 f002 ; .line 55; can.c if (!ECANReceiveMessage ((unsigned long *)&temp, msg->buf, &msg->len, &flags)) 0014b6 0e00 movlw 0 MOVLW HIGH(_CAN_recv_temp_1_1) 0014b8 6e04 movwf 0x4, 0 MOVWF r0x04 0014ba 0e9c movlw 0x9c MOVLW LOW(_CAN_recv_temp_1_1) 0014bc 6e03 movwf 0x3, 0 MOVWF r0x03 0014be 0e80 movlw 0x80 MOVLW 0x80 0014c0 6e05 movwf 0x5, 0 MOVWF r0x05 0014c2 5000 movf 0, 0, 0 MOVF r0x00, W 0014c4 0f03 addlw 0x3 ADDLW 0x03 0014c6 6e06 movwf 0x6, 0 MOVWF r0x06 0014c8 0e00 movlw 0 MOVLW 0x00 0014ca 2001 addwfc 0x1, 0, 0 ADDWFC r0x01, W 0014cc 6e07 movwf 0x7, 0 MOVWF r0x07 0014ce 0e00 movlw 0 MOVLW 0x00 0014d0 2002 addwfc 0x2, 0, 0 ADDWFC r0x02, W 0014d2 6e08 movwf 0x8, 0 MOVWF r0x08 0014d4 5000 movf 0, 0, 0 MOVF r0x00, W 0014d6 0f02 addlw 0x2 ADDLW 0x02 0014d8 6e09 movwf 0x9, 0 MOVWF r0x09 0014da 0e00 movlw 0 MOVLW 0x00 0014dc 2001 addwfc 0x1, 0, 0 ADDWFC r0x01, W 0014de 6e0a movwf 0xa, 0 MOVWF r0x0a 0014e0 0e00 movlw 0 MOVLW 0x00 0014e2 2002 addwfc 0x2, 0, 0 ADDWFC r0x02, W 0014e4 6e0b movwf 0xb, 0 MOVWF r0x0b 0014e6 0e00 movlw 0 MOVLW HIGH(_CAN_recv_flags_1_1) 0014e8 6e0d movwf 0xd, 0 MOVWF r0x0d 0014ea 0eac movlw 0xac MOVLW LOW(_CAN_recv_flags_1_1) 0014ec 6e0c movwf 0xc, 0 MOVWF r0x0c 0014ee 0e80 movlw 0x80 MOVLW 0x80 0014f0 6e0e movwf 0xe, 0 MOVWF r0x0e 0014f2 500e movf 0xe, 0, 0 MOVF r0x0e, W 0014f4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0014f6 500d movf 0xd, 0, 0 MOVF r0x0d, W 0014f8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0014fa 500c movf 0xc, 0, 0 MOVF r0x0c, W 0014fc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0014fe 500b movf 0xb, 0, 0 MOVF r0x0b, W 001500 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001502 500a movf 0xa, 0, 0 MOVF r0x0a, W 001504 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001506 5009 movf 0x9, 0, 0 MOVF r0x09, W 001508 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00150a 5008 movf 0x8, 0, 0 MOVF r0x08, W 00150c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00150e 5007 movf 0x7, 0, 0 MOVF r0x07, W 001510 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001512 5006 movf 0x6, 0, 0 MOVF r0x06, W 001514 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001516 5005 movf 0x5, 0, 0 MOVF r0x05, W 001518 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00151a 5004 movf 0x4, 0, 0 MOVF r0x04, W 00151c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00151e 5003 movf 0x3, 0, 0 MOVF r0x03, W 001520 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001522 ec06 call 0xc, 0 CALL _ECANReceiveMessage 001524 f000 001526 6e03 movwf 0x3, 0 MOVWF r0x03 001528 0e0c movlw 0xc MOVLW 0x0c 00152a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00152c 5003 movf 0x3, 0, 0 MOVF r0x03, W 00152e e103 bnz 0x1536 BNZ _00170_DS_ ; .line 56; can.c return 0; 001530 6af3 clrf 0xf3, 0 CLRF PRODL 001532 6ae8 clrf 0xe8, 0 CLRF WREG 001534 d042 bra 0x15ba BRA _00175_DS_ _00170_DS_: 001536 0100 movlb 0 BANKSEL _CAN_recv_temp_1_1 ; .line 57; can.c msg->ID = (uint16_t) temp; 001538 519c movf 0x9c, 0, 0x1 MOVF _CAN_recv_temp_1_1, W, B 00153a 6e03 movwf 0x3, 0 MOVWF r0x03 00153c 0100 movlb 0 BANKSEL (_CAN_recv_temp_1_1 + 1) 00153e 519d movf 0x9d, 0, 0x1 MOVF (_CAN_recv_temp_1_1 + 1), W, B 001540 6e04 movwf 0x4, 0 MOVWF r0x04 001542 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001544 ffe5 001546 c004 movff 0x4, 0xff4 MOVFF r0x04, PRODH 001548 fff4 00154a c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 00154c ffe9 00154e c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001550 fff3 001552 5002 movf 0x2, 0, 0 MOVF r0x02, W 001554 eca2 call 0x2344, 0 CALL __gptrput2 001556 f011 ; .line 58; can.c CAN_status1.rx ++; 001558 c099 movff 0x99, 0x3 MOVFF (_CAN_status1 + 2), r0x03 00155a f003 00155c 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 00155e 5003 movf 0x3, 0, 0 MOVF r0x03, W 001560 0100 movlb 0 BANKSEL (_CAN_status1 + 2) 001562 6f99 movwf 0x99, 0x1 MOVWF (_CAN_status1 + 2), B 001564 0100 movlb 0 BANKSEL _CAN_recv_flags_1_1 ; .line 60; can.c if (flags & (ECAN_RX_XTD_FRAME | ECAN_RX_RTR_FRAME)) { // don't accept these strange things. 001566 51ac movf 0xac, 0, 0x1 MOVF _CAN_recv_flags_1_1, W, B 001568 0b60 andlw 0x60 ANDLW 0x60 00156a e009 bz 0x157e BZ _00172_DS_ ; .line 61; can.c CAN_status1.exotic++; 00156c c09b movff 0x9b, 0x3 MOVFF (_CAN_status1 + 4), r0x03 00156e f003 001570 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 001572 5003 movf 0x3, 0, 0 MOVF r0x03, W 001574 0100 movlb 0 BANKSEL (_CAN_status1 + 4) 001576 6f9b movwf 0x9b, 0x1 MOVWF (_CAN_status1 + 4), B ; .line 62; can.c return -1; 001578 68f3 setf 0xf3, 0 SETF PRODL 00157a 68e8 setf 0xe8, 0 SETF WREG 00157c d01e bra 0x15ba BRA _00175_DS_ _00172_DS_: 00157e 0100 movlb 0 BANKSEL _CAN_recv_flags_1_1 ; .line 64; can.c if (flags & ECAN_RX_OVERFLOW) { // it's not clear what this flag means, but count it. 001580 a7ac btfss 0xac, 0x3, 0x1 BTFSS _CAN_recv_flags_1_1, 3, B 001582 d009 bra 0x1596 BRA _00174_DS_ ; .line 65; can.c CAN_status1.overflow++; 001584 c09a movff 0x9a, 0x3 MOVFF (_CAN_status1 + 3), r0x03 001586 f003 001588 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 00158a 5003 movf 0x3, 0, 0 MOVF r0x03, W 00158c 0100 movlb 0 BANKSEL (_CAN_status1 + 3) 00158e 6f9a movwf 0x9a, 0x1 MOVWF (_CAN_status1 + 3), B ; .line 66; can.c return -2; 001590 68f3 setf 0xf3, 0 SETF PRODL 001592 0efe movlw 0xfe MOVLW 0xfe 001594 d012 bra 0x15ba BRA _00175_DS_ _00174_DS_: ; .line 69; can.c return msg->len; 001596 0e02 movlw 0x2 MOVLW 0x02 001598 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 00159a 0e00 movlw 0 MOVLW 0x00 00159c 2201 addwfc 0x1, 0x1, 0 ADDWFC r0x01, F 00159e 0e00 movlw 0 MOVLW 0x00 0015a0 2202 addwfc 0x2, 0x1, 0 ADDWFC r0x02, F 0015a2 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0015a4 ffe9 0015a6 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0015a8 fff3 0015aa 5002 movf 0x2, 0, 0 MOVF r0x02, W 0015ac ec6b call 0x22d6, 0 CALL __gptrget1 0015ae f011 0015b0 6e00 movwf 0, 0 MOVWF r0x00 0015b2 6a01 clrf 0x1, 0 CLRF r0x01 0015b4 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0015b6 fff3 0015b8 5000 movf 0, 0, 0 MOVF r0x00, W _00175_DS_: 0015ba cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 0015bc f00e 0015be cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 0015c0 f00d 0015c2 cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 0015c4 f00c 0015c6 cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 0015c8 f00b 0015ca cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 0015cc f00a 0015ce cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 0015d0 f009 0015d2 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 0015d4 f008 0015d6 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 0015d8 f007 0015da cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 0015dc f006 0015de cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 0015e0 f005 0015e2 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 0015e4 f004 0015e6 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 0015e8 f003 0015ea cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0015ec f002 0015ee cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0015f0 f001 0015f2 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0015f4 f000 0015f6 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0015f8 ffd9 0015fa 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__CAN_init code _CAN_init: ; .line 30; can.c int CAN_init( void ) { 001fb4 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001fb6 ffe5 001fb8 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001fba ffd9 001fbc c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001fbe ffe5 001fc0 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 001fc2 ffe5 001fc4 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001fc6 ffe5 001fc8 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001fca ffe5 ; .line 35; can.c ECANInitialize(); 001fcc ece5 call 0x1dca, 0 CALL _ECANInitialize 001fce f00e ; .line 37; can.c for (k = 0; k> 8); 0021be 5001 movf 0x1, 0, 0 MOVF r0x01, W 0021c0 6e02 movwf 0x2, 0 MOVWF r0x02 0021c2 6a03 clrf 0x3, 0 CLRF r0x03 0021c4 5002 movf 0x2, 0, 0 MOVF r0x02, W 0021c6 6ed7 movwf 0xd7, 0 MOVWF _TMR0H ; .line 33; timer.c TMR0L = (unsigned char)(v); 0021c8 5000 movf 0, 0, 0 MOVF r0x00, W 0021ca 6ed6 movwf 0xd6, 0 MOVWF _TMR0L 0021cc cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 0021ce f003 0021d0 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0021d2 f002 0021d4 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0021d6 f001 0021d8 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0021da f000 0021dc cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0021de ffd9 0021e0 0012 return 0 RETURN ; ; Starting pCode block S_jgjh__TIMER_setup code _TIMER_setup: ; .line 3; timer.c bool TIMER_setup( TIMER_handle t, struct TIMER_config *cfg ) 001a94 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001a96 ffe5 001a98 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001a9a ffd9 001a9c c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001a9e ffe5 001aa0 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 001aa2 ffe5 001aa4 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001aa6 ffe5 001aa8 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001aaa ffe5 001aac 0e02 movlw 0x2 MOVLW 0x02 001aae cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001ab0 f000 001ab2 0e03 movlw 0x3 MOVLW 0x03 001ab4 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 001ab6 f001 001ab8 0e04 movlw 0x4 MOVLW 0x04 001aba cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001abc f002 001abe 0e05 movlw 0x5 MOVLW 0x05 001ac0 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 001ac2 f003 ; .line 5; timer.c switch (t) { 001ac4 0e03 movlw 0x3 MOVLW 0x03 001ac6 5c00 subwf 0, 0, 0 SUBWF r0x00, W 001ac8 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001aca d03c bra 0x1b44 BRA _00111_DS_ 001acc c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001ace ffe5 001ad0 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 001ad2 ffe5 001ad4 6a05 clrf 0x5, 0 CLRF r0x05 001ad6 3400 rlcf 0, 0, 0 RLCF r0x00, W 001ad8 3605 rlcf 0x5, 0x1, 0 RLCF r0x05, F 001ada 34e8 rlcf 0xe8, 0, 0 RLCF WREG, W 001adc 3605 rlcf 0x5, 0x1, 0 RLCF r0x05, F 001ade 0bfc andlw 0xfc ANDLW 0xfc 001ae0 6e04 movwf 0x4, 0 MOVWF r0x04 001ae2 0e00 movlw 0 MOVLW UPPER(_00117_DS_) 001ae4 6efb movwf 0xfb, 0 MOVWF PCLATU 001ae6 0e1b movlw 0x1b MOVLW HIGH(_00117_DS_) 001ae8 6efa movwf 0xfa, 0 MOVWF PCLATH 001aea 0e02 movlw 0x2 MOVLW LOW(_00117_DS_) 001aec 2604 addwf 0x4, 0x1, 0 ADDWF r0x04, F 001aee 5005 movf 0x5, 0, 0 MOVF r0x05, W 001af0 22fa addwfc 0xfa, 0x1, 0 ADDWFC PCLATH, F 001af2 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001af4 2afb incf 0xfb, 0x1, 0 INCF PCLATU, F 001af6 5004 movf 0x4, 0, 0 MOVF r0x04, W 001af8 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 001afa f005 001afc cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 001afe f004 001b00 6ef9 movwf 0xf9, 0 MOVWF PCL _00117_DS_: 001b02 ef87 goto 0x1b0e GOTO _00105_DS_ 001b04 f00d 001b06 efa2 goto 0x1b44 GOTO _00111_DS_ 001b08 f00d 001b0a efa2 goto 0x1b44 GOTO _00111_DS_ 001b0c f00d _00105_DS_: ; .line 7; timer.c if(cfg->scaler <=7) 001b0e 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 001b10 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001b12 2a02 incf 0x2, 0x1, 0 INCF r0x02, F 001b14 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001b16 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 001b18 c001 movff 0x1, 0xfe9 MOVFF r0x01, FSR0L 001b1a ffe9 001b1c c002 movff 0x2, 0xff3 MOVFF r0x02, PRODL 001b1e fff3 001b20 5003 movf 0x3, 0, 0 MOVF r0x03, W 001b22 ec6b call 0x22d6, 0 CALL __gptrget1 001b24 f011 001b26 6e00 movwf 0, 0 MOVWF r0x00 001b28 0e08 movlw 0x8 MOVLW 0x08 001b2a 5c00 subwf 0, 0, 0 SUBWF r0x00, W 001b2c e209 bc 0x1b40 BC _00107_DS_ ; .line 9; timer.c T0CON= 0; /* clear all bits*/ 001b2e 6ad5 clrf 0xd5, 0 CLRF _T0CON ; .line 12; timer.c T0CON = T0CON | 0x80 | (cfg->scaler); 001b30 0e80 movlw 0x80 MOVLW 0x80 001b32 10d5 iorwf 0xd5, 0, 0 IORWF _T0CON, W 001b34 6e01 movwf 0x1, 0 MOVWF r0x01 001b36 5000 movf 0, 0, 0 MOVF r0x00, W 001b38 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 001b3a 6ed5 movwf 0xd5, 0 MOVWF _T0CON ; .line 13; timer.c return 1; 001b3c 0e01 movlw 0x1 MOVLW 0x01 001b3e d003 bra 0x1b46 BRA _00112_DS_ _00107_DS_: ; .line 16; timer.c return 0; 001b40 6ae8 clrf 0xe8, 0 CLRF WREG ; .line 20; timer.c break; 001b42 d001 bra 0x1b46 BRA _00112_DS_ _00111_DS_: ; .line 27; timer.c return 0; 001b44 6ae8 clrf 0xe8, 0 CLRF WREG _00112_DS_: 001b46 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 001b48 f003 001b4a cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 001b4c f002 001b4e cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 001b50 f001 001b52 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 001b54 f000 001b56 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001b58 ffd9 001b5a 0012 return 0 RETURN ; Statistics: ; code size: 4480 (0x1180) bytes ( 3.42%) ; 2240 (0x08c0) words ; udata size: 24 (0x0018) bytes ( 0.62%) ; access size: 18 (0x0012) bytes end ;-------------------------------------------------------- ; File Created by SDCC : free open source ANSI-C Compiler ; Version 3.0.1 #6101 (Jan 12 2011) (Linux) ; This file was generated Sun Jan 16 02:33:30 2011 ;-------------------------------------------------------- ; 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000b2e f011 ; .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 ecae call 0x235c, 0 CALL __gptrput1 000b5a f011 ; .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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000b92 f011 ; .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 ecae call 0x235c, 0 CALL __gptrput1 000bb6 f011 ; .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 ecae call 0x235c, 0 CALL __gptrput1 000bda f011 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000c18 f011 ; .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 ecae call 0x235c, 0 CALL __gptrput1 000c44 f011 ; .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 ec6b call 0x22d6, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000c8a f011 ; ;;!!! 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000cbc f011 ; .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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000cfa f011 ; .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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000d26 f011 _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, 00101e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001020 ffe5 001022 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001024 ffd9 001026 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 001028 ffe5 00102a c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 00102c ffe5 00102e c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 001030 ffe5 001032 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001034 ffe5 001036 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001038 ffe5 00103a c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 00103c ffe5 00103e c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 001040 ffe5 001042 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001044 ffe5 001046 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 001048 ffe5 00104a c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 00104c ffe5 00104e c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 001050 ffe5 001052 0e02 movlw 0x2 MOVLW 0x02 001054 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 001056 f000 001058 0e03 movlw 0x3 MOVLW 0x03 00105a cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00105c f001 00105e 0e04 movlw 0x4 MOVLW 0x04 001060 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 001062 f002 001064 0e05 movlw 0x5 MOVLW 0x05 001066 cfdb movff 0xfdb, 0xa0 MOVFF PLUSW2, __CANIDToRegs_val_1_1 001068 f0a0 00106a 0e06 movlw 0x6 MOVLW 0x06 00106c cfdb movff 0xfdb, 0xa1 MOVFF PLUSW2, (__CANIDToRegs_val_1_1 + 1) 00106e f0a1 001070 0e07 movlw 0x7 MOVLW 0x07 001072 cfdb movff 0xfdb, 0xa2 MOVFF PLUSW2, (__CANIDToRegs_val_1_1 + 2) 001074 f0a2 001076 0e08 movlw 0x8 MOVLW 0x08 001078 cfdb movff 0xfdb, 0xa3 MOVFF PLUSW2, (__CANIDToRegs_val_1_1 + 3) 00107a f0a3 00107c 0e09 movlw 0x9 MOVLW 0x09 00107e cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 001080 f003 ; .line 1098; ecan.c Value = (CAN_MESSAGE_ID*)&val; 001082 0e00 movlw 0 MOVLW HIGH(__CANIDToRegs_val_1_1) 001084 6e05 movwf 0x5, 0 MOVWF r0x05 001086 0ea0 movlw 0xa0 MOVLW LOW(__CANIDToRegs_val_1_1) 001088 6e04 movwf 0x4, 0 MOVWF r0x04 00108a 0e80 movlw 0x80 MOVLW 0x80 00108c 6e06 movwf 0x6, 0 MOVWF r0x06 ; .line 1100; ecan.c if ( type == ECAN_MSG_STD ) 00108e 5003 movf 0x3, 0, 0 MOVF r0x03, W 001090 a4d8 btfss 0xd8, 0x2, 0 BTFSS STATUS, 2 001092 d050 bra 0x1134 BRA _00219_DS_ ; .line 1103; ecan.c *ptr = Value->BYTES.BYTE_1 >> 3; // Copy SID<7:3> to SIDH<4:0> 001094 c004 movff 0x4, 0xfe9 MOVFF r0x04, FSR0L 001096 ffe9 001098 c005 movff 0x5, 0xff3 MOVFF r0x05, PRODL 00109a fff3 00109c 5006 movf 0x6, 0, 0 MOVF r0x06, W 00109e ec6b call 0x22d6, 0 CALL __gptrget1 0010a0 f011 0010a2 6e03 movwf 0x3, 0 MOVWF r0x03 0010a4 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 0010a6 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 0010a8 0b1f andlw 0x1f ANDLW 0x1f 0010aa 6e07 movwf 0x7, 0 MOVWF r0x07 0010ac c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0010ae ffe5 0010b0 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0010b2 ffe9 0010b4 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0010b6 fff3 0010b8 5002 movf 0x2, 0, 0 MOVF r0x02, W 0010ba ecae call 0x235c, 0 CALL __gptrput1 0010bc f011 ; .line 1104; ecan.c *ptr |= (Value->BYTES.BYTE_2 << 5); // Copy SID<10:8> to SIDH<7:5> 0010be c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0010c0 ffe9 0010c2 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0010c4 fff3 0010c6 5002 movf 0x2, 0, 0 MOVF r0x02, W 0010c8 ec6b call 0x22d6, 0 CALL __gptrget1 0010ca f011 0010cc 6e07 movwf 0x7, 0 MOVWF r0x07 0010ce 5004 movf 0x4, 0, 0 MOVF r0x04, W 0010d0 0f01 addlw 0x1 ADDLW 0x01 0010d2 6e08 movwf 0x8, 0 MOVWF r0x08 0010d4 0e00 movlw 0 MOVLW 0x00 0010d6 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 0010d8 6e09 movwf 0x9, 0 MOVWF r0x09 0010da 0e00 movlw 0 MOVLW 0x00 0010dc 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 0010de 6e0a movwf 0xa, 0 MOVWF r0x0a 0010e0 c008 movff 0x8, 0xfe9 MOVFF r0x08, FSR0L 0010e2 ffe9 0010e4 c009 movff 0x9, 0xff3 MOVFF r0x09, PRODL 0010e6 fff3 0010e8 500a movf 0xa, 0, 0 MOVF r0x0a, W 0010ea ec6b call 0x22d6, 0 CALL __gptrget1 0010ec f011 0010ee 6e08 movwf 0x8, 0 MOVWF r0x08 0010f0 3808 swapf 0x8, 0, 0 SWAPF r0x08, W 0010f2 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 0010f4 0be0 andlw 0xe0 ANDLW 0xe0 0010f6 6e09 movwf 0x9, 0 MOVWF r0x09 0010f8 5009 movf 0x9, 0, 0 MOVF r0x09, W 0010fa 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 0010fc c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0010fe ffe5 001100 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001102 ffe9 001104 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001106 fff3 001108 5002 movf 0x2, 0, 0 MOVF r0x02, W 00110a ecae call 0x235c, 0 CALL __gptrput1 00110c f011 ; .line 1105; ecan.c ptr++; // Point to SIDL 00110e 2a00 incf 0, 0x1, 0 INCF r0x00, F 001110 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001112 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 001114 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001116 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> 001118 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 00111a 44e8 rlncf 0xe8, 0, 0 RLNCF WREG, W 00111c 0be0 andlw 0xe0 ANDLW 0xe0 00111e 6e07 movwf 0x7, 0 MOVWF r0x07 001120 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001122 ffe5 001124 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001126 ffe9 001128 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 00112a fff3 00112c 5002 movf 0x2, 0, 0 MOVF r0x02, W 00112e ecae call 0x235c, 0 CALL __gptrput1 001130 f011 001132 d0a6 bra 0x1280 BRA _00221_DS_ _00219_DS_: ; .line 1111; ecan.c *ptr = Value->BYTES.BYTE_3 >> 5; // Copy EID<23:21> to SIDH<2:0> 001134 5004 movf 0x4, 0, 0 MOVF r0x04, W 001136 0f02 addlw 0x2 ADDLW 0x02 001138 6e03 movwf 0x3, 0 MOVWF r0x03 00113a 0e00 movlw 0 MOVLW 0x00 00113c 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 00113e 6e07 movwf 0x7, 0 MOVWF r0x07 001140 0e00 movlw 0 MOVLW 0x00 001142 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 001144 6e08 movwf 0x8, 0 MOVWF r0x08 001146 c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 001148 ffe9 00114a c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 00114c fff3 00114e 5008 movf 0x8, 0, 0 MOVF r0x08, W 001150 ec6b call 0x22d6, 0 CALL __gptrget1 001152 f011 001154 6e03 movwf 0x3, 0 MOVWF r0x03 001156 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 001158 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 00115a 0b07 andlw 0x7 ANDLW 0x07 00115c 6e07 movwf 0x7, 0 MOVWF r0x07 00115e c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001160 ffe5 001162 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001164 ffe9 001166 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001168 fff3 00116a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00116c ecae call 0x235c, 0 CALL __gptrput1 00116e f011 ; .line 1112; ecan.c *ptr |= Value->BYTES.BYTE_4 << 3; // Copy EID<28:24> to SIDH<7:3> 001170 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001172 ffe9 001174 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001176 fff3 001178 5002 movf 0x2, 0, 0 MOVF r0x02, W 00117a ec6b call 0x22d6, 0 CALL __gptrget1 00117c f011 00117e 6e07 movwf 0x7, 0 MOVWF r0x07 001180 5004 movf 0x4, 0, 0 MOVF r0x04, W 001182 0f03 addlw 0x3 ADDLW 0x03 001184 6e08 movwf 0x8, 0 MOVWF r0x08 001186 0e00 movlw 0 MOVLW 0x00 001188 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 00118a 6e09 movwf 0x9, 0 MOVWF r0x09 00118c 0e00 movlw 0 MOVLW 0x00 00118e 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 001190 6e0a movwf 0xa, 0 MOVWF r0x0a 001192 c008 movff 0x8, 0xfe9 MOVFF r0x08, FSR0L 001194 ffe9 001196 c009 movff 0x9, 0xff3 MOVFF r0x09, PRODL 001198 fff3 00119a 500a movf 0xa, 0, 0 MOVF r0x0a, W 00119c ec6b call 0x22d6, 0 CALL __gptrget1 00119e f011 0011a0 6e08 movwf 0x8, 0 MOVWF r0x08 0011a2 3808 swapf 0x8, 0, 0 SWAPF r0x08, W 0011a4 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 0011a6 0bf8 andlw 0xf8 ANDLW 0xf8 0011a8 6e09 movwf 0x9, 0 MOVWF r0x09 0011aa 5009 movf 0x9, 0, 0 MOVF r0x09, W 0011ac 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 0011ae c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0011b0 ffe5 0011b2 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0011b4 ffe9 0011b6 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0011b8 fff3 0011ba 5002 movf 0x2, 0, 0 MOVF r0x02, W 0011bc ecae call 0x235c, 0 CALL __gptrput1 0011be f011 ; .line 1113; ecan.c ptr++; // Point to SIDL 0011c0 2a00 incf 0, 0x1, 0 INCF r0x00, F 0011c2 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0011c4 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 0011c6 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0011c8 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> 0011ca 3803 swapf 0x3, 0, 0 SWAPF r0x03, W 0011cc 40e8 rrncf 0xe8, 0, 0 RRNCF WREG, W 0011ce 0bf8 andlw 0xf8 ANDLW 0xf8 0011d0 6e07 movwf 0x7, 0 MOVWF r0x07 0011d2 0ee0 movlw 0xe0 MOVLW 0xe0 0011d4 1607 andwf 0x7, 0x1, 0 ANDWF r0x07, F 0011d6 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0011d8 ffe5 0011da c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0011dc ffe9 0011de c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0011e0 fff3 0011e2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0011e4 ecae call 0x235c, 0 CALL __gptrput1 0011e6 f011 ; .line 1116; ecan.c *ptr |= 0b00001000; // Set EXIDEN bit to SIDL<3> 0011e8 8607 bsf 0x7, 0x3, 0 BSF r0x07, 3 0011ea c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0011ec ffe5 0011ee c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 0011f0 ffe9 0011f2 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 0011f4 fff3 0011f6 5002 movf 0x2, 0, 0 MOVF r0x02, W 0011f8 ecae call 0x235c, 0 CALL __gptrput1 0011fa f011 ; .line 1117; ecan.c *ptr |= Value->BYTES.BYTE_3 & 0x03; // Copy EID<17:16> to SIDL<1:0> 0011fc 0e03 movlw 0x3 MOVLW 0x03 0011fe 1603 andwf 0x3, 0x1, 0 ANDWF r0x03, F 001200 5003 movf 0x3, 0, 0 MOVF r0x03, W 001202 1207 iorwf 0x7, 0x1, 0 IORWF r0x07, F 001204 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 001206 ffe5 001208 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 00120a ffe9 00120c c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 00120e fff3 001210 5002 movf 0x2, 0, 0 MOVF r0x02, W 001212 ecae call 0x235c, 0 CALL __gptrput1 001214 f011 ; .line 1118; ecan.c ptr++; // Point to EIDH 001216 2a00 incf 0, 0x1, 0 INCF r0x00, F 001218 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 00121a 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 00121c b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 00121e 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> 001220 5004 movf 0x4, 0, 0 MOVF r0x04, W 001222 0f01 addlw 0x1 ADDLW 0x01 001224 6e03 movwf 0x3, 0 MOVWF r0x03 001226 0e00 movlw 0 MOVLW 0x00 001228 2005 addwfc 0x5, 0, 0 ADDWFC r0x05, W 00122a 6e07 movwf 0x7, 0 MOVWF r0x07 00122c 0e00 movlw 0 MOVLW 0x00 00122e 2006 addwfc 0x6, 0, 0 ADDWFC r0x06, W 001230 6e08 movwf 0x8, 0 MOVWF r0x08 001232 c003 movff 0x3, 0xfe9 MOVFF r0x03, FSR0L 001234 ffe9 001236 c007 movff 0x7, 0xff3 MOVFF r0x07, PRODL 001238 fff3 00123a 5008 movf 0x8, 0, 0 MOVF r0x08, W 00123c ec6b call 0x22d6, 0 CALL __gptrget1 00123e f011 001240 6e03 movwf 0x3, 0 MOVWF r0x03 001242 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 001244 ffe5 001246 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001248 ffe9 00124a c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 00124c fff3 00124e 5002 movf 0x2, 0, 0 MOVF r0x02, W 001250 ecae call 0x235c, 0 CALL __gptrput1 001252 f011 ; .line 1120; ecan.c ptr++; // Point to EIDL 001254 2a00 incf 0, 0x1, 0 INCF r0x00, F 001256 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 001258 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 00125a b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 00125c 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> 00125e c004 movff 0x4, 0xfe9 MOVFF r0x04, FSR0L 001260 ffe9 001262 c005 movff 0x5, 0xff3 MOVFF r0x05, PRODL 001264 fff3 001266 5006 movf 0x6, 0, 0 MOVF r0x06, W 001268 ec6b call 0x22d6, 0 CALL __gptrget1 00126a f011 00126c 6e04 movwf 0x4, 0 MOVWF r0x04 00126e c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 001270 ffe5 001272 c000 movff 0, 0xfe9 MOVFF r0x00, FSR0L 001274 ffe9 001276 c001 movff 0x1, 0xff3 MOVFF r0x01, PRODL 001278 fff3 00127a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00127c ecae call 0x235c, 0 CALL __gptrput1 00127e f011 _00221_DS_: 001280 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 001282 f00a 001284 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 001286 f009 001288 cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 00128a f008 00128c cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 00128e f007 001290 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 001292 f006 001294 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 001296 f005 001298 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 00129a f004 00129c cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 00129e f003 0012a0 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0012a2 f002 0012a4 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0012a6 f001 0012a8 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0012aa f000 0012ac cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0012ae ffd9 0012b0 0012 return 0 RETURN ; ; Starting pCode block S_ecan__ECANSetOperationMode code _ECANSetOperationMode: ; .line 1007; ecan.c void ECANSetOperationMode(ECAN_OP_MODE mode) 002226 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 002228 ffe5 00222a cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00222c ffd9 00222e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 002230 ffe5 002232 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 002234 ffe5 002236 0e02 movlw 0x2 MOVLW 0x02 002238 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 00223a f000 ; .line 1009; ecan.c CANCON &= 0x1F; // clear previous mode 00223c 0e1f movlw 0x1f MOVLW 0x1f 00223e 166f andwf 0x6f, 0x1, 0 ANDWF _CANCON, F ; .line 1010; ecan.c CANCON |= mode; // set new mode 002240 5000 movf 0, 0, 0 MOVF r0x00, W 002242 126f iorwf 0x6f, 0x1, 0 IORWF _CANCON, F _00203_DS_: ; .line 1012; ecan.c while( ECANGetOperationMode() != mode ); // Wait till desired mode is set. 002244 0ee0 movlw 0xe0 MOVLW 0xe0 002246 146f andwf 0x6f, 0, 0 ANDWF _CANCON, W 002248 6e01 movwf 0x1, 0 MOVWF r0x01 00224a 5001 movf 0x1, 0, 0 MOVF r0x01, W 00224c 1800 xorwf 0, 0, 0 XORWF r0x00, W 00224e e1fa bnz 0x2244 BNZ _00203_DS_ 002250 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 002252 f001 002254 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 002256 f000 002258 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 00225a ffd9 00225c 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 6bad clrf 0xad, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 0000e0 f011 ; .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 51ad movf 0xad, 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 6fad movwf 0xad, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000138 f011 ; .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 6fad movwf 0xad, 0x1 MOVWF __ECANRxFilterHitInfo, B ; ;;!!! pic16_aopOp:1071 called for a spillLocation -- assigning WREG instead --- CHECK ; .line 851; ecan.c if ( _ECANRxFilterHitInfo.Val < 0x02 ) 00014a c0ad movff 0xad, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000176 f011 _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 ecae call 0x235c, 0 CALL __gptrput1 0001a6 f011 ; .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 ec6b call 0x22d6, 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 6fae movwf 0xae, 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 c0ae movff 0xae, 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 ecae call 0x235c, 0 CALL __gptrput1 0001e8 f011 0001ea 0100 movlb 0 BANKSEL _ECANReceiveMessage_temp_1_1 ; .line 946; ecan.c if ( temp.bits.b6 ) 0001ec adae btfss 0xae, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000212 f011 _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 ec6b call 0x22d6, 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 6fae movwf 0xae, 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 a7ae btfss 0xae, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000264 f011 ; .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 6fae movwf 0xae, 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 6bae clrf 0xae, 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 51ae movf 0xae, 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 ec6b call 0x22d6, 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 6fae movwf 0xae, 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 c0ae movff 0xae, 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000328 f011 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 00035e f011 ; .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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000384 f011 ; .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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000900 f011 ; .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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 00092c f011 ; .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 ecae call 0x235c, 0 CALL __gptrput1 000960 f011 ; .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 ec0f call 0x101e, 0 CALL __CANIDToRegs 0009a2 f008 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 0009f2 f011 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 ec6b call 0x22d6, 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 ecae call 0x235c, 0 CALL __gptrput1 000a28 f011 _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) 001dca cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 001dcc ffe5 001dce cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001dd0 ffd9 ; .line 167; ecan.c ECANSetOperationMode(ECAN_OP_MODE_CONFIG); 001dd2 0e80 movlw 0x80 MOVLW 0x80 001dd4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001dd6 ec13 call 0x2226, 0 CALL _ECANSetOperationMode 001dd8 f011 001dda 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F ; .line 171; ecan.c BRGCON1 = ((ECAN_SJW_VAL-1) << 6) | (ECAN_BRP_VAL-1); 001ddc 0e01 movlw 0x1 MOVLW 0x01 001dde 6e70 movwf 0x70, 0 MOVWF _BRGCON1 ; .line 172; ecan.c BRGCON2 = (ECAN_PHSEG2_MODE_VAL << 7) | \ 001de0 0eae movlw 0xae MOVLW 0xae 001de2 6e71 movwf 0x71, 0 MOVWF _BRGCON2 ; .line 178; ecan.c (ECAN_PHSEG2_VAL-1); 001de4 0e05 movlw 0x5 MOVLW 0x05 001de6 6e72 movwf 0x72, 0 MOVWF _BRGCON3 ; .line 181; ecan.c CIOCON = ECAN_TX2_SOURCE_VAL << 7 | \ 001de8 0e20 movlw 0x20 MOVLW 0x20 001dea 6e73 movwf 0x73, 0 MOVWF _CIOCON ; .line 188; ecan.c ECANCON_MDSEL1 = 0; 001dec 9e77 bcf 0x77, 0x7, 0 BCF _ECANCONbits, 7 ; .line 189; ecan.c ECANCON_MDSEL0 = 0; 001dee 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); 001df0 0e04 movlw 0x4 MOVLW 0x04 001df2 6e60 movwf 0x60, 0 MOVWF _RXB0CON 001df4 010f movlb 0xf BANKSEL _RXB1CON ; .line 195; ecan.c RXB1CON = ECAN_RXB1_MODE_VAL << 5; 001df6 6b50 clrf 0x50, 0x1 CLRF _RXB1CON, B 001df8 010f movlb 0xf BANKSEL _RXF0SIDH ; .line 289; ecan.c _SetStdRXFnValue(RXF0, ECAN_RXF0_VAL); 001dfa 6b00 clrf 0, 0x1 CLRF _RXF0SIDH, B 001dfc 010f movlb 0xf BANKSEL _RXF0SIDL 001dfe 6b01 clrf 0x1, 0x1 CLRF _RXF0SIDL, B 001e00 010f movlb 0xf BANKSEL _RXF1SIDH ; .line 297; ecan.c _SetStdRXFnValue(RXF1, ECAN_RXF1_VAL); 001e02 6b04 clrf 0x4, 0x1 CLRF _RXF1SIDH, B 001e04 010f movlb 0xf BANKSEL _RXF1SIDL 001e06 6b05 clrf 0x5, 0x1 CLRF _RXF1SIDL, B 001e08 010f movlb 0xf BANKSEL _RXF2SIDH ; .line 306; ecan.c _SetStdRXFnValue(RXF2, ECAN_RXF2_VAL); 001e0a 6b08 clrf 0x8, 0x1 CLRF _RXF2SIDH, B 001e0c 010f movlb 0xf BANKSEL _RXF2SIDL 001e0e 6b09 clrf 0x9, 0x1 CLRF _RXF2SIDL, B 001e10 010f movlb 0xf BANKSEL _RXF3SIDH ; .line 315; ecan.c _SetStdRXFnValue(RXF3, ECAN_RXF3_VAL); 001e12 6b0c clrf 0xc, 0x1 CLRF _RXF3SIDH, B 001e14 010f movlb 0xf BANKSEL _RXF3SIDL 001e16 6b0d clrf 0xd, 0x1 CLRF _RXF3SIDL, B 001e18 010f movlb 0xf BANKSEL _RXF4SIDH ; .line 324; ecan.c _SetStdRXFnValue(RXF4, ECAN_RXF4_VAL); 001e1a 6b10 clrf 0x10, 0x1 CLRF _RXF4SIDH, B 001e1c 010f movlb 0xf BANKSEL _RXF4SIDL 001e1e 6b11 clrf 0x11, 0x1 CLRF _RXF4SIDL, B 001e20 010f movlb 0xf BANKSEL _RXF5SIDH ; .line 332; ecan.c _SetStdRXFnValue(RXF5, ECAN_RXF4_VAL); 001e22 6b14 clrf 0x14, 0x1 CLRF _RXF5SIDH, B 001e24 010f movlb 0xf BANKSEL _RXF5SIDL 001e26 6b15 clrf 0x15, 0x1 CLRF _RXF5SIDL, B 001e28 010f movlb 0xf BANKSEL _RXM0SIDH ; .line 474; ecan.c _SetStdRXMnValue(0, ECAN_RXM0_VAL); 001e2a 6b18 clrf 0x18, 0x1 CLRF _RXM0SIDH, B 001e2c 010f movlb 0xf BANKSEL _RXM0SIDL 001e2e 6b19 clrf 0x19, 0x1 CLRF _RXM0SIDL, B 001e30 010f movlb 0xf BANKSEL _RXM0SIDLbits ; .line 475; ecan.c RXM0SIDL_EXIDEN = 0; 001e32 9719 bcf 0x19, 0x3, 0x1 BCF _RXM0SIDLbits, 3, B 001e34 010f movlb 0xf BANKSEL _RXM1SIDH ; .line 482; ecan.c _SetStdRXMnValue(1, ECAN_RXM1_VAL); 001e36 6b1c clrf 0x1c, 0x1 CLRF _RXM1SIDH, B 001e38 010f movlb 0xf BANKSEL _RXM1SIDL 001e3a 6b1d clrf 0x1d, 0x1 CLRF _RXM1SIDL, B 001e3c 010f movlb 0xf BANKSEL _RXM1SIDLbits ; .line 483; ecan.c RXM1SIDL_EXIDEN = 0; 001e3e 971d bcf 0x1d, 0x3, 0x1 BCF _RXM1SIDLbits, 3, B ; .line 494; ecan.c ECANSetOperationMode(ECAN_INIT_MODE); 001e40 0e00 movlw 0 MOVLW 0x00 001e42 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 001e44 ec13 call 0x2226, 0 CALL _ECANSetOperationMode 001e46 f011 001e48 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F 001e4a cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001e4c ffd9 001e4e 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