
_interrupt:

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

_RTCC_WrEn:

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

_RTCC_Read:

;RTCC.c,28 :: 		void RTCC_Read() { //Reads from the RTCC
;RTCC.c,29 :: 		RTCCFG = 0b10000011; //Set RTCPTR to 11
	MOVLW       131
	MOVWF       RTCCFG+0 
;RTCC.c,30 :: 		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,32 :: 		}
	GOTO        L_RTCC_Read0
L_RTCC_Read1:
;RTCC.c,33 :: 		bytYear   = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytYear+0 
;RTCC.c,34 :: 		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,35 :: 		bytDay    = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytDay+0 
;RTCC.c,36 :: 		bytMonth  = Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytMonth+0 
;RTCC.c,37 :: 		bytHour   = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytHour+0 
;RTCC.c,38 :: 		bytWkDay  = Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytWkDay+0 
;RTCC.c,39 :: 		bytSecond = Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytSecond+0 
;RTCC.c,40 :: 		bytMinute = Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcdnum+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytMinute+0 
;RTCC.c,41 :: 		}
L_end_RTCC_Read:
	RETURN      0
; end of _RTCC_Read

_RTCC_Write:

;RTCC.c,43 :: 		void RTCC_Write() { //Writes to the RTCC
;RTCC.c,44 :: 		RTCC_WrEn();
	CALL        _RTCC_WrEn+0, 0
;RTCC.c,45 :: 		RTCCFG = 0b10100011; //Set RTCPTR to 11
	MOVLW       163
	MOVWF       RTCCFG+0 
;RTCC.c,46 :: 		RTCVALL = Dec2Bcd(bytYear);
	MOVF        _bytYear+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,47 :: 		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,48 :: 		RTCVALL = Dec2Bcd(bytDay);
	MOVF        _bytDay+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,49 :: 		RTCVALH = Dec2Bcd(bytMonth);
	MOVF        _bytMonth+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,50 :: 		RTCVALL = Dec2Bcd(bytHour);
	MOVF        _bytHour+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,51 :: 		RTCVALH = Dec2Bcd(bytWkDay);
	MOVF        _bytWkDay+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,52 :: 		RTCVALL = Dec2Bcd(bytSecond);
	MOVF        _bytSecond+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.c,53 :: 		RTCVALH = Dec2Bcd(bytMinute);
	MOVF        _bytMinute+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.c,54 :: 		RTCWREN_bit = 0;
	BCF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.c,55 :: 		}
L_end_RTCC_Write:
	RETURN      0
; end of _RTCC_Write

_GenerateDigits:

;RTCC.c,57 :: 		void GenerateDigits(char value, char *pos) {
;RTCC.c,58 :: 		*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,59 :: 		pos++;
	INFSNZ      FARG_GenerateDigits_pos+0, 1 
	INCF        FARG_GenerateDigits_pos+1, 1 
;RTCC.c,60 :: 		*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,61 :: 		}
L_end_GenerateDigits:
	RETURN      0
; end of _GenerateDigits

_GenerateRTCCString:

;RTCC.c,63 :: 		void GenerateRTCCString(char *rtccstring) {
;RTCC.c,65 :: 		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,66 :: 		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,67 :: 		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,68 :: 		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,69 :: 		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,70 :: 		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,71 :: 		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,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(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,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(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,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(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,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 :: 		*pos = 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.c,80 :: 		}
L_end_GenerateRTCCString:
	RETURN      0
; end of _GenerateRTCCString

_USB_RTCC:

;RTCC.c,82 :: 		void USB_RTCC() {
;RTCC.c,83 :: 		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,84 :: 		strcat(USBout, "\x0D" "\x0A"); //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,85 :: 		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,86 :: 		}
L_end_USB_RTCC:
	RETURN      0
; end of _USB_RTCC

_TestRTCC_Write:

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

_main:

;RTCC.c,98 :: 		void main() {
;RTCC.c,99 :: 		OSCCON = 0b01110000; //8MHz
	MOVLW       112
	MOVWF       OSCCON+0 
;RTCC.c,100 :: 		PLLEn_bit = 1; //Enable PLL (now 48MHz)
	BSF         PLLEN_bit+0, BitPos(PLLEN_bit+0) 
;RTCC.c,103 :: 		T1OSCEN_bit = 1;
	BSF         T1OSCEN_bit+0, BitPos(T1OSCEN_bit+0) 
;RTCC.c,104 :: 		RTCC_WrEn();
	CALL        _RTCC_WrEn+0, 0
;RTCC.c,105 :: 		RTCEN_bit = 1;
	BSF         RTCEN_bit+0, BitPos(RTCEN_bit+0) 
;RTCC.c,106 :: 		RTCWREN_Bit = 0;
	BCF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.c,108 :: 		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,109 :: 		strcpy(USBout, "Breeze RTCC" "\x0D" "\x0A");
	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,110 :: 		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,112 :: 		TestRTCC_Write();
	CALL        _TestRTCC_Write+0, 0
;RTCC.c,114 :: 		TRISD4_bit = 0;
	BCF         TRISD4_bit+0, BitPos(TRISD4_bit+0) 
;RTCC.c,115 :: 		LATD4_bit = 0;
	BCF         LATD4_bit+0, BitPos(LATD4_bit+0) 
;RTCC.c,117 :: 		while(1) {
L_main2:
;RTCC.c,118 :: 		LATD4_bit = 1;
	BSF         LATD4_bit+0, BitPos(LATD4_bit+0) 
;RTCC.c,119 :: 		RTCC_Read();
	CALL        _RTCC_Read+0, 0
;RTCC.c,120 :: 		USB_RTCC();
	CALL        _USB_RTCC+0, 0
;RTCC.c,121 :: 		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,122 :: 		LATD4_bit = 0;
	BCF         LATD4_bit+0, BitPos(LATD4_bit+0) 
;RTCC.c,123 :: 		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,124 :: 		}
	GOTO        L_main2
;RTCC.c,125 :: 		}
L_end_main:
	GOTO        $+0
; end of _main
