
_interrupt:

;RTCC.c,22 :: 		void interrupt() {
;RTCC.c,23 :: 		USB_Interrupt_Proc();
	CALL        _USB_Interrupt_Proc+0, 0
;RTCC.c,24 :: 		}
L_end_interrupt:
L__interrupt7:
	RETFIE      1
; end of _interrupt

_RTCC_WrEn:

;RTCC.c,26 :: 		void RTCC_WrEn() { //Enables writing to the RTCC registers
;RTCC.c,27 :: 		EECON2 = 0x55;
	MOVLW       85
	MOVWF       EECON2+0 
;RTCC.c,28 :: 		EECON2 = 0xAA;
	MOVLW       170
	MOVWF       EECON2+0 
;RTCC.c,29 :: 		RTCWREN_bit = 1;
	BSF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.c,30 :: 		}
L_end_RTCC_WrEn:
	RETURN      0
; end of _RTCC_WrEn

_RTCC_Read:

;RTCC.c,32 :: 		void RTCC_Read() { //Reads from the RTCC
;RTCC.c,33 :: 		RTCCFG = 0b10000011; //Set RTCPTR to 11
	MOVLW       131
	MOVWF       RTCCFG+0 
;RTCC.c,34 :: 		while (RTCSYNC_bit = 1) {
L_RTCC_Read0:
	BSF         RTCSYNC_bit+0, BitPos(RTCSYNC_bit+0) 
	BTFSS       RTCSYNC_bit+0, BitPos(RTCSYNC_bit+0) 
	GOTO        L_RTCC_Read1
;RTCC.c,36 :: 		}
	GOTO        L_RTCC_Read0
L_RTCC_Read1:
;RTCC.c,37 :: 		bytYear   = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytYear+0 
;RTCC.c,38 :: 		bytMonth  = Bcd2Dec(RTCVALH); //Just to decrement RTCPTR
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytMonth+0 
;RTCC.c,39 :: 		bytDay    = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytDay+0 
;RTCC.c,40 :: 		bytMonth  = Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytMonth+0 
;RTCC.c,41 :: 		bytHour   = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytHour+0 
;RTCC.c,42 :: 		bytWkDay  = Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytWkDay+0 
;RTCC.c,43 :: 		bytSecond = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytSecond+0 
;RTCC.c,44 :: 		bytMinute = Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytMinute+0 
;RTCC.c,45 :: 		}
L_end_RTCC_Read:
	RETURN      0
; end of _RTCC_Read

_RTCC_Write:

;RTCC.c,47 :: 		void RTCC_Write() { //Writes to the RTCC
;RTCC.c,48 :: 		RTCC_WrEn();
	CALL        _RTCC_WrEn+0, 0
;RTCC.c,49 :: 		RTCCFG = 0b10100011; //Set RTCPTR to 11
	MOVLW       163
	MOVWF       RTCCFG+0 
;RTCC.c,50 :: 		RTCVALL = Dec2Bcd(bytYear);
	MOVF        _bytYear+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,51 :: 		RTCVALH = Dec2Bcd(bytMonth); //Just to decrement RTCPTR
	MOVF        _bytMonth+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,52 :: 		RTCVALL = Dec2Bcd(bytDay);
	MOVF        _bytDay+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,53 :: 		RTCVALH = Dec2Bcd(bytMonth);
	MOVF        _bytMonth+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,54 :: 		RTCVALL = Dec2Bcd(bytHour);
	MOVF        _bytHour+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,55 :: 		RTCVALH = Dec2Bcd(bytWkDay);
	MOVF        _bytWkDay+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,56 :: 		RTCVALL = Dec2Bcd(bytSecond);
	MOVF        _bytSecond+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,57 :: 		RTCVALH = Dec2Bcd(bytMinute);
	MOVF        _bytMinute+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,58 :: 		RTCWREN_bit = 0;
	BCF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.c,59 :: 		}
L_end_RTCC_Write:
	RETURN      0
; end of _RTCC_Write

_GenerateDigits:

;RTCC.c,61 :: 		void GenerateDigits(char value, char *pos) {
;RTCC.c,62 :: 		*pos = (value / 10) + 48;
	MOVLW       10
	MOVWF       R4 
	MOVF        FARG_GenerateDigits_value+0, 0 
	MOVWF       R0 
	CALL        _Div_8X8_U+0, 0
	MOVFF       FARG_GenerateDigits_pos+0, FSR1
	MOVFF       FARG_GenerateDigits_pos+1, FSR1H
	MOVLW       48
	ADDWF       R0, 0 
	MOVWF       POSTINC1+0 
;RTCC.c,63 :: 		pos++;
	INFSNZ      FARG_GenerateDigits_pos+0, 1 
	INCF        FARG_GenerateDigits_pos+1, 1 
;RTCC.c,64 :: 		*pos = (value % 10) + 48;
	MOVLW       10
	MOVWF       R4 
	MOVF        FARG_GenerateDigits_value+0, 0 
	MOVWF       R0 
	CALL        _Div_8X8_U+0, 0
	MOVF        R8, 0 
	MOVWF       R0 
	MOVFF       FARG_GenerateDigits_pos+0, FSR1
	MOVFF       FARG_GenerateDigits_pos+1, FSR1H
	MOVLW       48
	ADDWF       R0, 0 
	MOVWF       POSTINC1+0 
;RTCC.c,65 :: 		}
L_end_GenerateDigits:
	RETURN      0
; end of _GenerateDigits

_GenerateRTCCString:

;RTCC.c,67 :: 		void GenerateRTCCString(char *rtccstring) {
;RTCC.c,69 :: 		pos = rtccstring;
	MOVF        FARG_GenerateRTCCString_rtccstring+0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        FARG_GenerateRTCCString_rtccstring+1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,70 :: 		strcpy(rtccstring, "00-00-00 00:00:00");
	MOVF        FARG_GenerateRTCCString_rtccstring+0, 0 
	MOVWF       FARG_strcpy_to+0 
	MOVF        FARG_GenerateRTCCString_rtccstring+1, 0 
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr1_RTCC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr1_RTCC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;RTCC.c,71 :: 		GenerateDigits(bytYear, pos);
	MOVF        _bytYear+0, 0 
	MOVWF       FARG_GenerateDigits_value+0 
	MOVF        GenerateRTCCString_pos_L0+0, 0 
	MOVWF       FARG_GenerateDigits_pos+0 
	MOVF        GenerateRTCCString_pos_L0+1, 0 
	MOVWF       FARG_GenerateDigits_pos+1 
	CALL        _GenerateDigits+0, 0
;RTCC.c,72 :: 		pos += 3;
	MOVLW       3
	ADDWF       GenerateRTCCString_pos_L0+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      GenerateRTCCString_pos_L0+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        R1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,73 :: 		GenerateDigits(bytMonth, pos);
	MOVF        _bytMonth+0, 0 
	MOVWF       FARG_GenerateDigits_value+0 
	MOVF        R0, 0 
	MOVWF       FARG_GenerateDigits_pos+0 
	MOVF        R1, 0 
	MOVWF       FARG_GenerateDigits_pos+1 
	CALL        _GenerateDigits+0, 0
;RTCC.c,74 :: 		pos += 3;
	MOVLW       3
	ADDWF       GenerateRTCCString_pos_L0+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      GenerateRTCCString_pos_L0+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        R1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,75 :: 		GenerateDigits(bytDay, pos);
	MOVF        _bytDay+0, 0 
	MOVWF       FARG_GenerateDigits_value+0 
	MOVF        R0, 0 
	MOVWF       FARG_GenerateDigits_pos+0 
	MOVF        R1, 0 
	MOVWF       FARG_GenerateDigits_pos+1 
	CALL        _GenerateDigits+0, 0
;RTCC.c,76 :: 		pos += 3;
	MOVLW       3
	ADDWF       GenerateRTCCString_pos_L0+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      GenerateRTCCString_pos_L0+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        R1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,77 :: 		GenerateDigits(bytHour, pos);
	MOVF        _bytHour+0, 0 
	MOVWF       FARG_GenerateDigits_value+0 
	MOVF        R0, 0 
	MOVWF       FARG_GenerateDigits_pos+0 
	MOVF        R1, 0 
	MOVWF       FARG_GenerateDigits_pos+1 
	CALL        _GenerateDigits+0, 0
;RTCC.c,78 :: 		pos += 3;
	MOVLW       3
	ADDWF       GenerateRTCCString_pos_L0+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      GenerateRTCCString_pos_L0+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        R1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,79 :: 		GenerateDigits(bytMinute, pos);
	MOVF        _bytMinute+0, 0 
	MOVWF       FARG_GenerateDigits_value+0 
	MOVF        R0, 0 
	MOVWF       FARG_GenerateDigits_pos+0 
	MOVF        R1, 0 
	MOVWF       FARG_GenerateDigits_pos+1 
	CALL        _GenerateDigits+0, 0
;RTCC.c,80 :: 		pos += 3;
	MOVLW       3
	ADDWF       GenerateRTCCString_pos_L0+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      GenerateRTCCString_pos_L0+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        R1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,81 :: 		GenerateDigits(bytSecond, pos);
	MOVF        _bytSecond+0, 0 
	MOVWF       FARG_GenerateDigits_value+0 
	MOVF        R0, 0 
	MOVWF       FARG_GenerateDigits_pos+0 
	MOVF        R1, 0 
	MOVWF       FARG_GenerateDigits_pos+1 
	CALL        _GenerateDigits+0, 0
;RTCC.c,82 :: 		pos += 3;
	MOVLW       3
	ADDWF       GenerateRTCCString_pos_L0+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      GenerateRTCCString_pos_L0+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       GenerateRTCCString_pos_L0+0 
	MOVF        R1, 0 
	MOVWF       GenerateRTCCString_pos_L0+1 
;RTCC.c,83 :: 		*pos = 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.c,84 :: 		}
L_end_GenerateRTCCString:
	RETURN      0
; end of _GenerateRTCCString

_USB_RTCC:

;RTCC.c,86 :: 		void USB_RTCC() {
;RTCC.c,87 :: 		GenerateRTCCString(USBout);
	MOVLW       _USBout+0
	MOVWF       FARG_GenerateRTCCString_rtccstring+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_GenerateRTCCString_rtccstring+1 
	CALL        _GenerateRTCCString+0, 0
;RTCC.c,88 :: 		strcat(USBout, "\r\n"); //New line
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_to+1 
	MOVLW       ?lstr2_RTCC+0
	MOVWF       FARG_strcat_from+0 
	MOVLW       hi_addr(?lstr2_RTCC+0)
	MOVWF       FARG_strcat_from+1 
	CALL        _strcat+0, 0
;RTCC.c,89 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;RTCC.c,90 :: 		}
L_end_USB_RTCC:
	RETURN      0
; end of _USB_RTCC

_TestRTCC_Write:

;RTCC.c,92 :: 		void TestRTCC_Write() {
;RTCC.c,93 :: 		bytYear = 86;
	MOVLW       86
	MOVWF       _bytYear+0 
;RTCC.c,94 :: 		bytMonth = 7;
	MOVLW       7
	MOVWF       _bytMonth+0 
;RTCC.c,95 :: 		bytDay = 12;
	MOVLW       12
	MOVWF       _bytDay+0 
;RTCC.c,96 :: 		bytHour = 5;
	MOVLW       5
	MOVWF       _bytHour+0 
;RTCC.c,97 :: 		bytMinute = 8;
	MOVLW       8
	MOVWF       _bytMinute+0 
;RTCC.c,98 :: 		bytSecond = 3;
	MOVLW       3
	MOVWF       _bytSecond+0 
;RTCC.c,99 :: 		RTCC_Write();
	CALL        _RTCC_Write+0, 0
;RTCC.c,100 :: 		}
L_end_TestRTCC_Write:
	RETURN      0
; end of _TestRTCC_Write

_main:

;RTCC.c,102 :: 		void main() {
;RTCC.c,103 :: 		OSCCON = 0b01110000; //8MHz
	MOVLW       112
	MOVWF       OSCCON+0 
;RTCC.c,104 :: 		PLLEn_bit = 1; //Enable PLL (now 48MHz)
	BSF         PLLEN_bit+0, BitPos(PLLEN_bit+0) 
;RTCC.c,107 :: 		T1OSCEN_bit = 1;
	BSF         T1OSCEN_bit+0, BitPos(T1OSCEN_bit+0) 
;RTCC.c,108 :: 		RTCC_WrEn();
	CALL        _RTCC_WrEn+0, 0
;RTCC.c,109 :: 		RTCEN_bit = 1;
	BSF         RTCEN_bit+0, BitPos(RTCEN_bit+0) 
;RTCC.c,110 :: 		RTCWREN_Bit = 0;
	BCF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.c,112 :: 		HID_Enable(&USBin, &USBout);
	MOVLW       _USBin+0
	MOVWF       FARG_HID_Enable_readbuff+0 
	MOVLW       hi_addr(_USBin+0)
	MOVWF       FARG_HID_Enable_readbuff+1 
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Enable_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Enable_writebuff+1 
	CALL        _HID_Enable+0, 0
;RTCC.c,113 :: 		strcpy(USBout, "Breeze RTCC\r\n");
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_to+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_to+1 
	MOVLW       ?lstr3_RTCC+0
	MOVWF       FARG_strcpy_from+0 
	MOVLW       hi_addr(?lstr3_RTCC+0)
	MOVWF       FARG_strcpy_from+1 
	CALL        _strcpy+0, 0
;RTCC.c,114 :: 		HID_Write(&USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;RTCC.c,116 :: 		TestRTCC_Write();
	CALL        _TestRTCC_Write+0, 0
;RTCC.c,118 :: 		TRISC2_bit = 0;
	BCF         TRISC2_bit+0, BitPos(TRISC2_bit+0) 
;RTCC.c,119 :: 		LATC2_bit = 0;
	BCF         LATC2_bit+0, BitPos(LATC2_bit+0) 
;RTCC.c,121 :: 		while(1) {
L_main2:
;RTCC.c,122 :: 		LATC2_bit = 1;
	BSF         LATC2_bit+0, BitPos(LATC2_bit+0) 
;RTCC.c,123 :: 		RTCC_Read();
	CALL        _RTCC_Read+0, 0
;RTCC.c,124 :: 		USB_RTCC();
	CALL        _USB_RTCC+0, 0
;RTCC.c,125 :: 		delay_ms(100);
	MOVLW       7
	MOVWF       R11, 0
	MOVLW       23
	MOVWF       R12, 0
	MOVLW       106
	MOVWF       R13, 0
L_main4:
	DECFSZ      R13, 1, 1
	BRA         L_main4
	DECFSZ      R12, 1, 1
	BRA         L_main4
	DECFSZ      R11, 1, 1
	BRA         L_main4
	NOP
;RTCC.c,126 :: 		LATC2_bit = 0;
	BCF         LATC2_bit+0, BitPos(LATC2_bit+0) 
;RTCC.c,127 :: 		delay_ms(900);
	MOVLW       55
	MOVWF       R11, 0
	MOVLW       202
	MOVWF       R12, 0
	MOVLW       211
	MOVWF       R13, 0
L_main5:
	DECFSZ      R13, 1, 1
	BRA         L_main5
	DECFSZ      R12, 1, 1
	BRA         L_main5
	DECFSZ      R11, 1, 1
	BRA         L_main5
;RTCC.c,128 :: 		}
	GOTO        L_main2
;RTCC.c,129 :: 		}
L_end_main:
	GOTO        $+0
; end of _main
