gplink-0.13.7 beta Copyright (c) 1998-2005 gputils project Listing File Generated: 1-27-2011 20:19:21 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 Thu Jan 27 20:19:20 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 _GPIO_set_directions_A global _GPIO_set_directions_B global _GPIO_set_directions_C global _GPIO_set_directions global _GPIO_out_port_A global _GPIO_out_port_B global _GPIO_out_port_C global _GPIO_out_port global _GPIO_in_port_A global _GPIO_in_port_B global _GPIO_in_port_C global _GPIO_in_port global _GPIO_out_high global _GPIO_out_low global _GPIO_out_toggle global _GPIO_out_float global _GPIO_init global _GPIO_runOnce 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 PCL equ 0xff9 PCLATH equ 0xffa PCLATU equ 0xffb WREG equ 0xfe8 FSR0L equ 0xfe9 FSR1L equ 0xfe1 FSR2L equ 0xfd9 POSTDEC1 equ 0xfe5 PREINC1 equ 0xfe4 PLUSW2 equ 0xfdb PRODL equ 0xff3 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_gpio_test_0 udata _main_serial_setting_1_1 res 6 ;-------------------------------------------------------- ; interrupt vector ;-------------------------------------------------------- ;-------------------------------------------------------- ; global & static initialisations ;-------------------------------------------------------- ; I code from now on! ; ; Starting pCode block S_gpio_test__main code _main: ; .line 11; gpio_test.c int counter = 0; 000a02 6a00 clrf 0, 0 CLRF r0x00 000a04 6a01 clrf 0x1, 0 CLRF r0x01 ; .line 16; gpio_test.c serial_setting.baud = SERIAL_BAUD_57600; 000a06 0e08 movlw 0x8 MOVLW 0x08 000a08 0100 movlb 0 BANKSEL _main_serial_setting_1_1 000a0a 6f60 movwf 0x60, 0x1 MOVWF _main_serial_setting_1_1, B 000a0c 0100 movlb 0 BANKSEL (_main_serial_setting_1_1 + 1) 000a0e 6b61 clrf 0x61, 0x1 CLRF (_main_serial_setting_1_1 + 1), B ; .line 17; gpio_test.c serial_setting.stopbit = 1; 000a10 0e01 movlw 0x1 MOVLW 0x01 000a12 0100 movlb 0 BANKSEL (_main_serial_setting_1_1 + 3) 000a14 6f63 movwf 0x63, 0x1 MOVWF (_main_serial_setting_1_1 + 3), B ; .line 20; gpio_test.c SERIAL_initialize(uart, &serial_setting); 000a16 0e00 movlw 0 MOVLW HIGH(_main_serial_setting_1_1) 000a18 6e03 movwf 0x3, 0 MOVWF r0x03 000a1a 0e60 movlw 0x60 MOVLW LOW(_main_serial_setting_1_1) 000a1c 6e02 movwf 0x2, 0 MOVWF r0x02 000a1e 0e80 movlw 0x80 MOVLW 0x80 000a20 6e04 movwf 0x4, 0 MOVWF r0x04 000a22 5004 movf 0x4, 0, 0 MOVF r0x04, W 000a24 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a26 5003 movf 0x3, 0, 0 MOVF r0x03, W 000a28 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a2a 5002 movf 0x2, 0, 0 MOVF r0x02, W 000a2c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a2e 0e00 movlw 0 MOVLW 0x00 000a30 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a32 0e00 movlw 0 MOVLW 0x00 000a34 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a36 ec02 call 0x4, 0 CALL _SERIAL_initialize 000a38 f000 000a3a 0e05 movlw 0x5 MOVLW 0x05 000a3c 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 22; gpio_test.c GPIO_set_directions_B(portb_dir); 000a3e 0efc movlw 0xfc MOVLW 0xfc 000a40 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a42 ecd8 call 0xfb0, 0 CALL _GPIO_set_directions_B 000a44 f007 000a46 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F _00483_DS_: ; .line 28; gpio_test.c counter++; 000a48 2a00 incf 0, 0x1, 0 INCF r0x00, F 000a4a b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000a4c 2a01 incf 0x1, 0x1, 0 INCF r0x01, F ; .line 30; gpio_test.c if(counter > 15000) 000a4e 5001 movf 0x1, 0, 0 MOVF r0x01, W 000a50 0f80 addlw 0x80 ADDLW 0x80 000a52 0f46 addlw 0x46 ADDLW 0x46 000a54 e102 bnz 0xa5a BNZ _00490_DS_ 000a56 0e99 movlw 0x99 MOVLW 0x99 000a58 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00490_DS_: 000a5a e311 bnc 0xa7e BNC _00478_DS_ ; .line 32; gpio_test.c GPIO_out_low(GPIO_PIN_B0); 000a5c 0e00 movlw 0 MOVLW 0x00 000a5e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a60 0e08 movlw 0x8 MOVLW 0x08 000a62 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a64 ec41 call 0x682, 0 CALL _GPIO_out_low 000a66 f003 000a68 0e02 movlw 0x2 MOVLW 0x02 000a6a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 33; gpio_test.c GPIO_out_low(GPIO_PIN_B1); 000a6c 0e00 movlw 0 MOVLW 0x00 000a6e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a70 0e09 movlw 0x9 MOVLW 0x09 000a72 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a74 ec41 call 0x682, 0 CALL _GPIO_out_low 000a76 f003 000a78 0e02 movlw 0x2 MOVLW 0x02 000a7a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 000a7c d010 bra 0xa9e BRA _00479_DS_ _00478_DS_: ; .line 38; gpio_test.c GPIO_out_high(GPIO_PIN_B0); 000a7e 0e00 movlw 0 MOVLW 0x00 000a80 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a82 0e08 movlw 0x8 MOVLW 0x08 000a84 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a86 ec94 call 0x928, 0 CALL _GPIO_out_high 000a88 f004 000a8a 0e02 movlw 0x2 MOVLW 0x02 000a8c 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 39; gpio_test.c GPIO_out_high(GPIO_PIN_B1); 000a8e 0e00 movlw 0 MOVLW 0x00 000a90 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a92 0e09 movlw 0x9 MOVLW 0x09 000a94 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000a96 ec94 call 0x928, 0 CALL _GPIO_out_high 000a98 f004 000a9a 0e02 movlw 0x2 MOVLW 0x02 000a9c 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F _00479_DS_: ; .line 41; gpio_test.c if(counter == 30000) 000a9e 5000 movf 0, 0, 0 MOVF r0x00, W 000aa0 0a30 xorlw 0x30 XORLW 0x30 000aa2 e103 bnz 0xaaa BNZ _00491_DS_ 000aa4 5001 movf 0x1, 0, 0 MOVF r0x01, W 000aa6 0a75 xorlw 0x75 XORLW 0x75 000aa8 e001 bz 0xaac BZ _00492_DS_ _00491_DS_: 000aaa d7ce bra 0xa48 BRA _00483_DS_ _00492_DS_: ; .line 43; gpio_test.c counter = 0; 000aac 6a00 clrf 0, 0 CLRF r0x00 000aae 6a01 clrf 0x1, 0 CLRF r0x01 000ab0 d7cb bra 0xa48 BRA _00483_DS_ 000ab2 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_float code _GPIO_out_float: ; .line 180; gpio.c void GPIO_out_float( GPIO_pin pin) // set as input? 000768 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00076a ffe5 00076c cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00076e ffd9 000770 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000772 ffe5 000774 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000776 ffe5 000778 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 00077a ffe5 00077c c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 00077e ffe5 000780 0e02 movlw 0x2 MOVLW 0x02 000782 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000784 f000 000786 0e03 movlw 0x3 MOVLW 0x03 000788 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00078a f001 ; .line 182; gpio.c if( pin < 8) 00078c 0e00 movlw 0 MOVLW 0x00 00078e 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 000790 e102 bnz 0x796 BNZ _00458_DS_ 000792 0e08 movlw 0x8 MOVLW 0x08 000794 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00458_DS_: 000796 e20d bc 0x7b2 BC _00448_DS_ ; .line 184; gpio.c TRISA = TRISA | (0x01 << pin); 000798 0e01 movlw 0x1 MOVLW 0x01 00079a 6e02 movwf 0x2, 0 MOVWF r0x02 00079c 6a03 clrf 0x3, 0 CLRF r0x03 00079e 5000 movf 0, 0, 0 MOVF r0x00, W 0007a0 e006 bz 0x7ae BZ _00459_DS_ 0007a2 6ce8 negf 0xe8, 0 NEGF WREG 0007a4 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00460_DS_: 0007a6 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0007a8 3603 rlcf 0x3, 0x1, 0 RLCF r0x03, F 0007aa 0f01 addlw 0x1 ADDLW 0x01 0007ac e3fc bnc 0x7a6 BNC _00460_DS_ _00459_DS_: 0007ae 5002 movf 0x2, 0, 0 MOVF r0x02, W 0007b0 1292 iorwf 0x92, 0x1, 0 IORWF _TRISA, F _00448_DS_: ; .line 186; gpio.c if(8 <= pin < 16) 0007b2 0e00 movlw 0 MOVLW 0x00 0007b4 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0007b6 e102 bnz 0x7bc BNZ _00463_DS_ 0007b8 0e08 movlw 0x8 MOVLW 0x08 0007ba 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00463_DS_: 0007bc 70d8 btg 0xd8, 0, 0 BTG STATUS, 0 0007be 6a02 clrf 0x2, 0 CLRF r0x02 0007c0 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0007c2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0007c4 80d8 bsf 0xd8, 0, 0 BSF STATUS, 0 0007c6 66e8 tstfsz 0xe8, 0 TSTFSZ WREG 0007c8 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 0007ca 6a02 clrf 0x2, 0 CLRF r0x02 0007cc 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0007ce 5002 movf 0x2, 0, 0 MOVF r0x02, W 0007d0 0f80 addlw 0x80 ADDLW 0x80 0007d2 0f70 addlw 0x70 ADDLW 0x70 0007d4 e20f bc 0x7f4 BC _00450_DS_ ; .line 188; gpio.c TRISB = TRISB | (0x01 << (pin-8)); 0007d6 5000 movf 0, 0, 0 MOVF r0x00, W 0007d8 6e02 movwf 0x2, 0 MOVWF r0x02 0007da 0ef8 movlw 0xf8 MOVLW 0xf8 0007dc 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 0007de 0e01 movlw 0x1 MOVLW 0x01 0007e0 6e03 movwf 0x3, 0 MOVWF r0x03 0007e2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0007e4 e005 bz 0x7f0 BZ _00465_DS_ 0007e6 6ce8 negf 0xe8, 0 NEGF WREG 0007e8 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00466_DS_: 0007ea 3603 rlcf 0x3, 0x1, 0 RLCF r0x03, F 0007ec 0f01 addlw 0x1 ADDLW 0x01 0007ee e3fd bnc 0x7ea BNC _00466_DS_ _00465_DS_: 0007f0 5003 movf 0x3, 0, 0 MOVF r0x03, W 0007f2 1293 iorwf 0x93, 0x1, 0 IORWF _TRISB, F _00450_DS_: ; .line 190; gpio.c if(16 <= pin < 24) 0007f4 0e00 movlw 0 MOVLW 0x00 0007f6 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0007f8 e102 bnz 0x7fe BNZ _00469_DS_ 0007fa 0e10 movlw 0x10 MOVLW 0x10 0007fc 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00469_DS_: 0007fe 70d8 btg 0xd8, 0, 0 BTG STATUS, 0 000800 6a02 clrf 0x2, 0 CLRF r0x02 000802 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 000804 5002 movf 0x2, 0, 0 MOVF r0x02, W 000806 80d8 bsf 0xd8, 0, 0 BSF STATUS, 0 000808 66e8 tstfsz 0xe8, 0 TSTFSZ WREG 00080a 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 00080c 6a02 clrf 0x2, 0 CLRF r0x02 00080e 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 000810 5002 movf 0x2, 0, 0 MOVF r0x02, W 000812 0f80 addlw 0x80 ADDLW 0x80 000814 0f68 addlw 0x68 ADDLW 0x68 000816 e20d bc 0x832 BC _00453_DS_ ; .line 192; gpio.c TRISC = TRISC | (0x01 << (pin-16)); 000818 0ef0 movlw 0xf0 MOVLW 0xf0 00081a 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 00081c 0e01 movlw 0x1 MOVLW 0x01 00081e 6e01 movwf 0x1, 0 MOVWF r0x01 000820 5000 movf 0, 0, 0 MOVF r0x00, W 000822 e005 bz 0x82e BZ _00471_DS_ 000824 6ce8 negf 0xe8, 0 NEGF WREG 000826 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00472_DS_: 000828 3601 rlcf 0x1, 0x1, 0 RLCF r0x01, F 00082a 0f01 addlw 0x1 ADDLW 0x01 00082c e3fd bnc 0x828 BNC _00472_DS_ _00471_DS_: 00082e 5001 movf 0x1, 0, 0 MOVF r0x01, W 000830 1294 iorwf 0x94, 0x1, 0 IORWF _TRISC, F _00453_DS_: 000832 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 000834 f003 000836 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 000838 f002 00083a cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00083c f001 00083e cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000840 f000 000842 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000844 ffd9 000846 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_toggle code _GPIO_out_toggle: ; .line 158; gpio.c void GPIO_out_toggle( GPIO_pin pin) 000848 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00084a ffe5 00084c cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00084e ffd9 000850 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000852 ffe5 000854 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000856 ffe5 000858 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 00085a ffe5 00085c c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 00085e ffe5 000860 0e02 movlw 0x2 MOVLW 0x02 000862 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000864 f000 000866 0e03 movlw 0x3 MOVLW 0x03 000868 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00086a f001 ; .line 160; gpio.c if( pin < 8) 00086c 0e00 movlw 0 MOVLW 0x00 00086e 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 000870 e102 bnz 0x876 BNZ _00428_DS_ 000872 0e08 movlw 0x8 MOVLW 0x08 000874 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00428_DS_: 000876 e20d bc 0x892 BC _00418_DS_ ; .line 162; gpio.c LATA = LATA ^ (0x01 << pin); 000878 0e01 movlw 0x1 MOVLW 0x01 00087a 6e02 movwf 0x2, 0 MOVWF r0x02 00087c 6a03 clrf 0x3, 0 CLRF r0x03 00087e 5000 movf 0, 0, 0 MOVF r0x00, W 000880 e006 bz 0x88e BZ _00429_DS_ 000882 6ce8 negf 0xe8, 0 NEGF WREG 000884 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00430_DS_: 000886 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 000888 3603 rlcf 0x3, 0x1, 0 RLCF r0x03, F 00088a 0f01 addlw 0x1 ADDLW 0x01 00088c e3fc bnc 0x886 BNC _00430_DS_ _00429_DS_: 00088e 5002 movf 0x2, 0, 0 MOVF r0x02, W 000890 1a89 xorwf 0x89, 0x1, 0 XORWF _LATA, F _00418_DS_: ; .line 164; gpio.c if(8 <= pin < 16) 000892 0e00 movlw 0 MOVLW 0x00 000894 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 000896 e102 bnz 0x89c BNZ _00433_DS_ 000898 0e08 movlw 0x8 MOVLW 0x08 00089a 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00433_DS_: 00089c 70d8 btg 0xd8, 0, 0 BTG STATUS, 0 00089e 6a02 clrf 0x2, 0 CLRF r0x02 0008a0 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0008a2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0008a4 80d8 bsf 0xd8, 0, 0 BSF STATUS, 0 0008a6 66e8 tstfsz 0xe8, 0 TSTFSZ WREG 0008a8 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 0008aa 6a02 clrf 0x2, 0 CLRF r0x02 0008ac 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0008ae 5002 movf 0x2, 0, 0 MOVF r0x02, W 0008b0 0f80 addlw 0x80 ADDLW 0x80 0008b2 0f70 addlw 0x70 ADDLW 0x70 0008b4 e20f bc 0x8d4 BC _00420_DS_ ; .line 166; gpio.c LATB = LATB ^ (0x01 << (pin-8)); 0008b6 5000 movf 0, 0, 0 MOVF r0x00, W 0008b8 6e02 movwf 0x2, 0 MOVWF r0x02 0008ba 0ef8 movlw 0xf8 MOVLW 0xf8 0008bc 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 0008be 0e01 movlw 0x1 MOVLW 0x01 0008c0 6e03 movwf 0x3, 0 MOVWF r0x03 0008c2 5002 movf 0x2, 0, 0 MOVF r0x02, W 0008c4 e005 bz 0x8d0 BZ _00435_DS_ 0008c6 6ce8 negf 0xe8, 0 NEGF WREG 0008c8 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00436_DS_: 0008ca 3603 rlcf 0x3, 0x1, 0 RLCF r0x03, F 0008cc 0f01 addlw 0x1 ADDLW 0x01 0008ce e3fd bnc 0x8ca BNC _00436_DS_ _00435_DS_: 0008d0 5003 movf 0x3, 0, 0 MOVF r0x03, W 0008d2 1a8a xorwf 0x8a, 0x1, 0 XORWF _LATB, F _00420_DS_: ; .line 168; gpio.c if(16 <= pin < 24) 0008d4 0e00 movlw 0 MOVLW 0x00 0008d6 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0008d8 e102 bnz 0x8de BNZ _00439_DS_ 0008da 0e10 movlw 0x10 MOVLW 0x10 0008dc 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00439_DS_: 0008de 70d8 btg 0xd8, 0, 0 BTG STATUS, 0 0008e0 6a02 clrf 0x2, 0 CLRF r0x02 0008e2 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0008e4 5002 movf 0x2, 0, 0 MOVF r0x02, W 0008e6 80d8 bsf 0xd8, 0, 0 BSF STATUS, 0 0008e8 66e8 tstfsz 0xe8, 0 TSTFSZ WREG 0008ea 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 0008ec 6a02 clrf 0x2, 0 CLRF r0x02 0008ee 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0008f0 5002 movf 0x2, 0, 0 MOVF r0x02, W 0008f2 0f80 addlw 0x80 ADDLW 0x80 0008f4 0f68 addlw 0x68 ADDLW 0x68 0008f6 e20d bc 0x912 BC _00423_DS_ ; .line 170; gpio.c LATC = LATC ^ (0x01 << (pin-16)); 0008f8 0ef0 movlw 0xf0 MOVLW 0xf0 0008fa 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 0008fc 0e01 movlw 0x1 MOVLW 0x01 0008fe 6e01 movwf 0x1, 0 MOVWF r0x01 000900 5000 movf 0, 0, 0 MOVF r0x00, W 000902 e005 bz 0x90e BZ _00441_DS_ 000904 6ce8 negf 0xe8, 0 NEGF WREG 000906 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00442_DS_: 000908 3601 rlcf 0x1, 0x1, 0 RLCF r0x01, F 00090a 0f01 addlw 0x1 ADDLW 0x01 00090c e3fd bnc 0x908 BNC _00442_DS_ _00441_DS_: 00090e 5001 movf 0x1, 0, 0 MOVF r0x01, W 000910 1a8b xorwf 0x8b, 0x1, 0 XORWF _LATC, F _00423_DS_: 000912 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 000914 f003 000916 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 000918 f002 00091a cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00091c f001 00091e cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000920 f000 000922 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000924 ffd9 000926 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_low code _GPIO_out_low: ; .line 122; gpio.c void GPIO_out_low( GPIO_pin pin) 000682 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000684 ffe5 000686 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000688 ffd9 00068a c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 00068c ffe5 00068e c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000690 ffe5 000692 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 000694 ffe5 000696 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 000698 ffe5 00069a c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 00069c ffe5 00069e 0e02 movlw 0x2 MOVLW 0x02 0006a0 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0006a2 f000 0006a4 0e03 movlw 0x3 MOVLW 0x03 0006a6 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0006a8 f001 ; .line 127; gpio.c if( pin < 8) 0006aa 0e00 movlw 0 MOVLW 0x00 0006ac 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0006ae e102 bnz 0x6b4 BNZ _00398_DS_ 0006b0 0e08 movlw 0x8 MOVLW 0x08 0006b2 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00398_DS_: 0006b4 e211 bc 0x6d8 BC _00384_DS_ ; .line 129; gpio.c state = LATA & ((0x01 << (pin)) ^ 0xff); 0006b6 0e01 movlw 0x1 MOVLW 0x01 0006b8 6e02 movwf 0x2, 0 MOVWF r0x02 0006ba 6a03 clrf 0x3, 0 CLRF r0x03 0006bc 5000 movf 0, 0, 0 MOVF r0x00, W 0006be e006 bz 0x6cc BZ _00399_DS_ 0006c0 6ce8 negf 0xe8, 0 NEGF WREG 0006c2 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00400_DS_: 0006c4 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 0006c6 3603 rlcf 0x3, 0x1, 0 RLCF r0x03, F 0006c8 0f01 addlw 0x1 ADDLW 0x01 0006ca e3fc bnc 0x6c4 BNC _00400_DS_ _00399_DS_: 0006cc 0eff movlw 0xff MOVLW 0xff 0006ce 1a02 xorwf 0x2, 0x1, 0 XORWF r0x02, F 0006d0 5089 movf 0x89, 0, 0 MOVF _LATA, W 0006d2 1602 andwf 0x2, 0x1, 0 ANDWF r0x02, F ; .line 130; gpio.c LATA = state; 0006d4 c002 movff 0x2, 0xf89 MOVFF r0x02, _LATA 0006d6 ff89 _00384_DS_: ; .line 133; gpio.c if(8 <= pin && pin < 16) 0006d8 0e00 movlw 0 MOVLW 0x00 0006da 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0006dc e102 bnz 0x6e2 BNZ _00403_DS_ 0006de 0e08 movlw 0x8 MOVLW 0x08 0006e0 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00403_DS_: 0006e2 e31a bnc 0x718 BNC _00386_DS_ 0006e4 0e00 movlw 0 MOVLW 0x00 0006e6 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0006e8 e102 bnz 0x6ee BNZ _00404_DS_ 0006ea 0e10 movlw 0x10 MOVLW 0x10 0006ec 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00404_DS_: 0006ee e214 bc 0x718 BC _00386_DS_ ; .line 136; gpio.c state = LATB & ((0x01 << (pin-8)) ^ 0xff); 0006f0 5000 movf 0, 0, 0 MOVF r0x00, W 0006f2 6e03 movwf 0x3, 0 MOVWF r0x03 0006f4 0ef8 movlw 0xf8 MOVLW 0xf8 0006f6 2603 addwf 0x3, 0x1, 0 ADDWF r0x03, F 0006f8 0e01 movlw 0x1 MOVLW 0x01 0006fa 6e04 movwf 0x4, 0 MOVWF r0x04 0006fc 5003 movf 0x3, 0, 0 MOVF r0x03, W 0006fe e005 bz 0x70a BZ _00405_DS_ 000700 6ce8 negf 0xe8, 0 NEGF WREG 000702 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00406_DS_: 000704 3604 rlcf 0x4, 0x1, 0 RLCF r0x04, F 000706 0f01 addlw 0x1 ADDLW 0x01 000708 e3fd bnc 0x704 BNC _00406_DS_ _00405_DS_: 00070a 1c04 comf 0x4, 0, 0 COMF r0x04, W 00070c 6e03 movwf 0x3, 0 MOVWF r0x03 00070e 5003 movf 0x3, 0, 0 MOVF r0x03, W 000710 148a andwf 0x8a, 0, 0 ANDWF _LATB, W 000712 6e02 movwf 0x2, 0 MOVWF r0x02 ; .line 137; gpio.c LATB = state; 000714 c002 movff 0x2, 0xf8a MOVFF r0x02, _LATB 000716 ff8a _00386_DS_: ; .line 141; gpio.c if(16 <= pin && pin < 24) 000718 0e00 movlw 0 MOVLW 0x00 00071a 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 00071c e102 bnz 0x722 BNZ _00409_DS_ 00071e 0e10 movlw 0x10 MOVLW 0x10 000720 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00409_DS_: 000722 e315 bnc 0x74e BNC _00391_DS_ 000724 0e00 movlw 0 MOVLW 0x00 000726 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 000728 e102 bnz 0x72e BNZ _00410_DS_ 00072a 0e18 movlw 0x18 MOVLW 0x18 00072c 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00410_DS_: 00072e e20f bc 0x74e BC _00391_DS_ ; .line 143; gpio.c state = LATC & ((0x01 << (pin-16)) ^ 0xff); 000730 0ef0 movlw 0xf0 MOVLW 0xf0 000732 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 000734 0e01 movlw 0x1 MOVLW 0x01 000736 6e01 movwf 0x1, 0 MOVWF r0x01 000738 5000 movf 0, 0, 0 MOVF r0x00, W 00073a e005 bz 0x746 BZ _00411_DS_ 00073c 6ce8 negf 0xe8, 0 NEGF WREG 00073e 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00412_DS_: 000740 3601 rlcf 0x1, 0x1, 0 RLCF r0x01, F 000742 0f01 addlw 0x1 ADDLW 0x01 000744 e3fd bnc 0x740 BNC _00412_DS_ _00411_DS_: 000746 1c01 comf 0x1, 0, 0 COMF r0x01, W 000748 6e00 movwf 0, 0 MOVWF r0x00 00074a 5000 movf 0, 0, 0 MOVF r0x00, W 00074c 168b andwf 0x8b, 0x1, 0 ANDWF _LATC, F _00391_DS_: ; .line 144; gpio.c LATC = state; 00074e cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 000750 f004 000752 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 000754 f003 000756 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 000758 f002 00075a cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 00075c f001 00075e cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000760 f000 000762 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000764 ffd9 000766 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_high code _GPIO_out_high: ; .line 86; gpio.c void GPIO_out_high( GPIO_pin pin) 000928 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00092a ffe5 00092c cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 00092e ffd9 000930 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000932 ffe5 000934 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000936 ffe5 000938 c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 00093a ffe5 00093c c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 00093e ffe5 000940 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 000942 ffe5 000944 0e02 movlw 0x2 MOVLW 0x02 000946 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000948 f000 00094a 0e03 movlw 0x3 MOVLW 0x03 00094c cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 00094e f001 ; .line 90; gpio.c if( pin < 8) 000950 0e00 movlw 0 MOVLW 0x00 000952 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 000954 e102 bnz 0x95a BNZ _00366_DS_ 000956 0e08 movlw 0x8 MOVLW 0x08 000958 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00366_DS_: 00095a e20f bc 0x97a BC _00352_DS_ ; .line 92; gpio.c state = LATA | (0x01 << (pin)); 00095c 0e01 movlw 0x1 MOVLW 0x01 00095e 6e02 movwf 0x2, 0 MOVWF r0x02 000960 6a03 clrf 0x3, 0 CLRF r0x03 000962 5000 movf 0, 0, 0 MOVF r0x00, W 000964 e006 bz 0x972 BZ _00367_DS_ 000966 6ce8 negf 0xe8, 0 NEGF WREG 000968 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00368_DS_: 00096a 3602 rlcf 0x2, 0x1, 0 RLCF r0x02, F 00096c 3603 rlcf 0x3, 0x1, 0 RLCF r0x03, F 00096e 0f01 addlw 0x1 ADDLW 0x01 000970 e3fc bnc 0x96a BNC _00368_DS_ _00367_DS_: 000972 5089 movf 0x89, 0, 0 MOVF _LATA, W 000974 1202 iorwf 0x2, 0x1, 0 IORWF r0x02, F ; .line 93; gpio.c LATA = state; 000976 c002 movff 0x2, 0xf89 MOVFF r0x02, _LATA 000978 ff89 _00352_DS_: ; .line 97; gpio.c if(8 <= pin && pin < 16) 00097a 0e00 movlw 0 MOVLW 0x00 00097c 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 00097e e102 bnz 0x984 BNZ _00370_DS_ 000980 0e08 movlw 0x8 MOVLW 0x08 000982 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00370_DS_: 000984 e318 bnc 0x9b6 BNC _00354_DS_ 000986 0e00 movlw 0 MOVLW 0x00 000988 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 00098a e102 bnz 0x990 BNZ _00371_DS_ 00098c 0e10 movlw 0x10 MOVLW 0x10 00098e 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00371_DS_: 000990 e212 bc 0x9b6 BC _00354_DS_ ; .line 100; gpio.c state = LATB | (0x01 << (pin-8)); 000992 5000 movf 0, 0, 0 MOVF r0x00, W 000994 6e03 movwf 0x3, 0 MOVWF r0x03 000996 0ef8 movlw 0xf8 MOVLW 0xf8 000998 2603 addwf 0x3, 0x1, 0 ADDWF r0x03, F 00099a 0e01 movlw 0x1 MOVLW 0x01 00099c 6e04 movwf 0x4, 0 MOVWF r0x04 00099e 5003 movf 0x3, 0, 0 MOVF r0x03, W 0009a0 e005 bz 0x9ac BZ _00372_DS_ 0009a2 6ce8 negf 0xe8, 0 NEGF WREG 0009a4 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00373_DS_: 0009a6 3604 rlcf 0x4, 0x1, 0 RLCF r0x04, F 0009a8 0f01 addlw 0x1 ADDLW 0x01 0009aa e3fd bnc 0x9a6 BNC _00373_DS_ _00372_DS_: 0009ac 5004 movf 0x4, 0, 0 MOVF r0x04, W 0009ae 108a iorwf 0x8a, 0, 0 IORWF _LATB, W 0009b0 6e02 movwf 0x2, 0 MOVWF r0x02 ; .line 101; gpio.c LATB = state; 0009b2 c002 movff 0x2, 0xf8a MOVFF r0x02, _LATB 0009b4 ff8a _00354_DS_: ; .line 104; gpio.c if( 16 <= pin && pin < 24) 0009b6 0e00 movlw 0 MOVLW 0x00 0009b8 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0009ba e102 bnz 0x9c0 BNZ _00375_DS_ 0009bc 0e10 movlw 0x10 MOVLW 0x10 0009be 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00375_DS_: 0009c0 e313 bnc 0x9e8 BNC _00359_DS_ 0009c2 0e00 movlw 0 MOVLW 0x00 0009c4 5c01 subwf 0x1, 0, 0 SUBWF r0x01, W 0009c6 e102 bnz 0x9cc BNZ _00376_DS_ 0009c8 0e18 movlw 0x18 MOVLW 0x18 0009ca 5c00 subwf 0, 0, 0 SUBWF r0x00, W _00376_DS_: 0009cc e20d bc 0x9e8 BC _00359_DS_ ; .line 106; gpio.c state = LATC | (0x01 << (pin-16)); 0009ce 0ef0 movlw 0xf0 MOVLW 0xf0 0009d0 2600 addwf 0, 0x1, 0 ADDWF r0x00, F 0009d2 0e01 movlw 0x1 MOVLW 0x01 0009d4 6e01 movwf 0x1, 0 MOVWF r0x01 0009d6 5000 movf 0, 0, 0 MOVF r0x00, W 0009d8 e005 bz 0x9e4 BZ _00377_DS_ 0009da 6ce8 negf 0xe8, 0 NEGF WREG 0009dc 90d8 bcf 0xd8, 0, 0 BCF STATUS, 0 _00378_DS_: 0009de 3601 rlcf 0x1, 0x1, 0 RLCF r0x01, F 0009e0 0f01 addlw 0x1 ADDLW 0x01 0009e2 e3fd bnc 0x9de BNC _00378_DS_ _00377_DS_: 0009e4 5001 movf 0x1, 0, 0 MOVF r0x01, W 0009e6 128b iorwf 0x8b, 0x1, 0 IORWF _LATC, F _00359_DS_: ; .line 107; gpio.c LATC = state; 0009e8 cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 0009ea f004 0009ec cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 0009ee f003 0009f0 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0009f2 f002 0009f4 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0009f6 f001 0009f8 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0009fa f000 0009fc cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0009fe ffd9 000a00 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_in_port code _GPIO_in_port: ; .line 72; gpio.c GPIO_value GPIO_in_port( GPIO_port p ) { 000e44 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000e46 ffe5 000e48 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000e4a ffd9 000e4c c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000e4e ffe5 000e50 0e02 movlw 0x2 MOVLW 0x02 000e52 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000e54 f000 ; .line 73; gpio.c switch (p) { 000e56 5000 movf 0, 0, 0 MOVF r0x00, W 000e58 e007 bz 0xe68 BZ _00328_DS_ 000e5a 5000 movf 0, 0, 0 MOVF r0x00, W 000e5c 0a08 xorlw 0x8 XORLW 0x08 000e5e e009 bz 0xe72 BZ _00329_DS_ 000e60 5000 movf 0, 0, 0 MOVF r0x00, W 000e62 0a10 xorlw 0x10 XORLW 0x10 000e64 e00b bz 0xe7c BZ _00330_DS_ 000e66 d00e bra 0xe84 BRA _00336_DS_ _00328_DS_: ; .line 74; gpio.c case GPIO_PORT(0): return GPIO_in_port_A(); break; 000e68 ec05 call 0x100a, 0 CALL _GPIO_in_port_A 000e6a f008 000e6c 6e00 movwf 0, 0 MOVWF r0x00 000e6e 5000 movf 0, 0, 0 MOVF r0x00, W 000e70 d009 bra 0xe84 BRA _00336_DS_ _00329_DS_: ; .line 75; gpio.c case GPIO_PORT(1): return GPIO_in_port_B(); break; 000e72 ecfd call 0xffa, 0 CALL _GPIO_in_port_B 000e74 f007 000e76 6e00 movwf 0, 0 MOVWF r0x00 000e78 5000 movf 0, 0, 0 MOVF r0x00, W 000e7a d004 bra 0xe84 BRA _00336_DS_ _00330_DS_: ; .line 76; gpio.c case GPIO_PORT(2): return GPIO_in_port_C(); break; 000e7c ecf5 call 0xfea, 0 CALL _GPIO_in_port_C 000e7e f007 000e80 6e00 movwf 0, 0 MOVWF r0x00 000e82 5000 movf 0, 0, 0 MOVF r0x00, W _00336_DS_: ; .line 82; gpio.c }; 000e84 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000e86 f000 000e88 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000e8a ffd9 000e8c 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_in_port_C code _GPIO_in_port_C: ; .line 67; gpio.c GPIO_value GPIO_in_port_C( void ) {return PORTC; } 000fea cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000fec ffe5 000fee cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000ff0 ffd9 000ff2 5082 movf 0x82, 0, 0 MOVF _PORTC, W 000ff4 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000ff6 ffd9 000ff8 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_in_port_B code _GPIO_in_port_B: ; .line 65; gpio.c GPIO_value GPIO_in_port_B( void ) {return PORTB; } 000ffa cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000ffc ffe5 000ffe cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001000 ffd9 001002 5081 movf 0x81, 0, 0 MOVF _PORTB, W 001004 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001006 ffd9 001008 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_in_port_A code _GPIO_in_port_A: ; .line 63; gpio.c GPIO_value GPIO_in_port_A( void ) {return PORTA; } 00100a cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00100c ffe5 00100e cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001010 ffd9 001012 5080 movf 0x80, 0, 0 MOVF _PORTA, W 001014 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001016 ffd9 001018 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_port code _GPIO_out_port: ; .line 49; gpio.c void GPIO_out_port( GPIO_port p, GPIO_value v) { 000cd8 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000cda ffe5 000cdc cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000cde ffd9 000ce0 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000ce2 ffe5 000ce4 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000ce6 ffe5 000ce8 0e02 movlw 0x2 MOVLW 0x02 000cea cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000cec f000 000cee 0e03 movlw 0x3 MOVLW 0x03 000cf0 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000cf2 f001 ; .line 50; gpio.c switch (p) { 000cf4 5000 movf 0, 0, 0 MOVF r0x00, W 000cf6 e007 bz 0xd06 BZ _00290_DS_ 000cf8 5000 movf 0, 0, 0 MOVF r0x00, W 000cfa 0a08 xorlw 0x8 XORLW 0x08 000cfc e00a bz 0xd12 BZ _00291_DS_ 000cfe 5000 movf 0, 0, 0 MOVF r0x00, W 000d00 0a10 xorlw 0x10 XORLW 0x10 000d02 e00d bz 0xd1e BZ _00292_DS_ 000d04 d011 bra 0xd28 BRA _00298_DS_ _00290_DS_: ; .line 51; gpio.c case GPIO_PORT(0): GPIO_out_port_A(v); break; 000d06 5001 movf 0x1, 0, 0 MOVF r0x01, W 000d08 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000d0a ecc4 call 0xf88, 0 CALL _GPIO_out_port_A 000d0c f007 000d0e 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F 000d10 d00b bra 0xd28 BRA _00298_DS_ _00291_DS_: ; .line 52; gpio.c case GPIO_PORT(1): GPIO_out_port_B(v); break; 000d12 5001 movf 0x1, 0, 0 MOVF r0x01, W 000d14 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000d16 ecba call 0xf74, 0 CALL _GPIO_out_port_B 000d18 f007 000d1a 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F 000d1c d005 bra 0xd28 BRA _00298_DS_ _00292_DS_: ; .line 53; gpio.c case GPIO_PORT(2): GPIO_out_port_C(v); break; 000d1e 5001 movf 0x1, 0, 0 MOVF r0x01, W 000d20 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000d22 ecb0 call 0xf60, 0 CALL _GPIO_out_port_C 000d24 f007 000d26 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F _00298_DS_: ; .line 59; gpio.c }; 000d28 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000d2a f001 000d2c cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000d2e f000 000d30 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000d32 ffd9 000d34 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_port_C code _GPIO_out_port_C: ; .line 44; gpio.c void GPIO_out_port_C( GPIO_value v) {LATC = v;} 000f60 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000f62 ffe5 000f64 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000f66 ffd9 000f68 0e02 movlw 0x2 MOVLW 0x02 000f6a cfdb movff 0xfdb, 0xf8b MOVFF PLUSW2, _LATC 000f6c ff8b 000f6e cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000f70 ffd9 000f72 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_port_B code _GPIO_out_port_B: ; .line 42; gpio.c void GPIO_out_port_B( GPIO_value v) {LATB = v;} 000f74 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000f76 ffe5 000f78 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000f7a ffd9 000f7c 0e02 movlw 0x2 MOVLW 0x02 000f7e cfdb movff 0xfdb, 0xf8a MOVFF PLUSW2, _LATB 000f80 ff8a 000f82 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000f84 ffd9 000f86 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_out_port_A code _GPIO_out_port_A: ; .line 40; gpio.c void GPIO_out_port_A( GPIO_value v) {LATA = v;} 000f88 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000f8a ffe5 000f8c cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000f8e ffd9 000f90 0e02 movlw 0x2 MOVLW 0x02 000f92 cfdb movff 0xfdb, 0xf89 MOVFF PLUSW2, _LATA 000f94 ff89 000f96 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000f98 ffd9 000f9a 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_set_directions code _GPIO_set_directions: ; .line 25; gpio.c void GPIO_set_directions( GPIO_port p, GPIO_value d) { 000d36 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000d38 ffe5 000d3a cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000d3c ffd9 000d3e c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000d40 ffe5 000d42 c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000d44 ffe5 000d46 0e02 movlw 0x2 MOVLW 0x02 000d48 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000d4a f000 000d4c 0e03 movlw 0x3 MOVLW 0x03 000d4e cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000d50 f001 ; .line 26; gpio.c switch (p) { 000d52 5000 movf 0, 0, 0 MOVF r0x00, W 000d54 e007 bz 0xd64 BZ _00252_DS_ 000d56 5000 movf 0, 0, 0 MOVF r0x00, W 000d58 0a08 xorlw 0x8 XORLW 0x08 000d5a e00a bz 0xd70 BZ _00253_DS_ 000d5c 5000 movf 0, 0, 0 MOVF r0x00, W 000d5e 0a10 xorlw 0x10 XORLW 0x10 000d60 e00d bz 0xd7c BZ _00254_DS_ 000d62 d011 bra 0xd86 BRA _00260_DS_ _00252_DS_: ; .line 27; gpio.c case GPIO_PORT(0): GPIO_set_directions_A(d); break; 000d64 5001 movf 0x1, 0, 0 MOVF r0x01, W 000d66 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000d68 ece2 call 0xfc4, 0 CALL _GPIO_set_directions_A 000d6a f007 000d6c 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F 000d6e d00b bra 0xd86 BRA _00260_DS_ _00253_DS_: ; .line 28; gpio.c case GPIO_PORT(1): GPIO_set_directions_B(d); break; 000d70 5001 movf 0x1, 0, 0 MOVF r0x01, W 000d72 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000d74 ecd8 call 0xfb0, 0 CALL _GPIO_set_directions_B 000d76 f007 000d78 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F 000d7a d005 bra 0xd86 BRA _00260_DS_ _00254_DS_: ; .line 29; gpio.c case GPIO_PORT(2): GPIO_set_directions_C(d); break; 000d7c 5001 movf 0x1, 0, 0 MOVF r0x01, W 000d7e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000d80 ecce call 0xf9c, 0 CALL _GPIO_set_directions_C 000d82 f007 000d84 2ae1 incf 0xe1, 0x1, 0 INCF FSR1L, F _00260_DS_: ; .line 35; gpio.c }; 000d86 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000d88 f001 000d8a cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000d8c f000 000d8e cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000d90 ffd9 000d92 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_set_directions_C code _GPIO_set_directions_C: ; .line 18; gpio.c void GPIO_set_directions_C( GPIO_value d) { TRISC = d; } 000f9c cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000f9e ffe5 000fa0 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000fa2 ffd9 000fa4 0e02 movlw 0x2 MOVLW 0x02 000fa6 cfdb movff 0xfdb, 0xf94 MOVFF PLUSW2, _TRISC 000fa8 ff94 000faa cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000fac ffd9 000fae 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_set_directions_B code _GPIO_set_directions_B: ; .line 16; gpio.c void GPIO_set_directions_B( GPIO_value d) { TRISB = d; } 000fb0 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000fb2 ffe5 000fb4 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000fb6 ffd9 000fb8 0e02 movlw 0x2 MOVLW 0x02 000fba cfdb movff 0xfdb, 0xf93 MOVFF PLUSW2, _TRISB 000fbc ff93 000fbe cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000fc0 ffd9 000fc2 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_set_directions_A code _GPIO_set_directions_A: ; .line 14; gpio.c void GPIO_set_directions_A(GPIO_value d) { TRISA = d; } 000fc4 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000fc6 ffe5 000fc8 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000fca ffd9 000fcc 0e02 movlw 0x2 MOVLW 0x02 000fce cfdb movff 0xfdb, 0xf92 MOVFF PLUSW2, _TRISA 000fd0 ff92 000fd2 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000fd4 ffd9 000fd6 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_runOnce code _GPIO_runOnce: ; .line 8; gpio.c void GPIO_runOnce( void ){ 00102a cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 00102c ffe5 00102e cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 001030 ffd9 ; .line 9; gpio.c } 001032 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 001034 ffd9 001036 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__GPIO_init code _GPIO_init: ; .line 5; gpio.c int GPIO_init( void ){ 000fd8 cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000fda ffe5 000fdc cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000fde ffd9 ; .line 6; gpio.c return 0; 000fe0 6af3 clrf 0xf3, 0 CLRF PRODL 000fe2 6ae8 clrf 0xe8, 0 CLRF WREG 000fe4 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000fe6 ffd9 000fe8 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__SERIAL_writable code _SERIAL_writable: ; .line 173; serial.c bool SERIAL_writable(SERIAL_handle h) 000e8e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000e90 ffe5 000e92 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000e94 ffd9 000e96 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000e98 ffe5 000e9a c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000e9c ffe5 000e9e 0e02 movlw 0x2 MOVLW 0x02 000ea0 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000ea2 f000 000ea4 0e03 movlw 0x3 MOVLW 0x03 000ea6 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000ea8 f001 ; .line 175; serial.c if(h==0) 000eaa 5000 movf 0, 0, 0 MOVF r0x00, W 000eac 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 000eae e109 bnz 0xec2 BNZ _00221_DS_ ; .line 177; serial.c if(usart_busy()) 000eb0 ec23 call 0x1046, 0 CALL _usart_busy 000eb2 f008 000eb4 6e00 movwf 0, 0 MOVWF r0x00 000eb6 5000 movf 0, 0, 0 MOVF r0x00, W 000eb8 e002 bz 0xebe BZ _00218_DS_ ; .line 179; serial.c return 0; // not writable 000eba 6ae8 clrf 0xe8, 0 CLRF WREG 000ebc d003 bra 0xec4 BRA _00222_DS_ _00218_DS_: ; .line 183; serial.c return 1; // writable 000ebe 0e01 movlw 0x1 MOVLW 0x01 000ec0 d001 bra 0xec4 BRA _00222_DS_ _00221_DS_: ; .line 187; serial.c return 0; 000ec2 6ae8 clrf 0xe8, 0 CLRF WREG _00222_DS_: 000ec4 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000ec6 f001 000ec8 cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000eca f000 000ecc cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000ece ffd9 000ed0 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__SERIAL_readable code _SERIAL_readable: ; .line 155; serial.c bool SERIAL_readable(SERIAL_handle h) 000dee cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000df0 ffe5 000df2 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000df4 ffd9 000df6 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000df8 ffe5 000dfa c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 000dfc ffe5 000dfe 0e02 movlw 0x2 MOVLW 0x02 000e00 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 000e02 f000 000e04 0e03 movlw 0x3 MOVLW 0x03 000e06 cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 000e08 f001 ; .line 157; serial.c if(h == 0) //uart 000e0a 5000 movf 0, 0, 0 MOVF r0x00, W 000e0c 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 000e0e e106 bnz 0xe1c BNZ _00198_DS_ ; .line 159; serial.c if(PIR1bits.RCIF)return 1; 000e10 aa9e btfss 0x9e, 0x5, 0 BTFSS _PIR1bits, 5 000e12 d002 bra 0xe18 BRA _00195_DS_ 000e14 0e01 movlw 0x1 MOVLW 0x01 000e16 d00f bra 0xe36 BRA _00204_DS_ _00195_DS_: ; .line 160; serial.c else return 0; 000e18 6ae8 clrf 0xe8, 0 CLRF WREG 000e1a d00d bra 0xe36 BRA _00204_DS_ _00198_DS_: ; .line 162; serial.c if(h==1) //SPI 000e1c 5000 movf 0, 0, 0 MOVF r0x00, W 000e1e 0a01 xorlw 0x1 XORLW 0x01 000e20 e102 bnz 0xe26 BNZ _00210_DS_ 000e22 5001 movf 0x1, 0, 0 MOVF r0x01, W 000e24 e001 bz 0xe28 BZ _00211_DS_ _00210_DS_: 000e26 d006 bra 0xe34 BRA _00203_DS_ _00211_DS_: ; .line 164; serial.c if(SSPSTAT & 0x01) return 1; 000e28 a0c7 btfss 0xc7, 0, 0 BTFSS _SSPSTAT, 0 000e2a d002 bra 0xe30 BRA _00200_DS_ 000e2c 0e01 movlw 0x1 MOVLW 0x01 000e2e d003 bra 0xe36 BRA _00204_DS_ _00200_DS_: ; .line 165; serial.c else return 0; 000e30 6ae8 clrf 0xe8, 0 CLRF WREG 000e32 d001 bra 0xe36 BRA _00204_DS_ _00203_DS_: ; .line 168; serial.c return 0; 000e34 6ae8 clrf 0xe8, 0 CLRF WREG _00204_DS_: 000e36 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 000e38 f001 000e3a cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 000e3c f000 000e3e cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 000e40 ffd9 000e42 0012 return 0 RETURN ; ; Starting pCode block S_gpio_test__SERIAL_write code _SERIAL_write: ; .line 142; serial.c void SERIAL_write(SERIAL_handle h,SERIAL_datatype *t, int n) 00057e cfd9 movff 0xfd9, 0xfe5 MOVFF FSR2L, POSTDEC1 000580 ffe5 000582 cfe1 movff 0xfe1, 0xfd9 MOVFF FSR1L, FSR2L 000584 ffd9 000586 c000 movff 0, 0xfe5 MOVFF r0x00, POSTDEC1 000588 ffe5 00058a c001 movff 0x1, 0xfe5 MOVFF r0x01, POSTDEC1 00058c ffe5 00058e c002 movff 0x2, 0xfe5 MOVFF r0x02, POSTDEC1 000590 ffe5 000592 c003 movff 0x3, 0xfe5 MOVFF r0x03, POSTDEC1 000594 ffe5 000596 c004 movff 0x4, 0xfe5 MOVFF r0x04, POSTDEC1 000598 ffe5 00059a c005 movff 0x5, 0xfe5 MOVFF r0x05, POSTDEC1 00059c ffe5 00059e c006 movff 0x6, 0xfe5 MOVFF r0x06, POSTDEC1 0005a0 ffe5 0005a2 c007 movff 0x7, 0xfe5 MOVFF r0x07, POSTDEC1 0005a4 ffe5 0005a6 c008 movff 0x8, 0xfe5 MOVFF r0x08, POSTDEC1 0005a8 ffe5 0005aa c009 movff 0x9, 0xfe5 MOVFF r0x09, POSTDEC1 0005ac ffe5 0005ae c00a movff 0xa, 0xfe5 MOVFF r0x0a, POSTDEC1 0005b0 ffe5 0005b2 c00b movff 0xb, 0xfe5 MOVFF r0x0b, POSTDEC1 0005b4 ffe5 0005b6 0e02 movlw 0x2 MOVLW 0x02 0005b8 cfdb movff 0xfdb, 0 MOVFF PLUSW2, r0x00 0005ba f000 0005bc 0e03 movlw 0x3 MOVLW 0x03 0005be cfdb movff 0xfdb, 0x1 MOVFF PLUSW2, r0x01 0005c0 f001 0005c2 0e04 movlw 0x4 MOVLW 0x04 0005c4 cfdb movff 0xfdb, 0x2 MOVFF PLUSW2, r0x02 0005c6 f002 0005c8 0e05 movlw 0x5 MOVLW 0x05 0005ca cfdb movff 0xfdb, 0x3 MOVFF PLUSW2, r0x03 0005cc f003 0005ce 0e06 movlw 0x6 MOVLW 0x06 0005d0 cfdb movff 0xfdb, 0x4 MOVFF PLUSW2, r0x04 0005d2 f004 0005d4 0e07 movlw 0x7 MOVLW 0x07 0005d6 cfdb movff 0xfdb, 0x5 MOVFF PLUSW2, r0x05 0005d8 f005 0005da 0e08 movlw 0x8 MOVLW 0x08 0005dc cfdb movff 0xfdb, 0x6 MOVFF PLUSW2, r0x06 0005de f006 ; .line 146; serial.c if(h==0 || h==1) // will spi pose a problem by overwriting previous data?. 0005e0 5000 movf 0, 0, 0 MOVF r0x00, W 0005e2 1001 iorwf 0x1, 0, 0 IORWF r0x01, W 0005e4 e006 bz 0x5f2 BZ _00185_DS_ 0005e6 5000 movf 0, 0, 0 MOVF r0x00, W 0005e8 0a01 xorlw 0x1 XORLW 0x01 0005ea e102 bnz 0x5f0 BNZ _00187_DS_ 0005ec 5001 movf 0x1, 0, 0 MOVF r0x01, W 0005ee e001 bz 0x5f2 BZ _00185_DS_ _00187_DS_: 0005f0 d02d bra 0x64c BRA _00181_DS_ _00185_DS_: ; .line 148; serial.c for( i = 0; ibaud) 000066 c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 000068 ffe9 00006a c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 00006c fff3 00006e 5004 movf 0x4, 0, 0 MOVF r0x04, W 000070 ec69 call 0xed2, 0 CALL __gptrget2 000072 f007 000074 6e05 movwf 0x5, 0 MOVWF r0x05 000076 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000078 f006 00007a 0e00 movlw 0 MOVLW 0x00 00007c 5c06 subwf 0x6, 0, 0 SUBWF r0x06, W 00007e e102 bnz 0x84 BNZ _00130_DS_ 000080 0e0a movlw 0xa MOVLW 0x0a 000082 5c05 subwf 0x5, 0, 0 SUBWF r0x05, W _00130_DS_: 000084 b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 000086 d057 bra 0x136 BRA _00115_DS_ 000088 c00d movff 0xd, 0xfe5 MOVFF r0x0d, POSTDEC1 00008a ffe5 00008c c00e movff 0xe, 0xfe5 MOVFF r0x0e, POSTDEC1 00008e ffe5 000090 6a0e clrf 0xe, 0 CLRF r0x0e 000092 3405 rlcf 0x5, 0, 0 RLCF r0x05, W 000094 360e rlcf 0xe, 0x1, 0 RLCF r0x0e, F 000096 34e8 rlcf 0xe8, 0, 0 RLCF WREG, W 000098 360e rlcf 0xe, 0x1, 0 RLCF r0x0e, F 00009a 0bfc andlw 0xfc ANDLW 0xfc 00009c 6e0d movwf 0xd, 0 MOVWF r0x0d 00009e 0e00 movlw 0 MOVLW UPPER(_00131_DS_) 0000a0 6efb movwf 0xfb, 0 MOVWF PCLATU 0000a2 0e00 movlw 0 MOVLW HIGH(_00131_DS_) 0000a4 6efa movwf 0xfa, 0 MOVWF PCLATH 0000a6 0ebe movlw 0xbe MOVLW LOW(_00131_DS_) 0000a8 260d addwf 0xd, 0x1, 0 ADDWF r0x0d, F 0000aa 500e movf 0xe, 0, 0 MOVF r0x0e, W 0000ac 22fa addwfc 0xfa, 0x1, 0 ADDWFC PCLATH, F 0000ae b0d8 btfsc 0xd8, 0, 0 BTFSC STATUS, 0 0000b0 2afb incf 0xfb, 0x1, 0 INCF PCLATU, F 0000b2 500d movf 0xd, 0, 0 MOVF r0x0d, W 0000b4 cfe4 movff 0xfe4, 0xe MOVFF PREINC1, r0x0e 0000b6 f00e 0000b8 cfe4 movff 0xfe4, 0xd MOVFF PREINC1, r0x0d 0000ba f00d 0000bc 6ef9 movwf 0xf9, 0 MOVWF PCL _00131_DS_: 0000be ef73 goto 0xe6 GOTO _00105_DS_ 0000c0 f000 0000c2 ef77 goto 0xee GOTO _00106_DS_ 0000c4 f000 0000c6 ef7b goto 0xf6 GOTO _00107_DS_ 0000c8 f000 0000ca ef7f goto 0xfe GOTO _00108_DS_ 0000cc f000 0000ce ef83 goto 0x106 GOTO _00109_DS_ 0000d0 f000 0000d2 ef87 goto 0x10e GOTO _00110_DS_ 0000d4 f000 0000d6 ef8b goto 0x116 GOTO _00111_DS_ 0000d8 f000 0000da ef8f goto 0x11e GOTO _00112_DS_ 0000dc f000 0000de ef93 goto 0x126 GOTO _00113_DS_ 0000e0 f000 0000e2 ef97 goto 0x12e GOTO _00114_DS_ 0000e4 f000 _00105_DS_: ; .line 16; serial.c uart_multiplier = 1; 0000e6 0e01 movlw 0x1 MOVLW 0x01 0000e8 6e05 movwf 0x5, 0 MOVWF r0x05 0000ea 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 17; serial.c break; 0000ec d027 bra 0x13c BRA _00116_DS_ _00106_DS_: ; .line 19; serial.c uart_multiplier = 2; 0000ee 0e02 movlw 0x2 MOVLW 0x02 0000f0 6e05 movwf 0x5, 0 MOVWF r0x05 0000f2 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 20; serial.c break; 0000f4 d023 bra 0x13c BRA _00116_DS_ _00107_DS_: ; .line 22; serial.c uart_multiplier = 4; 0000f6 0e04 movlw 0x4 MOVLW 0x04 0000f8 6e05 movwf 0x5, 0 MOVWF r0x05 0000fa 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 23; serial.c break; 0000fc d01f bra 0x13c BRA _00116_DS_ _00108_DS_: ; .line 25; serial.c uart_multiplier = 8; 0000fe 0e08 movlw 0x8 MOVLW 0x08 000100 6e05 movwf 0x5, 0 MOVWF r0x05 000102 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 26; serial.c break; 000104 d01b bra 0x13c BRA _00116_DS_ _00109_DS_: ; .line 28; serial.c uart_multiplier = 16; 000106 0e10 movlw 0x10 MOVLW 0x10 000108 6e05 movwf 0x5, 0 MOVWF r0x05 00010a 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 29; serial.c break; 00010c d017 bra 0x13c BRA _00116_DS_ _00110_DS_: ; .line 31; serial.c uart_multiplier = 32; 00010e 0e20 movlw 0x20 MOVLW 0x20 000110 6e05 movwf 0x5, 0 MOVWF r0x05 000112 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 32; serial.c break; 000114 d013 bra 0x13c BRA _00116_DS_ _00111_DS_: ; .line 34; serial.c uart_multiplier = 64; 000116 0e40 movlw 0x40 MOVLW 0x40 000118 6e05 movwf 0x5, 0 MOVWF r0x05 00011a 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 35; serial.c break; 00011c d00f bra 0x13c BRA _00116_DS_ _00112_DS_: ; .line 37; serial.c uart_multiplier = 128; 00011e 0e80 movlw 0x80 MOVLW 0x80 000120 6e05 movwf 0x5, 0 MOVWF r0x05 000122 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 38; serial.c break; 000124 d00b bra 0x13c BRA _00116_DS_ _00113_DS_: ; .line 40; serial.c uart_multiplier = 192; 000126 0ec0 movlw 0xc0 MOVLW 0xc0 000128 6e05 movwf 0x5, 0 MOVWF r0x05 00012a 6a06 clrf 0x6, 0 CLRF r0x06 ; .line 41; serial.c break; 00012c d007 bra 0x13c BRA _00116_DS_ _00114_DS_: ; .line 43; serial.c uart_multiplier = 256; 00012e 6a05 clrf 0x5, 0 CLRF r0x05 000130 0e01 movlw 0x1 MOVLW 0x01 000132 6e06 movwf 0x6, 0 MOVWF r0x06 ; .line 44; serial.c break; 000134 d003 bra 0x13c BRA _00116_DS_ _00115_DS_: ; .line 46; serial.c uart_multiplier = 192; 000136 0ec0 movlw 0xc0 MOVLW 0xc0 000138 6e05 movwf 0x5, 0 MOVWF r0x05 00013a 6a06 clrf 0x6, 0 CLRF r0x06 _00116_DS_: ; .line 51; serial.c BAUDCONbits.BRG16 = 1; // use SPBRGH 00013c 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; 00013e 5006 movf 0x6, 0, 0 MOVF r0x06, W 000140 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000142 5005 movf 0x5, 0, 0 MOVF r0x05, W 000144 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000146 0e02 movlw 0x2 MOVLW 0x02 000148 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00014a 0e58 movlw 0x58 MOVLW 0x58 00014c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00014e ec5a call 0xab4, 0 CALL __mulint 000150 f005 000152 6e07 movwf 0x7, 0 MOVWF r0x07 000154 cff3 movff 0xff3, 0x8 MOVFF PRODL, r0x08 000156 f008 000158 0e04 movlw 0x4 MOVLW 0x04 00015a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00015c 6a09 clrf 0x9, 0 CLRF r0x09 00015e 6a0a clrf 0xa, 0 CLRF r0x0a 000160 0e2d movlw 0x2d MOVLW 0x2d 000162 2608 addwf 0x8, 0x1, 0 ADDWF r0x08, F 000164 0e31 movlw 0x31 MOVLW 0x31 000166 2209 addwfc 0x9, 0x1, 0 ADDWFC r0x09, F 000168 0e01 movlw 0x1 MOVLW 0x01 00016a 220a addwfc 0xa, 0x1, 0 ADDWFC r0x0a, F 00016c 5006 movf 0x6, 0, 0 MOVF r0x06, W 00016e 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000170 5005 movf 0x5, 0, 0 MOVF r0x05, W 000172 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000174 0e01 movlw 0x1 MOVLW 0x01 000176 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000178 0e2c movlw 0x2c MOVLW 0x2c 00017a 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00017c ec5a call 0xab4, 0 CALL __mulint 00017e f005 000180 6e05 movwf 0x5, 0 MOVWF r0x05 000182 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 000184 f006 000186 0e04 movlw 0x4 MOVLW 0x04 000188 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 00018a 6a0b clrf 0xb, 0 CLRF r0x0b 00018c 6a0c clrf 0xc, 0 CLRF r0x0c 00018e 500c movf 0xc, 0, 0 MOVF r0x0c, W 000190 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000192 500b movf 0xb, 0, 0 MOVF r0x0b, W 000194 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000196 5006 movf 0x6, 0, 0 MOVF r0x06, W 000198 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00019a 5005 movf 0x5, 0, 0 MOVF r0x05, W 00019c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00019e 500a movf 0xa, 0, 0 MOVF r0x0a, W 0001a0 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001a2 5009 movf 0x9, 0, 0 MOVF r0x09, W 0001a4 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001a6 5008 movf 0x8, 0, 0 MOVF r0x08, W 0001a8 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001aa 5007 movf 0x7, 0, 0 MOVF r0x07, W 0001ac 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001ae ec5b call 0x2b6, 0 CALL __divslong 0001b0 f001 0001b2 6e05 movwf 0x5, 0 MOVWF r0x05 0001b4 cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 0001b6 f006 0001b8 cff4 movff 0xff4, 0x7 MOVFF PRODH, r0x07 0001ba f007 0001bc cfe9 movff 0xfe9, 0x8 MOVFF FSR0L, r0x08 0001be f008 0001c0 0e08 movlw 0x8 MOVLW 0x08 0001c2 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0001c4 0e00 movlw 0 MOVLW 0x00 0001c6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001c8 0e00 movlw 0 MOVLW 0x00 0001ca 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001cc 0e00 movlw 0 MOVLW 0x00 0001ce 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001d0 0e04 movlw 0x4 MOVLW 0x04 0001d2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001d4 5008 movf 0x8, 0, 0 MOVF r0x08, W 0001d6 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001d8 5007 movf 0x7, 0, 0 MOVF r0x07, W 0001da 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001dc 5006 movf 0x6, 0, 0 MOVF r0x06, W 0001de 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001e0 5005 movf 0x5, 0, 0 MOVF r0x05, W 0001e2 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 0001e4 ec5b call 0x2b6, 0 CALL __divslong 0001e6 f001 0001e8 6e05 movwf 0x5, 0 MOVWF r0x05 0001ea cff3 movff 0xff3, 0x6 MOVFF PRODL, r0x06 0001ec f006 0001ee cff4 movff 0xff4, 0x7 MOVFF PRODH, r0x07 0001f0 f007 0001f2 cfe9 movff 0xfe9, 0x8 MOVFF FSR0L, r0x08 0001f4 f008 0001f6 0e08 movlw 0x8 MOVLW 0x08 0001f8 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F 0001fa 0eff movlw 0xff MOVLW 0xff 0001fc 2605 addwf 0x5, 0x1, 0 ADDWF r0x05, F 0001fe 0eff movlw 0xff MOVLW 0xff 000200 2206 addwfc 0x6, 0x1, 0 ADDWFC r0x06, F 000202 0eff movlw 0xff MOVLW 0xff 000204 2207 addwfc 0x7, 0x1, 0 ADDWFC r0x07, F 000206 0eff movlw 0xff MOVLW 0xff 000208 2208 addwfc 0x8, 0x1, 0 ADDWFC r0x08, F ; .line 60; serial.c USART_BRGH_HIGH, BAUD_SPBRG); 00020a 5006 movf 0x6, 0, 0 MOVF r0x06, W 00020c 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 00020e 5005 movf 0x5, 0, 0 MOVF r0x05, W 000210 6ee5 movwf 0xe5, 0 MOVWF POSTDEC1 000212 0e3c movlw 0x3c MOVLW 0x3c 000214 ecf6 call 0xbec, 0 CALL _usart_open 000216 f005 000218 0e02 movlw 0x2 MOVLW 0x02 00021a 26e1 addwf 0xe1, 0x1, 0 ADDWF FSR1L, F ; .line 63; serial.c RCSTAbits.SPEN = 1; //enable uart 00021c 8eab bsf 0xab, 0x7, 0 BSF _RCSTAbits, 7 ; .line 64; serial.c RCSTAbits.CREN = 1; // continous receive enable 00021e 88ab bsf 0xab, 0x4, 0 BSF _RCSTAbits, 4 ; .line 65; serial.c usart_putc(13); 000220 0e0d movlw 0xd MOVLW 0x0d 000222 ec0d call 0x101a, 0 CALL _usart_putc 000224 f008 ; .line 66; serial.c return 1; 000226 6af3 clrf 0xf3, 0 CLRF PRODL 000228 0e01 movlw 0x1 MOVLW 0x01 00022a d028 bra 0x27c BRA _00124_DS_ _00118_DS_: ; .line 72; serial.c if(h==1) // SPI 00022c 5000 movf 0, 0, 0 MOVF r0x00, W 00022e 0a01 xorlw 0x1 XORLW 0x01 000230 e102 bnz 0x236 BNZ _00132_DS_ 000232 5001 movf 0x1, 0, 0 MOVF r0x01, W 000234 e001 bz 0x238 BZ _00133_DS_ _00132_DS_: 000236 d020 bra 0x278 BRA _00123_DS_ _00133_DS_: ; .line 75; serial.c if(ucon->mstr_slv) 000238 0e04 movlw 0x4 MOVLW 0x04 00023a 2602 addwf 0x2, 0x1, 0 ADDWF r0x02, F 00023c 0e00 movlw 0 MOVLW 0x00 00023e 2203 addwfc 0x3, 0x1, 0 ADDWFC r0x03, F 000240 0e00 movlw 0 MOVLW 0x00 000242 2204 addwfc 0x4, 0x1, 0 ADDWFC r0x04, F 000244 c002 movff 0x2, 0xfe9 MOVFF r0x02, FSR0L 000246 ffe9 000248 c003 movff 0x3, 0xff3 MOVFF r0x03, PRODL 00024a fff3 00024c 5004 movf 0x4, 0, 0 MOVF r0x04, W 00024e ec93 call 0xf26, 0 CALL __gptrget1 000250 f007 000252 6e02 movwf 0x2, 0 MOVWF r0x02 000254 5002 movf 0x2, 0, 0 MOVF r0x02, W 000256 e007 bz 0x266 BZ _00120_DS_ ; .line 78; serial.c TRISCbits.TRISC5 = 0; // serial data out SDO 000258 9a94 bcf 0x94, 0x5, 0 BCF _TRISCbits, 5 ; .line 79; serial.c TRISCbits.TRISC4 = 1; //SDI 00025a 8894 bsf 0x94, 0x4, 0 BSF _TRISCbits, 4 ; .line 80; serial.c TRISCbits.TRISC3 = 0; // SCK 00025c 9694 bcf 0x94, 0x3, 0 BCF _TRISCbits, 3 ; .line 82; serial.c SSPSTAT = 0; // set data sampled at middle & CKE = 0 00025e 6ac7 clrf 0xc7, 0 CLRF _SSPSTAT ; .line 83; serial.c SSPCON1 = 0x21; // Master mode Fosc/16, enable SPI 000260 0e21 movlw 0x21 MOVLW 0x21 000262 6ec6 movwf 0xc6, 0 MOVWF _SSPCON1 000264 d006 bra 0x272 BRA _00121_DS_ _00120_DS_: ; .line 88; serial.c TRISCbits.TRISC5 = 0; // serial data out SDO 000266 9a94 bcf 0x94, 0x5, 0 BCF _TRISCbits, 5 ; .line 89; serial.c TRISCbits.TRISC4 = 1; //SDI 000268 8894 bsf 0x94, 0x4, 0 BSF _TRISCbits, 4 ; .line 90; serial.c TRISCbits.TRISC3 = 1; // SCK set as input for slave 00026a 8694 bsf 0x94, 0x3, 0 BSF _TRISCbits, 3 ; .line 92; serial.c SSPSTAT = 0; // set data sampled at middle & CKE = 0 00026c 6ac7 clrf 0xc7, 0 CLRF _SSPSTAT ; .line 93; serial.c SSPCON1 = 0x25; // Slave mode,SS disabled enable SPI 00026e 0e25 movlw 0x25 MOVLW 0x25 000270 6ec6 movwf 0xc6, 0 MOVWF _SSPCON1 _00121_DS_: ; .line 96; serial.c return 1; 000272 6af3 clrf 0xf3, 0 CLRF PRODL 000274 0e01 movlw 0x1 MOVLW 0x01 000276 d002 bra 0x27c BRA _00124_DS_ _00123_DS_: ; .line 102; serial.c return 0; // not able to find the correct serial channel 000278 6af3 clrf 0xf3, 0 CLRF PRODL 00027a 6ae8 clrf 0xe8, 0 CLRF WREG _00124_DS_: 00027c cfe4 movff 0xfe4, 0xc MOVFF PREINC1, r0x0c 00027e f00c 000280 cfe4 movff 0xfe4, 0xb MOVFF PREINC1, r0x0b 000282 f00b 000284 cfe4 movff 0xfe4, 0xa MOVFF PREINC1, r0x0a 000286 f00a 000288 cfe4 movff 0xfe4, 0x9 MOVFF PREINC1, r0x09 00028a f009 00028c cfe4 movff 0xfe4, 0x8 MOVFF PREINC1, r0x08 00028e f008 000290 cfe4 movff 0xfe4, 0x7 MOVFF PREINC1, r0x07 000292 f007 000294 cfe4 movff 0xfe4, 0x6 MOVFF PREINC1, r0x06 000296 f006 000298 cfe4 movff 0xfe4, 0x5 MOVFF PREINC1, r0x05 00029a f005 00029c cfe4 movff 0xfe4, 0x4 MOVFF PREINC1, r0x04 00029e f004 0002a0 cfe4 movff 0xfe4, 0x3 MOVFF PREINC1, r0x03 0002a2 f003 0002a4 cfe4 movff 0xfe4, 0x2 MOVFF PREINC1, r0x02 0002a6 f002 0002a8 cfe4 movff 0xfe4, 0x1 MOVFF PREINC1, r0x01 0002aa f001 0002ac cfe4 movff 0xfe4, 0 MOVFF PREINC1, r0x00 0002ae f000 0002b0 cfe4 movff 0xfe4, 0xfd9 MOVFF PREINC1, FSR2L 0002b2 ffd9 0002b4 0012 return 0 RETURN ; Statistics: ; code size: 2832 (0x0b10) bytes ( 2.16%) ; 1416 (0x0588) words ; udata size: 6 (0x0006) bytes ( 0.16%) ; access size: 15 (0x000f) bytes end