gplink-0.13.7 beta Copyright (c) 1998-2005 gputils project Listing File Generated: 1-16-2011 16:43:59 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 Sun Jan 16 16:43:59 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 _SERIAL_initialize global _SERIAL_putc global _SERIAL_getc global _SERIAL_write global _SERIAL_readable global _SERIAL_writable global _main ;-------------------------------------------------------- ; extern variables in this module ;-------------------------------------------------------- extern __gptrget2 extern __gptrget1 extern _RXF6SIDHbits extern _RXF6SIDLbits extern _RXF6EIDHbits extern _RXF6EIDLbits extern _RXF7SIDHbits extern _RXF7SIDLbits extern _RXF7EIDHbits extern _RXF7EIDLbits extern _RXF8SIDHbits extern _RXF8SIDLbits extern _RXF8EIDHbits extern _RXF8EIDLbits extern _RXF9SIDHbits extern _RXF9SIDLbits extern _RXF9EIDHbits extern _RXF9EIDLbits extern _RXF10SIDHbits extern _RXF10SIDLbits extern _RXF10EIDHbits extern _RXF10EIDLbits extern _RXF11SIDHbits extern _RXF11SIDLbits extern _RXF11EIDHbits extern _RXF11EIDLbits extern _RXF12SIDHbits extern _RXF12SIDLbits extern _RXF12EIDHbits extern _RXF12EIDLbits extern _RXF13SIDHbits extern _RXF13SIDLbits extern _RXF13EIDHbits extern _RXF13EIDLbits extern _RXF14SIDHbits extern _RXF14SIDLbits extern _RXF14EIDHbits extern _RXF14EIDLbits extern _RXF15SIDHbits extern _RXF15SIDLbits extern _RXF15EIDHbits extern _RXF15EIDLbits extern _RXFCON0bits extern _RXFCON1bits extern _SDFLCbits extern _RXFBCON0bits extern _RXFBCON1bits extern _RXFBCON2bits extern _RXFBCON3bits extern _RXFBCON4bits extern _RXFBCON5bits extern _RXFBCON6bits extern _RXFBCON7bits extern _MSEL0bits extern _MSEL1bits extern _MSEL2bits extern _MSEL3bits extern _BSEL0bits extern _BIE0bits extern _TXBIEbits extern _B0CONbits extern _B0SIDHbits extern _B0SIDLbits extern _B0EIDHbits extern _B0EIDLbits extern _B0DLCbits extern _B0D0bits extern _B0D1bits extern _B0D2bits extern _B0D3bits extern _B0D4bits extern _B0D5bits extern _B0D6bits extern _B0D7bits extern _CANSTAT_RO9bits extern _CANCON_RO9bits extern _B1CONbits extern _B1SIDHbits extern _B1SIDLbits extern _B1EIDHbits extern _B1EIDLbits extern _B1DLCbits extern _B1D0bits extern _B1D1bits extern _B1D2bits extern _B1D3bits extern _B1D4bits extern _B1D5bits extern _B1D6bits extern _B1D7bits extern _CANSTAT_RO8bits extern _CANCON_RO8bits extern _B2CONbits extern _B2SIDHbits extern _B2SIDLbits extern _B2EIDHbits extern _B2EIDLbits extern _B2DLCbits extern _B2D0bits extern _B2D1bits extern _B2D2bits extern _B2D3bits extern _B2D4bits extern _B2D5bits extern _B2D6bits extern _B2D7bits extern _CANSTAT_RO7bits extern _CANCON_RO7bits extern _B3CONbits extern _B3SIDHbits extern _B3SIDLbits extern _B3EIDHbits extern _B3EIDLbits extern _B3DLCbits extern _B3D0bits extern _B3D1bits extern _B3D2bits extern _B3D3bits extern _B3D4bits extern _B3D5bits extern _B3D6bits extern _B3D7bits extern _CANSTAT_RO6bits extern _CANCON_RO6bits extern _B4CONbits extern _B4SIDHbits extern _B4SIDLbits extern _B4EIDHbits extern _B4EIDLbits extern _B4DLCbits extern _B4D0bits extern _B4D1bits extern _B4D2bits extern _B4D3bits extern _B4D4bits extern _B4D5bits extern _B4D6bits extern _B4D7bits extern _CANSTAT_RO5bits extern _CANCON_RO5bits extern _B5CONbits extern _B5SIDHbits extern _B5SIDLbits extern _B5EIDHbits extern _B5EIDLbits extern _B5DLCbits extern _B5D0bits extern _B5D1bits extern _B5D2bits extern _B5D3bits extern _B5D4bits extern _B5D5bits extern _B5D6bits extern _B5D7bits extern _CANSTAT_RO4bits extern _CANCON_RO4bits extern _RXF0SIDHbits extern _RXF0SIDLbits extern _RXF0EIDHbits extern _RXF0EIDLbits extern _RXF1SIDHbits extern _RXF1SIDLbits extern _RXF1EIDHbits extern _RXF1EIDLbits extern _RXF2SIDHbits extern _RXF2SIDLbits extern _RXF2EIDHbits extern _RXF2EIDLbits extern _RXF3SIDHbits extern _RXF3SIDLbits extern _RXF3EIDHbits extern _RXF3EIDLbits extern _RXF4SIDHbits extern _RXF4SIDLbits extern _RXF4EIDHbits extern _RXF4EIDLbits extern _RXF5SIDHbits extern _RXF5SIDLbits extern _RXF5EIDHbits extern _RXF5EIDLbits extern _RXM0SIDHbits extern _RXM0SIDLbits extern _RXM0EIDHbits extern _RXM0EIDLbits extern _RXM1SIDHbits extern _RXM1SIDLbits extern _RXM1EIDHbits extern _RXM1EIDLbits extern _TXB2CONbits extern _TXB2SIDHbits extern _TXB2SIDLbits extern _TXB2EIDHbits extern _TXB2EIDLbits extern _TXB2DLCbits extern _TXB2D0bits extern _TXB2D1bits extern _TXB2D2bits extern _TXB2D3bits extern _TXB2D4bits extern _TXB2D5bits extern _TXB2D6bits extern _TXB2D7bits extern _CANSTAT_RO3bits extern _CANCON_RO3bits extern _TXB1CONbits extern _TXB1SIDHbits extern _TXB1SIDLbits extern _TXB1EIDHbits extern _TXB1EIDLbits extern _TXB1DLCbits extern _TXB1D0bits extern _TXB1D1bits extern _TXB1D2bits extern _TXB1D3bits extern _TXB1D4bits extern _TXB1D5bits extern _TXB1D6bits extern _TXB1D7bits extern _CANSTAT_RO2bits extern _CANCON_RO2bits extern _TXB0CONbits extern _TXB0SIDHbits extern _TXB0SIDLbits extern _TXB0EIDHbits extern _TXB0EIDLbits extern _TXB0DLCbits extern _TXB0D0bits extern _TXB0D1bits extern _TXB0D2bits extern _TXB0D3bits extern _TXB0D4bits extern _TXB0D5bits extern _TXB0D6bits extern _TXB0D7bits extern _CANSTAT_RO1bits extern _CANCON_RO1bits extern _RXB1CONbits extern _RXB1SIDHbits extern _RXB1SIDLbits extern _RXB1EIDHbits extern _RXB1EIDLbits extern _RXB1DLCbits extern _RXB1D0bits extern _RXB1D1bits extern _RXB1D2bits extern _RXB1D3bits extern _RXB1D4bits extern _RXB1D5bits extern _RXB1D6bits extern _RXB1D7bits extern _CANSTAT_RO0bits extern _CANCON_RO0bits extern _RXB0CONbits extern _RXB0SIDHbits extern _RXB0SIDLbits extern _RXB0EIDHbits extern _RXB0EIDLbits extern _RXB0DLCbits extern _RXB0D0bits extern _RXB0D1bits extern _RXB0D2bits extern _RXB0D3bits extern _RXB0D4bits extern _RXB0D5bits extern _RXB0D6bits extern _RXB0D7bits extern _CANSTATbits extern _CANCONbits extern _BRGCON1bits extern _BRGCON2bits extern _BRGCON3bits extern _CIOCONbits extern _COMSTATbits extern _RXERRCNTbits extern _TXERRCNTbits extern _ECANCONbits extern _PORTAbits extern _PORTBbits extern _PORTCbits extern _LATAbits extern _LATBbits extern _LATCbits extern _DDRAbits extern _TRISAbits extern _DDRBbits extern _TRISBbits extern _DDRCbits extern _TRISCbits extern _OSCTUNEbits extern _PIE1bits extern _PIR1bits extern _IPR1bits extern _PIE2bits extern _PIR2bits extern _IPR2bits extern _PIE3bits extern _PIR3bits extern _IPR3bits extern _EECON1bits extern _RCSTAbits extern _TXSTAbits extern _T3CONbits extern _BAUDCONbits extern _CCP1CONbits extern _ADCON2bits extern _ADCON1bits extern _ADCON0bits extern _SSPCON2bits extern _SSPCON1bits extern _SSPSTATbits extern _T2CONbits extern _T1CONbits extern _RCONbits extern _WDTCONbits extern _HLVDCONbits extern _LVDCONbits extern _OSCCONbits extern _T0CONbits extern _STATUSbits extern _INTCON3bits extern _INTCON2bits extern _INTCONbits extern _STKPTRbits extern _RXF6SIDH extern _RXF6SIDL extern _RXF6EIDH extern _RXF6EIDL extern _RXF7SIDH extern _RXF7SIDL extern _RXF7EIDH extern _RXF7EIDL extern _RXF8SIDH extern _RXF8SIDL extern _RXF8EIDH extern _RXF8EIDL extern _RXF9SIDH extern _RXF9SIDL extern _RXF9EIDH extern _RXF9EIDL extern _RXF10SIDH extern _RXF10SIDL extern _RXF10EIDH extern _RXF10EIDL extern _RXF11SIDH extern _RXF11SIDL extern _RXF11EIDH extern _RXF11EIDL extern _RXF12SIDH extern _RXF12SIDL extern _RXF12EIDH extern _RXF12EIDL extern _RXF13SIDH extern _RXF13SIDL extern _RXF13EIDH extern _RXF13EIDL extern _RXF14SIDH extern _RXF14SIDL extern _RXF14EIDH extern _RXF14EIDL extern _RXF15SIDH extern _RXF15SIDL extern _RXF15EIDH extern _RXF15EIDL extern _RXFCON0 extern _RXFCON1 extern _SDFLC extern _RXFBCON0 extern _RXFBCON1 extern _RXFBCON2 extern _RXFBCON3 extern _RXFBCON4 extern _RXFBCON5 extern _RXFBCON6 extern _RXFBCON7 extern _MSEL0 extern _MSEL1 extern _MSEL2 extern _MSEL3 extern _BSEL0 extern _BIE0 extern _TXBIE extern _B0CON extern _B0SIDH extern _B0SIDL extern _B0EIDH extern _B0EIDL extern _B0DLC extern _B0D0 extern _B0D1 extern _B0D2 extern _B0D3 extern _B0D4 extern _B0D5 extern _B0D6 extern _B0D7 extern _CANSTAT_RO9 extern _CANCON_RO9 extern _B1CON extern _B1SIDH extern _B1SIDL extern _B1EIDH extern _B1EIDL extern _B1DLC extern _B1D0 extern _B1D1 extern _B1D2 extern _B1D3 extern _B1D4 extern _B1D5 extern _B1D6 extern _B1D7 extern _CANSTAT_RO8 extern _CANCON_RO8 extern _B2CON extern _B2SIDH extern _B2SIDL extern _B2EIDH extern _B2EIDL extern _B2DLC extern _B2D0 extern _B2D1 extern _B2D2 extern _B2D3 extern _B2D4 extern _B2D5 extern _B2D6 extern _B2D7 extern _CANSTAT_RO7 extern _CANCON_RO7 extern _B3CON extern _B3SIDH extern _B3SIDL extern _B3EIDH extern _B3EIDL extern _B3DLC extern _B3D0 extern _B3D1 extern _B3D2 extern _B3D3 extern _B3D4 extern _B3D5 extern _B3D6 extern _B3D7 extern _CANSTAT_RO6 extern _CANCON_RO6 extern _B4CON extern _B4SIDH extern _B4SIDL extern _B4EIDH extern _B4EIDL extern _B4DLC extern _B4D0 extern _B4D1 extern _B4D2 extern _B4D3 extern _B4D4 extern _B4D5 extern _B4D6 extern _B4D7 extern _CANSTAT_RO5 extern _CANCON_RO5 extern _B5CON extern _B5SIDH extern _B5SIDL extern _B5EIDH extern _B5EIDL extern _B5DLC extern _B5D0 extern _B5D1 extern _B5D2 extern _B5D3 extern _B5D4 extern _B5D5 extern _B5D6 extern _B5D7 extern _CANSTAT_RO4 extern _CANCON_RO4 extern _RXF0SIDH extern _RXF0SIDL extern _RXF0EIDH extern _RXF0EIDL extern _RXF1SIDH extern _RXF1SIDL extern _RXF1EIDH extern _RXF1EIDL extern _RXF2SIDH extern _RXF2SIDL extern _RXF2EIDH extern _RXF2EIDL extern _RXF3SIDH extern _RXF3SIDL extern _RXF3EIDH extern _RXF3EIDL extern _RXF4SIDH extern _RXF4SIDL extern _RXF4EIDH extern _RXF4EIDL extern _RXF5SIDH extern _RXF5SIDL extern _RXF5EIDH extern _RXF5EIDL extern _RXM0SIDH extern _RXM0SIDL extern _RXM0EIDH extern _RXM0EIDL extern _RXM1SIDH extern _RXM1SIDL extern _RXM1EIDH extern _RXM1EIDL extern _TXB2CON extern _TXB2SIDH extern _TXB2SIDL extern _TXB2EIDH extern _TXB2EIDL extern _TXB2DLC extern _TXB2D0 extern _TXB2D1 extern _TXB2D2 extern _TXB2D3 extern _TXB2D4 extern _TXB2D5 extern _TXB2D6 extern _TXB2D7 extern _CANSTAT_RO3 extern _CANCON_RO3 extern _TXB1CON extern _TXB1SIDH extern _TXB1SIDL extern _TXB1EIDH extern _TXB1EIDL extern _TXB1DLC extern _TXB1D0 extern _TXB1D1 extern _TXB1D2 extern _TXB1D3 extern _TXB1D4 extern _TXB1D5 extern _TXB1D6 extern _TXB1D7 extern _CANSTAT_RO2 extern _CANCON_RO2 extern _TXB0CON extern _TXB0SIDH extern _TXB0SIDL extern _TXB0EIDH extern _TXB0EIDL extern _TXB0DLC extern _TXB0D0 extern _TXB0D1 extern _TXB0D2 extern _TXB0D3 extern _TXB0D4 extern _TXB0D5 extern _TXB0D6 extern _TXB0D7 extern _CANSTAT_RO1 extern _CANCON_RO1 extern _RXB1CON extern _RXB1SIDH extern _RXB1SIDL extern _RXB1EIDH extern _RXB1EIDL extern _RXB1DLC extern _RXB1D0 extern _RXB1D1 extern _RXB1D2 extern _RXB1D3 extern _RXB1D4 extern _RXB1D5 extern _RXB1D6 extern _RXB1D7 extern _CANSTAT_RO0 extern _CANCON_RO0 extern _RXB0CON extern _RXB0SIDH extern _RXB0SIDL extern _RXB0EIDH extern _RXB0EIDL extern _RXB0DLC extern _RXB0D0 extern _RXB0D1 extern _RXB0D2 extern _RXB0D3 extern _RXB0D4 extern _RXB0D5 extern _RXB0D6 extern _RXB0D7 extern _CANSTAT extern _CANCON extern _BRGCON1 extern _BRGCON2 extern _BRGCON3 extern _CIOCON extern _COMSTAT extern _RXERRCNT extern _TXERRCNT extern _ECANCON extern _PORTA extern _PORTB extern _PORTC extern _LATA extern _LATB extern _LATC extern _DDRA extern _TRISA extern _DDRB extern _TRISB extern _DDRC extern _TRISC extern _OSCTUNE extern _PIE1 extern _PIR1 extern _IPR1 extern _PIE2 extern _PIR2 extern _IPR2 extern _PIE3 extern _PIR3 extern _IPR3 extern _EECON1 extern _EECON2 extern _EEDATA extern _EEADR extern _EEADRH extern _RCSTA extern _TXSTA extern _TXREG extern _RCREG extern _SPBRG extern _SPBRGH extern _T3CON extern _TMR3L extern _TMR3H extern _BAUDCON extern _CCP1CON extern _CCPR1 extern _CCPR1L extern _CCPR1H extern _ADCON2 extern _ADCON1 extern _ADCON0 extern _ADRES extern _ADRESL extern _ADRESH extern _SSPCON2 extern _SSPCON1 extern _SSPSTAT extern _SSPADD extern _SSPBUF extern _T2CON extern _PR2 extern _TMR2 extern _T1CON extern _TMR1L extern _TMR1H extern _RCON extern _WDTCON extern _HLVDCON extern _LVDCON extern _OSCCON extern _T0CON extern _TMR0L extern _TMR0H extern _STATUS extern _FSR2L extern _FSR2H extern _PLUSW2 extern _PREINC2 extern _POSTDEC2 extern _POSTINC2 extern _INDF2 extern _BSR extern _FSR1L extern _FSR1H extern _PLUSW1 extern _PREINC1 extern _POSTDEC1 extern _POSTINC1 extern _INDF1 extern _WREG extern _FSR0L extern _FSR0H extern _PLUSW0 extern _PREINC0 extern _POSTDEC0 extern _POSTINC0 extern _INDF0 extern _INTCON3 extern _INTCON2 extern _INTCON extern _PROD extern _PRODL extern _PRODH extern _TABLAT extern _TBLPTR extern _TBLPTRL extern _TBLPTRH extern _TBLPTRU extern _PC extern _PCL extern _PCLATH extern _PCLATU extern _STKPTR extern _TOS extern _TOSL extern _TOSH extern _TOSU extern _usart_open extern _usart_busy extern _usart_getc extern _usart_putc extern __mulint extern __divslong ;-------------------------------------------------------- ; Equates to used internal registers ;-------------------------------------------------------- STATUS equ 0xfd8 WREG equ 0xfe8 FSR0L equ 0xfe9 FSR1L equ 0xfe1 FSR2L equ 0xfd9 POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 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 udata_slave_0 udata _main_spi_setting_1_1 res 6 ;-------------------------------------------------------- ; interrupt vector ;-------------------------------------------------------- ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; I code from now on! ; ; Starting pCode block S_slave__main code _main: ; .line 17; slave.c TRISB = TRISB & 0xfd; // set pin B1 to output 0006a0 9293 bcf 0x93, 0x1, 0 BCF _TRISB, 1 ; .line 18; slave.c LATBbits.LATB1 = 0; 0006a2 928a bcf 0x8a, 0x1, 0 BCF _LATBbits, 1 0006a4 0100 movlb 0 BANKSEL (_main_spi_setting_1_1 + 4) ; .line 20; slave.c spi_setting.mstr_slv = 0; // set Slave 0006a6 6b64 clrf 0x64, 0x1 CLRF (_main_spi_setting_1_1 + 4), B ; .line 30; slave.c SERIAL_initialize(spi, &spi_setting); 0006a8 0e00 movlw 0 MOVLW HIGH(_main_spi_setting_1_1) 0006aa 6e01 movwf 0x1, 0 MOVWF r0x01 0006ac 0e60 movlw 0x60 MOVLW LOW(_main_spi_setting_1_1) 0006ae 6e00 movwf 0, 0 MOVWF r0x00 0006b0 0e80 movlw 0x80 MOVLW 0x80 0006b2 6e02 movwf 0x2, 0 MOVWF r0x02 0006b4 5002 movf 0x2, 0, 0 MOVF r0x02, W 0006b6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006b8 5001 movf 0x1, 0, 0 MOVF r0x01, W 0006ba 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006bc 5000 movf 0, 0, 0 MOVF r0x00, W 0006be 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006c0 0e00 movlw 0 MOVLW 0x00 0006c2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006c4 0e01 movlw 0x1 MOVLW 0x01 0006c6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006c8 ec02 call 0x4, 0 CALL _SERIAL_initialize 0006ca f000 0006cc 0e05 movlw 0x5 MOVLW 0x05 0006ce 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 34; slave.c while(1) 0006d0 6a00 clrf 0, 0 CLRF r0x00 0006d2 6a01 clrf 0x1, 0 CLRF r0x01 0006d4 6a02 clrf 0x2, 0 CLRF r0x02 0006d6 0e01 movlw 0x1 MOVLW 0x01 0006d8 6e03 movwf 0x3, 0 MOVWF r0x03 0006da 6a04 clrf 0x4, 0 CLRF r0x04 _00225_DS_: ; .line 39; slave.c if(SERIAL_readable(spi)) // check if data has been received 0006dc 0e00 movlw 0 MOVLW 0x00 0006de 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006e0 0e01 movlw 0x1 MOVLW 0x01 0006e2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006e4 ece4 call 0x9c8, 0 CALL _SERIAL_readable 0006e6 f004 0006e8 6e05 movwf 0x5, 0 MOVWF r0x05 0006ea 0e02 movlw 0x2 MOVLW 0x02 0006ec 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0006ee 5005 movf 0x5, 0, 0 MOVF r0x05, W 0006f0 e009 bz 0x704 BZ _00218_DS_ ; .line 41; slave.c rxdata = SERIAL_getc(spi); 0006f2 0e00 movlw 0 MOVLW 0x00 0006f4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006f6 0e01 movlw 0x1 MOVLW 0x01 0006f8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0006fa ecb7 call 0x96e, 0 CALL _SERIAL_getc 0006fc f004 0006fe 0e02 movlw 0x2 MOVLW 0x02 000700 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 42; slave.c rxcount++; 000702 2a00 incf 0, 0x1, 0 INCF r0x00, F _00218_DS_: ; .line 44; slave.c if(counter == 15000) // transmit data 000704 5001 movf 0x1, 0, 0 MOVF r0x01, W 000706 0a98 xorlw 0x98 XORLW 0x98 000708 e103 bnz 0x710 BNZ _00234_DS_ 00070a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00070c 0a3a xorlw 0x3a XORLW 0x3a 00070e e001 bz 0x712 BZ _00235_DS_ _00234_DS_: 000710 d00a bra 0x726 BRA _00220_DS_ _00235_DS_: ; .line 46; slave.c SERIAL_putc(spi,rxcount); 000712 5000 movf 0, 0, 0 MOVF r0x00, W 000714 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000716 0e00 movlw 0 MOVLW 0x00 000718 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00071a 0e01 movlw 0x1 MOVLW 0x01 00071c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00071e ec84 call 0x908, 0 CALL _SERIAL_putc 000720 f004 000722 0e03 movlw 0x3 MOVLW 0x03 000724 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00220_DS_: ; .line 50; slave.c counter++; 000726 2a01 incf 0x1, 0x1, 0 INCF r0x01, F 000728 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 00072a 2a02 incf 0x2, 0x1, 0 INCF r0x02, F ; .line 52; slave.c ACK++; 00072c 2a03 incf 0x3, 0x1, 0 INCF r0x03, F 00072e b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000730 2a04 incf 0x4, 0x1, 0 INCF r0x04, F ; .line 53; slave.c if(ACK>15000) 000732 5004 movf 0x4, 0, 0 MOVF r0x04, W 000734 0f80 addlw 0x80 ADDLW 0x80 000736 0f46 addlw 0x46 ADDLW 0x46 000738 e102 bnz 0x73e BNZ _00236_DS_ 00073a 0e99 movlw 0x99 MOVLW 0x99 00073c 5c03 subwf 0x3, 0, 0 SUBWF r0x03, W _00236_DS_: 00073e e302 bnc 0x744 BNC _00222_DS_ ; .line 55; slave.c LATBbits.LATB1 = 1; 000740 828a bsf 0x8a, 0x1, 0 BSF _LATBbits, 1 000742 d7cc bra 0x6dc BRA _00225_DS_ _00222_DS_: ; .line 60; slave.c LATBbits.LATB1 = 0; 000744 928a bcf 0x8a, 0x1, 0 BCF _LATBbits, 1 000746 d7ca bra 0x6dc BRA _00225_DS_ 000748 0012 return 0 RETURN ; ; Starting pCode block S_slave__SERIAL_writable code _SERIAL_writable: ; .line 143; serial.c bool SERIAL_writable(SERIAL_handle h) 000a1e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000a20 ffe5 000a22 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000a24 ffd9 000a26 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000a28 ffe5 000a2a c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000a2c ffe5 000a2e 0e02 movlw 0x2 MOVLW 0x02 000a30 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000a32 f000 000a34 0e03 movlw 0x3 MOVLW 0x03 000a36 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000a38 f001 ; .line 145; serial.c if(h==0) 000a3a 5000 movf 0, 0, 0 MOVF r0x00, W 000a3c 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 000a3e e109 bnz 0xa52 BNZ _00211_DS_ ; .line 147; serial.c if(usart_busy()) 000a40 ec87 call 0xb0e, 0 CALL _usart_busy 000a42 f005 000a44 6e00 movwf 0, 0 MOVWF r0x00 000a46 5000 movf 0, 0, 0 MOVF r0x00, W 000a48 e002 bz 0xa4e BZ _00208_DS_ ; .line 149; serial.c return 0; // not writable 000a4a 6ae8 clrf 0xe8, 0 CLRF WREG 000a4c d003 bra 0xa54 BRA _00212_DS_ _00208_DS_: ; .line 153; serial.c return 1; // writable 000a4e 0e01 movlw 0x1 MOVLW 0x01 000a50 d001 bra 0xa54 BRA _00212_DS_ _00211_DS_: ; .line 157; serial.c return 0; 000a52 6ae8 clrf 0xe8, 0 CLRF WREG _00212_DS_: 000a54 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000a56 f001 000a58 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000a5a f000 000a5c cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000a5e ffd9 000a60 0012 return 0 RETURN ; ; Starting pCode block S_slave__SERIAL_readable code _SERIAL_readable: ; .line 125; serial.c bool SERIAL_readable(SERIAL_handle h) 0009c8 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 0009ca ffe5 0009cc cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0009ce ffd9 0009d0 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 0009d2 ffe5 0009d4 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 0009d6 ffe5 0009d8 0e02 movlw 0x2 MOVLW 0x02 0009da cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0009dc f000 0009de 0e03 movlw 0x3 MOVLW 0x03 0009e0 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0009e2 f001 ; .line 127; serial.c if(h == 0) //uart 0009e4 5000 movf 0, 0, 0 MOVF r0x00, W 0009e6 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 0009e8 e106 bnz 0x9f6 BNZ _00188_DS_ ; .line 129; serial.c if(PIR1bits.RCIF)return 1; 0009ea aa9e btfss 0x9e, 0x5, 0 BTFSS _PIR1bits, 5 0009ec d002 bra 0x9f2 BRA _00185_DS_ 0009ee 0e01 movlw 0x1 MOVLW 0x01 0009f0 d00f bra 0xa10 BRA _00194_DS_ _00185_DS_: ; .line 130; serial.c else return 0; 0009f2 6ae8 clrf 0xe8, 0 CLRF WREG 0009f4 d00d bra 0xa10 BRA _00194_DS_ _00188_DS_: ; .line 132; serial.c if(h==1) //SPI 0009f6 5000 movf 0, 0, 0 MOVF r0x00, W 0009f8 0a01 xorlw 0x1 XORLW 0x01 0009fa e102 bnz 0xa00 BNZ _00200_DS_ 0009fc 5001 movf 0x1, 0, 0 MOVF r0x01, W 0009fe e001 bz 0xa02 BZ _00201_DS_ _00200_DS_: 000a00 d006 bra 0xa0e BRA _00193_DS_ _00201_DS_: ; .line 134; serial.c if(SSPSTAT & 0x01) return 1; 000a02 a0c7 btfss 0xc7, 0, 0 BTFSS _SSPSTAT, 0 000a04 d002 bra 0xa0a BRA _00190_DS_ 000a06 0e01 movlw 0x1 MOVLW 0x01 000a08 d003 bra 0xa10 BRA _00194_DS_ _00190_DS_: ; .line 135; serial.c else return 0; 000a0a 6ae8 clrf 0xe8, 0 CLRF WREG 000a0c d001 bra 0xa10 BRA _00194_DS_ _00193_DS_: ; .line 138; serial.c return 0; 000a0e 6ae8 clrf 0xe8, 0 CLRF WREG _00194_DS_: 000a10 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000a12 f001 000a14 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000a16 f000 000a18 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000a1a ffd9 000a1c 0012 return 0 RETURN ; ; Starting pCode block S_slave__SERIAL_write code _SERIAL_write: ; .line 112; serial.c void SERIAL_write(SERIAL_handle h,SERIAL_datatype *t, int n) 00059c cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00059e ffe5 0005a0 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 0005a2 ffd9 0005a4 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 0005a6 ffe5 0005a8 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 0005aa ffe5 0005ac c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 0005ae ffe5 0005b0 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 0005b2 ffe5 0005b4 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 0005b6 ffe5 0005b8 c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 0005ba ffe5 0005bc c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 0005be ffe5 0005c0 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0005c2 ffe5 0005c4 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 0005c6 ffe5 0005c8 c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 0005ca ffe5 0005cc c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 0005ce ffe5 0005d0 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 0005d2 ffe5 0005d4 0e02 movlw 0x2 MOVLW 0x02 0005d6 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0005d8 f000 0005da 0e03 movlw 0x3 MOVLW 0x03 0005dc cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0005de f001 0005e0 0e04 movlw 0x4 MOVLW 0x04 0005e2 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 0005e4 f002 0005e6 0e05 movlw 0x5 MOVLW 0x05 0005e8 cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 0005ea f003 0005ec 0e06 movlw 0x6 MOVLW 0x06 0005ee cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 0005f0 f004 0005f2 0e07 movlw 0x7 MOVLW 0x07 0005f4 cfdb movff 0xfdb, 0x5 MOVFF PLUSW2, r0x05 0005f6 f005 0005f8 0e08 movlw 0x8 MOVLW 0x08 0005fa cfdb movff 0xfdb, 0x6 MOVFF PLUSW2, r0x06 0005fc f006 ; .line 116; serial.c if(h==0 || h==1) // will spi pose a problem by overwriting previous data?. 0005fe 5000 movf 0, 0, 0 MOVF r0x00, W 000600 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 000602 e006 bz 0x610 BZ _00175_DS_ 000604 5000 movf 0, 0, 0 MOVF r0x00, W 000606 0a01 xorlw 0x1 XORLW 0x01 000608 e102 bnz 0x60e BNZ _00177_DS_ 00060a 5001 movf 0x1, 0, 0 MOVF r0x01, W 00060c e001 bz 0x610 BZ _00175_DS_ _00177_DS_: 00060e d02d bra 0x66a BRA _00171_DS_ _00175_DS_: ; .line 118; serial.c for( i = 0; ibaud))/(ucon->baud)/4 - 1) <= 255) 00006e c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 000070 ffe9 000072 c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 000074 fff3 000076 5004 movf 0x4, 0, 0 MOVF r0x04, W 000078 ec31 call 0xa62, 0 CALL __gptrget2 00007a f005 00007c 6e05 movwf 0x5, 0 MOVWF r0x05 00007e cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000080 f006 000082 5006 movf 0x6, 0, 0 MOVF r0x06, W 000084 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000086 5005 movf 0x5, 0, 0 MOVF r0x05, W 000088 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00008a 0e00 movlw 0 MOVLW 0x00 00008c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00008e 0e02 movlw 0x2 MOVLW 0x02 000090 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000092 eca5 call 0x74a, 0 CALL __mulint 000094 f003 000096 6e07 movwf 0x7, 0 MOVWF r0x07 000098 cff3 movff 0xff3, 0x8 MOVFF PRODL, r0x08 00009a f008 00009c 0e04 movlw 0x4 MOVLW 0x04 00009e 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0000a0 6a09 clrf 0x9, 0 CLRF r0x09 0000a2 6a0a clrf 0xa, 0 CLRF r0x0a 0000a4 0e40 movlw 0x40 MOVLW 0x40 0000a6 2607 addwf 0x7, 0x1, 0 ADDWF r0x07, F 0000a8 0e4b movlw 0x4b MOVLW 0x4b 0000aa 2208 addwfc 0x8, 0x1, 0 ADDWFC r0x08, F 0000ac 0e4c movlw 0x4c MOVLW 0x4c 0000ae 2209 addwfc 0x9, 0x1, 0 ADDWFC r0x09, F 0000b0 0e00 movlw 0 MOVLW 0x00 0000b2 220a addwfc 0xa, 0x1, 0 ADDWFC r0x0a, F 0000b4 c005 movff 0x5, 0xb MOVFF r0x05, r0x0b 0000b6 f00b 0000b8 c006 movff 0x6, 0xc MOVFF r0x06, r0x0c 0000ba f00c 0000bc 6a0d clrf 0xd, 0 CLRF r0x0d 0000be 6a0e clrf 0xe, 0 CLRF r0x0e 0000c0 500e movf 0xe, 0, 0 MOVF r0x0e, W 0000c2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000c4 500d movf 0xd, 0, 0 MOVF r0x0d, W 0000c6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000c8 500c movf 0xc, 0, 0 MOVF r0x0c, W 0000ca 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000cc 500b movf 0xb, 0, 0 MOVF r0x0b, W 0000ce 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000d0 500a movf 0xa, 0, 0 MOVF r0x0a, W 0000d2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000d4 5009 movf 0x9, 0, 0 MOVF r0x09, W 0000d6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000d8 5008 movf 0x8, 0, 0 MOVF r0x08, W 0000da 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000dc 5007 movf 0x7, 0, 0 MOVF r0x07, W 0000de 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000e0 ec6a call 0x2d4, 0 CALL __divslong 0000e2 f001 0000e4 6e07 movwf 0x7, 0 MOVWF r0x07 0000e6 cff3 movff 0xff3, 0x8 MOVFF PRODL, r0x08 0000e8 f008 0000ea cff4 movff 0xff4, 0x9 MOVFF PRODH, r0x09 0000ec f009 0000ee cfe9 movff 0xfe9, 0xa MOVFF FSR0L, r0x0a 0000f0 f00a 0000f2 0e08 movlw 0x8 MOVLW 0x08 0000f4 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0000f6 0e00 movlw 0 MOVLW 0x00 0000f8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000fa 0e00 movlw 0 MOVLW 0x00 0000fc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0000fe 0e00 movlw 0 MOVLW 0x00 000100 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000102 0e04 movlw 0x4 MOVLW 0x04 000104 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000106 500a movf 0xa, 0, 0 MOVF r0x0a, W 000108 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00010a 5009 movf 0x9, 0, 0 MOVF r0x09, W 00010c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00010e 5008 movf 0x8, 0, 0 MOVF r0x08, W 000110 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000112 5007 movf 0x7, 0, 0 MOVF r0x07, W 000114 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000116 ec6a call 0x2d4, 0 CALL __divslong 000118 f001 00011a 6e07 movwf 0x7, 0 MOVWF r0x07 00011c cff3 movff 0xff3, 0x8 MOVFF PRODL, r0x08 00011e f008 000120 cff4 movff 0xff4, 0x9 MOVFF PRODH, r0x09 000122 f009 000124 cfe9 movff 0xfe9, 0xa MOVFF FSR0L, r0x0a 000126 f00a 000128 0e08 movlw 0x8 MOVLW 0x08 00012a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00012c 0eff movlw 0xff MOVLW 0xff 00012e 2607 addwf 0x7, 0x1, 0 ADDWF r0x07, F 000130 0eff movlw 0xff MOVLW 0xff 000132 2208 addwfc 0x8, 0x1, 0 ADDWFC r0x08, F 000134 0eff movlw 0xff MOVLW 0xff 000136 2209 addwfc 0x9, 0x1, 0 ADDWFC r0x09, F 000138 0eff movlw 0xff MOVLW 0xff 00013a 220a addwfc 0xa, 0x1, 0 ADDWFC r0x0a, F 00013c 500a movf 0xa, 0, 0 MOVF r0x0a, W 00013e 0f80 addlw 0x80 ADDLW 0x80 000140 0f80 addlw 0x80 ADDLW 0x80 000142 e108 bnz 0x154 BNZ _00121_DS_ 000144 0e00 movlw 0 MOVLW 0x00 000146 5c09 subwf 0x9, 0, 0 SUBWF r0x09, W 000148 e105 bnz 0x154 BNZ _00121_DS_ 00014a 0e01 movlw 0x1 MOVLW 0x01 00014c 5c08 subwf 0x8, 0, 0 SUBWF r0x08, W 00014e e102 bnz 0x154 BNZ _00121_DS_ 000150 0e00 movlw 0 MOVLW 0x00 000152 5c07 subwf 0x7, 0, 0 SUBWF r0x07, W _00121_DS_: 000154 e20a bc 0x16a BC _00106_DS_ ; .line 20; serial.c USART_BRGH_HIGH, BAUD_SPBRG); 000156 5008 movf 0x8, 0, 0 MOVF r0x08, W 000158 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00015a 5007 movf 0x7, 0, 0 MOVF r0x07, W 00015c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00015e 0e3c movlw 0x3c MOVLW 0x3c 000160 ec41 call 0x882, 0 CALL _usart_open 000162 f004 000164 0e02 movlw 0x2 MOVLW 0x02 000166 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000168 d064 bra 0x232 BRA _00107_DS_ _00106_DS_: ; .line 25; serial.c BAUD_SPBRG = (INSTR_FREQ+8*ucon->baud)/ucon->baud/16 - 1; 00016a 5006 movf 0x6, 0, 0 MOVF r0x06, W 00016c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00016e 5005 movf 0x5, 0, 0 MOVF r0x05, W 000170 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000172 0e00 movlw 0 MOVLW 0x00 000174 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000176 0e08 movlw 0x8 MOVLW 0x08 000178 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00017a eca5 call 0x74a, 0 CALL __mulint 00017c f003 00017e 6e05 movwf 0x5, 0 MOVWF r0x05 000180 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000182 f006 000184 0e04 movlw 0x4 MOVLW 0x04 000186 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000188 6a09 clrf 0x9, 0 CLRF r0x09 00018a 6a0a clrf 0xa, 0 CLRF r0x0a 00018c 0e40 movlw 0x40 MOVLW 0x40 00018e 2605 addwf 0x5, 0x1, 0 ADDWF r0x05, F 000190 0e4b movlw 0x4b MOVLW 0x4b 000192 2206 addwfc 0x6, 0x1, 0 ADDWFC r0x06, F 000194 0e4c movlw 0x4c MOVLW 0x4c 000196 2209 addwfc 0x9, 0x1, 0 ADDWFC r0x09, F 000198 0e00 movlw 0 MOVLW 0x00 00019a 220a addwfc 0xa, 0x1, 0 ADDWFC r0x0a, F 00019c 500e movf 0xe, 0, 0 MOVF r0x0e, W 00019e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001a0 500d movf 0xd, 0, 0 MOVF r0x0d, W 0001a2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001a4 500c movf 0xc, 0, 0 MOVF r0x0c, W 0001a6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001a8 500b movf 0xb, 0, 0 MOVF r0x0b, W 0001aa 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001ac 500a movf 0xa, 0, 0 MOVF r0x0a, W 0001ae 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001b0 5009 movf 0x9, 0, 0 MOVF r0x09, W 0001b2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001b4 5006 movf 0x6, 0, 0 MOVF r0x06, W 0001b6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001b8 5005 movf 0x5, 0, 0 MOVF r0x05, W 0001ba 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001bc ec6a call 0x2d4, 0 CALL __divslong 0001be f001 0001c0 6e05 movwf 0x5, 0 MOVWF r0x05 0001c2 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 0001c4 f006 0001c6 cff4 movff 0xff4, 0x9 MOVFF PRODH, r0x09 0001c8 f009 0001ca cfe9 movff 0xfe9, 0xa MOVFF FSR0L, r0x0a 0001cc f00a 0001ce 0e08 movlw 0x8 MOVLW 0x08 0001d0 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0001d2 0e00 movlw 0 MOVLW 0x00 0001d4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001d6 0e00 movlw 0 MOVLW 0x00 0001d8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001da 0e00 movlw 0 MOVLW 0x00 0001dc 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001de 0e10 movlw 0x10 MOVLW 0x10 0001e0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001e2 500a movf 0xa, 0, 0 MOVF r0x0a, W 0001e4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001e6 5009 movf 0x9, 0, 0 MOVF r0x09, W 0001e8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001ea 5006 movf 0x6, 0, 0 MOVF r0x06, W 0001ec 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001ee 5005 movf 0x5, 0, 0 MOVF r0x05, W 0001f0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001f2 ec6a call 0x2d4, 0 CALL __divslong 0001f4 f001 0001f6 6e05 movwf 0x5, 0 MOVWF r0x05 0001f8 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 0001fa f006 0001fc cff4 movff 0xff4, 0x9 MOVFF PRODH, r0x09 0001fe f009 000200 cfe9 movff 0xfe9, 0xa MOVFF FSR0L, r0x0a 000202 f00a 000204 0e08 movlw 0x8 MOVLW 0x08 000206 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000208 0eff movlw 0xff MOVLW 0xff 00020a 2605 addwf 0x5, 0x1, 0 ADDWF r0x05, F 00020c 0eff movlw 0xff MOVLW 0xff 00020e 2206 addwfc 0x6, 0x1, 0 ADDWFC r0x06, F 000210 0eff movlw 0xff MOVLW 0xff 000212 2209 addwfc 0x9, 0x1, 0 ADDWFC r0x09, F 000214 0eff movlw 0xff MOVLW 0xff 000216 220a addwfc 0xa, 0x1, 0 ADDWFC r0x0a, F 000218 5005 movf 0x5, 0, 0 MOVF r0x05, W 00021a 6e07 movwf 0x7, 0 MOVWF r0x07 00021c 5006 movf 0x6, 0, 0 MOVF r0x06, W 00021e 6e08 movwf 0x8, 0 MOVWF r0x08 ; .line 31; serial.c USART_BRGH_LOW, BAUD_SPBRG); 000220 5008 movf 0x8, 0, 0 MOVF r0x08, W 000222 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000224 5007 movf 0x7, 0, 0 MOVF r0x07, W 000226 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000228 0e2c movlw 0x2c MOVLW 0x2c 00022a ec41 call 0x882, 0 CALL _usart_open 00022c f004 00022e 0e02 movlw 0x2 MOVLW 0x02 000230 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00107_DS_: ; .line 34; serial.c usart_putc(13); 000232 0e0d movlw 0xd MOVLW 0x0d 000234 ec78 call 0xaf0, 0 CALL _usart_putc 000236 f005 ; .line 35; serial.c RCSTAbits.SPEN = 1; //enable uart 000238 8eab bsf 0xab, 0x7, 0 BSF _RCSTAbits, 7 ; .line 36; serial.c RCSTAbits.CREN = 1; // continous receive enable 00023a 88ab bsf 0xab, 0x4, 0 BSF _RCSTAbits, 4 ; .line 37; serial.c return 1; 00023c 6af3 clrf 0xf3, 0 CLRF PRODL 00023e 0e01 movlw 0x1 MOVLW 0x01 000240 d028 bra 0x292 BRA _00115_DS_ _00109_DS_: ; .line 42; serial.c if(h==1) // SPI 000242 5000 movf 0, 0, 0 MOVF r0x00, W 000244 0a01 xorlw 0x1 XORLW 0x01 000246 e102 bnz 0x24c BNZ _00122_DS_ 000248 5001 movf 0x1, 0, 0 MOVF r0x01, W 00024a e001 bz 0x24e BZ _00123_DS_ _00122_DS_: 00024c d020 bra 0x28e BRA _00114_DS_ _00123_DS_: ; .line 45; serial.c if(ucon->mstr_slv) 00024e 0e04 movlw 0x4 MOVLW 0x04 000250 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 000252 0e00 movlw 0 MOVLW 0x00 000254 2203 addwfc 0x3, 0x1, 0 ADDWFC r0x03, F 000256 0e00 movlw 0 MOVLW 0x00 000258 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 00025a c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 00025c ffe9 00025e c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 000260 fff3 000262 5004 movf 0x4, 0, 0 MOVF r0x04, W 000264 ec5b call 0xab6, 0 CALL __gptrget1 000266 f005 000268 6e02 movwf 0x2, 0 MOVWF r0x02 00026a 5002 movf 0x2, 0, 0 MOVF r0x02, W 00026c e007 bz 0x27c BZ _00111_DS_ ; .line 48; serial.c TRISCbits.TRISC5 = 0; // serial data out SDO 00026e 9a94 bcf 0x94, 0x5, 0 BCF _TRISCbits, 5 ; .line 49; serial.c TRISCbits.TRISC4 = 1; //SDI 000270 8894 bsf 0x94, 0x4, 0 BSF _TRISCbits, 4 ; .line 50; serial.c TRISCbits.TRISC3 = 0; // SCK 000272 9694 bcf 0x94, 0x3, 0 BCF _TRISCbits, 3 ; .line 52; serial.c SSPSTAT = 0; // set data sampled at middle & CKE = 0 000274 6ac7 clrf 0xc7, 0 CLRF _SSPSTAT ; .line 53; serial.c SSPCON1 = 0x21; // Master mode Fosc/16, enable SPI 000276 0e21 movlw 0x21 MOVLW 0x21 000278 6ec6 movwf 0xc6, 0 MOVWF _SSPCON1 00027a d006 bra 0x288 BRA _00112_DS_ _00111_DS_: ; .line 58; serial.c TRISCbits.TRISC5 = 0; // serial data out SDO 00027c 9a94 bcf 0x94, 0x5, 0 BCF _TRISCbits, 5 ; .line 59; serial.c TRISCbits.TRISC4 = 1; //SDI 00027e 8894 bsf 0x94, 0x4, 0 BSF _TRISCbits, 4 ; .line 60; serial.c TRISCbits.TRISC3 = 1; // SCK set as input for slave 000280 8694 bsf 0x94, 0x3, 0 BSF _TRISCbits, 3 ; .line 62; serial.c SSPSTAT = 0; // set data sampled at middle & CKE = 0 000282 6ac7 clrf 0xc7, 0 CLRF _SSPSTAT ; .line 63; serial.c SSPCON1 = 0x25; // Slave mode,SS disabled enable SPI 000284 0e25 movlw 0x25 MOVLW 0x25 000286 6ec6 movwf 0xc6, 0 MOVWF _SSPCON1 _00112_DS_: ; .line 66; serial.c return 1; 000288 6af3 clrf 0xf3, 0 CLRF PRODL 00028a 0e01 movlw 0x1 MOVLW 0x01 00028c d002 bra 0x292 BRA _00115_DS_ _00114_DS_: ; .line 72; serial.c return 0; // not able to find the correct serial channel 00028e 6af3 clrf 0xf3, 0 CLRF PRODL 000290 6ae8 clrf 0xe8, 0 CLRF WREG _00115_DS_: 000292 cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 000294 f00e 000296 cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 000298 f00d 00029a cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 00029c f00c 00029e cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 0002a0 f00b 0002a2 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 0002a4 f00a 0002a6 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 0002a8 f009 0002aa cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 0002ac f008 0002ae cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 0002b0 f007 0002b2 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 0002b4 f006 0002b6 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 0002b8 f005 0002ba cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 0002bc f004 0002be cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 0002c0 f003 0002c2 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0002c4 f002 0002c6 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0002c8 f001 0002ca cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0002cc f000 0002ce cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0002d0 ffd9 0002d2 0012 return 0 RETURN ; Statistics: ; code size: 1496 (0x05d8) bytes ( 1.14%) ; 748 (0x02ec) words ; udata size: 6 (0x0006) bytes ( 0.16%) ; access size: 15 (0x000f) bytes end