
_RTCC_CalcWkDay:

;RTCC.mpas,25 :: 		begin
;RTCC.mpas,26 :: 		yr := dtmRTCC.Year + 2000;
	MOVF        _dtmRTCC+0, 0 
	MOVWF       RTCC_CalcWkDay_yr+0 
	MOVLW       0
	MOVWF       RTCC_CalcWkDay_yr+1 
	MOVLW       208
	ADDWF       RTCC_CalcWkDay_yr+0, 1 
	MOVLW       7
	ADDWFC      RTCC_CalcWkDay_yr+1, 1 
;RTCC.mpas,27 :: 		if (dtmRTCC.Month < 2) then begin Dec(yr); end;
	MOVLW       2
	SUBWF       _dtmRTCC+1, 0 
	BTFSC       STATUS+0, 0 
	GOTO        L__RTCC_CalcWkDay2
	MOVLW       1
	SUBWF       RTCC_CalcWkDay_yr+0, 1 
	MOVLW       0
	SUBWFB      RTCC_CalcWkDay_yr+1, 1 
L__RTCC_CalcWkDay2:
;RTCC.mpas,28 :: 		bytWkDay := (yr + yr/4 - yr/100 + yr/400 + tbl[dtmRTCC.Month - 1] + dtmRTCC.Day) mod 7;
	MOVF        RTCC_CalcWkDay_yr+0, 0 
	MOVWF       R0 
	MOVF        RTCC_CalcWkDay_yr+1, 0 
	MOVWF       R1 
	RRCF        R1, 1 
	RRCF        R0, 1 
	BCF         R1, 7 
	RRCF        R1, 1 
	RRCF        R0, 1 
	BCF         R1, 7 
	MOVF        R0, 0 
	ADDWF       RTCC_CalcWkDay_yr+0, 0 
	MOVWF       FLOC__RTCC_CalcWkDay+0 
	MOVF        R1, 0 
	ADDWFC      RTCC_CalcWkDay_yr+1, 0 
	MOVWF       FLOC__RTCC_CalcWkDay+1 
	MOVLW       100
	MOVWF       R4 
	MOVLW       0
	MOVWF       R5 
	MOVF        RTCC_CalcWkDay_yr+0, 0 
	MOVWF       R0 
	MOVF        RTCC_CalcWkDay_yr+1, 0 
	MOVWF       R1 
	CALL        _Div_16x16_U+0, 0
	MOVF        R0, 0 
	SUBWF       FLOC__RTCC_CalcWkDay+0, 1 
	MOVF        R1, 0 
	SUBWFB      FLOC__RTCC_CalcWkDay+1, 1 
	MOVLW       144
	MOVWF       R4 
	MOVLW       1
	MOVWF       R5 
	MOVF        RTCC_CalcWkDay_yr+0, 0 
	MOVWF       R0 
	MOVF        RTCC_CalcWkDay_yr+1, 0 
	MOVWF       R1 
	CALL        _Div_16x16_U+0, 0
	MOVF        R0, 0 
	ADDWF       FLOC__RTCC_CalcWkDay+0, 0 
	MOVWF       R2 
	MOVF        R1, 0 
	ADDWFC      FLOC__RTCC_CalcWkDay+1, 0 
	MOVWF       R3 
	DECF        _dtmRTCC+1, 0 
	MOVWF       R0 
	MOVLW       RTCC_CalcWkDay_tbl+0
	ADDWF       R0, 0 
	MOVWF       TBLPTRL 
	MOVLW       hi_addr(RTCC_CalcWkDay_tbl+0)
	MOVWF       TBLPTRH 
	MOVLW       0
	ADDWFC      TBLPTRH, 1 
	MOVLW       higher_addr(RTCC_CalcWkDay_tbl+0)
	MOVWF       TBLPTRU 
	MOVLW       0
	ADDWFC      TBLPTRU, 1 
	TBLRD*+
	MOVFF       TABLAT+0, R0
	MOVLW       0
	MOVWF       R1 
	MOVF        R2, 0 
	ADDWF       R0, 1 
	MOVF        R3, 0 
	ADDWFC      R1, 1 
	MOVF        _dtmRTCC+2, 0 
	ADDWF       R0, 1 
	MOVLW       0
	ADDWFC      R1, 1 
	MOVLW       7
	MOVWF       R4 
	MOVLW       0
	MOVWF       R5 
	CALL        _Div_16x16_U+0, 0
	MOVF        R8, 0 
	MOVWF       R0 
	MOVF        R9, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       _bytWkDay+0 
;RTCC.mpas,29 :: 		end;
L_end_RTCC_CalcWkDay:
	RETURN      0
; end of _RTCC_CalcWkDay

RTCC_RTCC_WrEn:

;RTCC.mpas,32 :: 		begin
;RTCC.mpas,33 :: 		EECON2 := 0x55;
	MOVLW       85
	MOVWF       EECON2+0 
;RTCC.mpas,34 :: 		EECON2 := 0xAA;
	MOVLW       170
	MOVWF       EECON2+0 
;RTCC.mpas,35 :: 		RTCWREN_bit := 1;
	BSF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.mpas,36 :: 		end;
L_end_RTCC_WrEn:
	RETURN      0
; end of RTCC_RTCC_WrEn

_RTCC_Init:

;RTCC.mpas,39 :: 		begin
;RTCC.mpas,41 :: 		T1OSCEN_bit := 1;
	BSF         T1OSCEN_bit+0, BitPos(T1OSCEN_bit+0) 
;RTCC.mpas,42 :: 		RTCC_WrEn();
	CALL        RTCC_RTCC_WrEn+0, 0
;RTCC.mpas,43 :: 		RTCEN_bit := 1;
	BSF         RTCEN_bit+0, BitPos(RTCEN_bit+0) 
;RTCC.mpas,44 :: 		RTCWREN_Bit := 0;
	BCF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.mpas,45 :: 		end;
L_end_RTCC_Init:
	RETURN      0
; end of _RTCC_Init

_RTCC_Read:

;RTCC.mpas,48 :: 		begin
;RTCC.mpas,49 :: 		RTCCFG := %10000011; //Set RTCPTR to 11
	MOVLW       131
	MOVWF       RTCCFG+0 
;RTCC.mpas,50 :: 		while (RTCSYNC_bit = 1) do begin
L__RTCC_Read8:
	BTFSC       RTCSYNC_bit+0, BitPos(RTCSYNC_bit+0) 
	GOTO        L__RTCC_Read8
;RTCC.mpas,53 :: 		dtmRTCC.Year   := Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+0 
;RTCC.mpas,54 :: 		dtmRTCC.Month  := Bcd2Dec(RTCVALH); //Just to decrement RTCPTR
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+1 
;RTCC.mpas,55 :: 		dtmRTCC.Day    := Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+2 
;RTCC.mpas,56 :: 		dtmRTCC.Month  := Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+1 
;RTCC.mpas,57 :: 		dtmRTCC.Hour   := Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+3 
;RTCC.mpas,58 :: 		bytWkDay  := Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _bytWkDay+0 
;RTCC.mpas,59 :: 		dtmRTCC.Second := Bcd2Dec(RTCVALL);
	MOVF        RTCVALL+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+5 
;RTCC.mpas,60 :: 		dtmRTCC.Minute := Bcd2Dec(RTCVALH);
	MOVF        RTCVALH+0, 0 
	MOVWF       FARG_Bcd2Dec_bcd_num+0 
	CALL        _Bcd2Dec+0, 0
	MOVF        R0, 0 
	MOVWF       _dtmRTCC+4 
;RTCC.mpas,61 :: 		end;
L_end_RTCC_Read:
	RETURN      0
; end of _RTCC_Read

_RTCC_Write:

;RTCC.mpas,64 :: 		begin
;RTCC.mpas,65 :: 		RTCC_CalcWkDay();
	CALL        _RTCC_CalcWkDay+0, 0
;RTCC.mpas,66 :: 		RTCC_WrEn();
	CALL        RTCC_RTCC_WrEn+0, 0
;RTCC.mpas,67 :: 		RTCCFG := %10100011; //Set RTCPTR to 11
	MOVLW       163
	MOVWF       RTCCFG+0 
;RTCC.mpas,68 :: 		RTCVALL := Dec2Bcd(dtmRTCC.Year);
	MOVF        _dtmRTCC+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.mpas,69 :: 		RTCVALH := Dec2Bcd(dtmRTCC.Month); //Just to decrement RTCPTR
	MOVF        _dtmRTCC+1, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.mpas,70 :: 		RTCVALL := Dec2Bcd(dtmRTCC.Day);
	MOVF        _dtmRTCC+2, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.mpas,71 :: 		RTCVALH := Dec2Bcd(dtmRTCC.Month);
	MOVF        _dtmRTCC+1, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.mpas,72 :: 		RTCVALL := Dec2Bcd(dtmRTCC.Hour);
	MOVF        _dtmRTCC+3, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.mpas,73 :: 		RTCVALH := Dec2Bcd(bytWkDay);
	MOVF        _bytWkDay+0, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.mpas,74 :: 		RTCVALL := Dec2Bcd(dtmRTCC.Second);
	MOVF        _dtmRTCC+5, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALL+0 
;RTCC.mpas,75 :: 		RTCVALH := Dec2Bcd(dtmRTCC.Minute);
	MOVF        _dtmRTCC+4, 0 
	MOVWF       FARG_Dec2Bcd_decnum+0 
	CALL        _Dec2Bcd+0, 0
	MOVF        R0, 0 
	MOVWF       RTCVALH+0 
;RTCC.mpas,76 :: 		RTCWREN_bit := 0;
	BCF         RTCWREN_bit+0, BitPos(RTCWREN_bit+0) 
;RTCC.mpas,77 :: 		end;
L_end_RTCC_Write:
	RETURN      0
; end of _RTCC_Write

RTCC_RTCC_GenerateDigits:

;RTCC.mpas,80 :: 		begin
;RTCC.mpas,81 :: 		pos^ := (value / 10) + 48;
	MOVLW       10
	MOVWF       R4 
	MOVF        FARG_RTCC_GenerateDigits_value+0, 0 
	MOVWF       R0 
	CALL        _Div_8x8_U+0, 0
	MOVFF       FARG_RTCC_GenerateDigits_pos+0, FSR1
	MOVFF       FARG_RTCC_GenerateDigits_pos+1, FSR1H
	MOVLW       48
	ADDWF       R0, 0 
	MOVWF       POSTINC1+0 
;RTCC.mpas,82 :: 		Inc(pos);
	INFSNZ      FARG_RTCC_GenerateDigits_pos+0, 1 
	INCF        FARG_RTCC_GenerateDigits_pos+1, 1 
;RTCC.mpas,83 :: 		pos^ := (value mod 10) + 48;
	MOVLW       10
	MOVWF       R4 
	MOVF        FARG_RTCC_GenerateDigits_value+0, 0 
	MOVWF       R0 
	CALL        _Div_8x8_U+0, 0
	MOVF        R8, 0 
	MOVWF       R0 
	MOVFF       FARG_RTCC_GenerateDigits_pos+0, FSR1
	MOVFF       FARG_RTCC_GenerateDigits_pos+1, FSR1H
	MOVLW       48
	ADDWF       R0, 0 
	MOVWF       POSTINC1+0 
;RTCC.mpas,84 :: 		end;
L_end_RTCC_GenerateDigits:
	RETURN      0
; end of RTCC_RTCC_GenerateDigits

RTCC_RTCC_GenerateDateStringYMD:

;RTCC.mpas,89 :: 		begin
;RTCC.mpas,91 :: 		sep := '/';
	MOVLW       47
	MOVWF       RTCC_GenerateDateStringYMD_sep+0 
;RTCC.mpas,92 :: 		pos := @rtccstring;
	MOVF        FARG_RTCC_GenerateDateStringYMD_rtccstring+0, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+0 
	MOVF        FARG_RTCC_GenerateDateStringYMD_rtccstring+1, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+1 
;RTCC.mpas,93 :: 		RTCC_GenerateDigits(dt.Year, pos);
	MOVFF       FARG_RTCC_GenerateDateStringYMD_dt+0, FSR0
	MOVFF       FARG_RTCC_GenerateDateStringYMD_dt+1, FSR0H
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        FARG_RTCC_GenerateDateStringYMD_rtccstring+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        FARG_RTCC_GenerateDateStringYMD_rtccstring+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,94 :: 		pos := pos + 2; pos^ := sep; Inc(pos);
	MOVLW       2
	ADDWF       RTCC_GenerateDateStringYMD_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateDateStringYMD_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+1 
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVF        RTCC_GenerateDateStringYMD_sep+0, 0 
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateDateStringYMD_pos+0, 1 
	INCF        RTCC_GenerateDateStringYMD_pos+1, 1 
;RTCC.mpas,95 :: 		RTCC_GenerateDigits(dt.Month, pos);
	MOVLW       1
	ADDWF       FARG_RTCC_GenerateDateStringYMD_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateDateStringYMD_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        RTCC_GenerateDateStringYMD_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        RTCC_GenerateDateStringYMD_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,96 :: 		pos := pos + 2; pos^ := sep; Inc(pos);
	MOVLW       2
	ADDWF       RTCC_GenerateDateStringYMD_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateDateStringYMD_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+1 
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVF        RTCC_GenerateDateStringYMD_sep+0, 0 
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateDateStringYMD_pos+0, 1 
	INCF        RTCC_GenerateDateStringYMD_pos+1, 1 
;RTCC.mpas,97 :: 		RTCC_GenerateDigits(dt.Day, pos);
	MOVLW       2
	ADDWF       FARG_RTCC_GenerateDateStringYMD_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateDateStringYMD_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        RTCC_GenerateDateStringYMD_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        RTCC_GenerateDateStringYMD_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,98 :: 		pos := pos + 2;
	MOVLW       2
	ADDWF       RTCC_GenerateDateStringYMD_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateDateStringYMD_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateDateStringYMD_pos+1 
;RTCC.mpas,99 :: 		pos^ := 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mpas,100 :: 		end;
L_end_RTCC_GenerateDateStringYMD:
	RETURN      0
; end of RTCC_RTCC_GenerateDateStringYMD

_RTCC_GenerateDateStringDMY:

;RTCC.mpas,105 :: 		begin
;RTCC.mpas,107 :: 		sep := '/';
	MOVLW       47
	MOVWF       RTCC_GenerateDateStringDMY_sep+0 
;RTCC.mpas,108 :: 		pos := @rtccstring;
	MOVF        FARG_RTCC_GenerateDateStringDMY_rtccstring+0, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+0 
	MOVF        FARG_RTCC_GenerateDateStringDMY_rtccstring+1, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+1 
;RTCC.mpas,109 :: 		RTCC_GenerateDigits(dt.Day, pos);
	MOVLW       2
	ADDWF       FARG_RTCC_GenerateDateStringDMY_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateDateStringDMY_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        FARG_RTCC_GenerateDateStringDMY_rtccstring+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        FARG_RTCC_GenerateDateStringDMY_rtccstring+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,110 :: 		pos := pos + 2; pos^ := sep; Inc(pos);
	MOVLW       2
	ADDWF       RTCC_GenerateDateStringDMY_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateDateStringDMY_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+1 
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVF        RTCC_GenerateDateStringDMY_sep+0, 0 
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mpas,111 :: 		RTCC_GenerateDigits(dt.Month, pos);
	MOVLW       1
	ADDWF       FARG_RTCC_GenerateDateStringDMY_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateDateStringDMY_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        RTCC_GenerateDateStringDMY_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        RTCC_GenerateDateStringDMY_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,112 :: 		pos := pos + 2; pos^ := sep; Inc(pos);
	MOVLW       2
	ADDWF       RTCC_GenerateDateStringDMY_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateDateStringDMY_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+1 
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVF        RTCC_GenerateDateStringDMY_sep+0, 0 
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mpas,113 :: 		pos^ := '2'; Inc(pos);
	MOVFF       RTCC_GenerateDateStringDMY_pos+0, FSR1
	MOVFF       RTCC_GenerateDateStringDMY_pos+1, FSR1H
	MOVLW       50
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mpas,114 :: 		pos^ := '0'; Inc(pos);
	MOVFF       RTCC_GenerateDateStringDMY_pos+0, FSR1
	MOVFF       RTCC_GenerateDateStringDMY_pos+1, FSR1H
	MOVLW       48
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mpas,115 :: 		RTCC_GenerateDigits(dt.Year, pos);
	MOVFF       FARG_RTCC_GenerateDateStringDMY_dt+0, FSR0
	MOVFF       FARG_RTCC_GenerateDateStringDMY_dt+1, FSR0H
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        RTCC_GenerateDateStringDMY_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        RTCC_GenerateDateStringDMY_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,116 :: 		pos := pos + 2;
	MOVLW       2
	ADDWF       RTCC_GenerateDateStringDMY_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateDateStringDMY_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateDateStringDMY_pos+1 
;RTCC.mpas,117 :: 		pos^ := 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mpas,118 :: 		end;
L_end_RTCC_GenerateDateStringDMY:
	RETURN      0
; end of _RTCC_GenerateDateStringDMY

_RTCC_GenerateTimeString:

;RTCC.mpas,122 :: 		begin
;RTCC.mpas,124 :: 		pos := @rtccstring;
	MOVF        FARG_RTCC_GenerateTimeString_rtccstring+0, 0 
	MOVWF       RTCC_GenerateTimeString_pos+0 
	MOVF        FARG_RTCC_GenerateTimeString_rtccstring+1, 0 
	MOVWF       RTCC_GenerateTimeString_pos+1 
;RTCC.mpas,125 :: 		RTCC_GenerateDigits(dt.Hour, pos);
	MOVLW       3
	ADDWF       FARG_RTCC_GenerateTimeString_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateTimeString_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        FARG_RTCC_GenerateTimeString_rtccstring+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        FARG_RTCC_GenerateTimeString_rtccstring+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,126 :: 		pos := pos + 2; pos^ := ':'; Inc(pos);
	MOVLW       2
	ADDWF       RTCC_GenerateTimeString_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateTimeString_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateTimeString_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateTimeString_pos+1 
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       58
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateTimeString_pos+0, 1 
	INCF        RTCC_GenerateTimeString_pos+1, 1 
;RTCC.mpas,127 :: 		RTCC_GenerateDigits(dt.Minute, pos);
	MOVLW       4
	ADDWF       FARG_RTCC_GenerateTimeString_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateTimeString_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        RTCC_GenerateTimeString_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        RTCC_GenerateTimeString_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,128 :: 		if (incl_sec) then begin
	MOVF        FARG_RTCC_GenerateTimeString_incl_sec+0, 1 
	BTFSC       STATUS+0, 2 
	GOTO        L__RTCC_GenerateTimeString18
;RTCC.mpas,129 :: 		pos := pos + 2; pos^ := ':'; Inc(pos);
	MOVLW       2
	ADDWF       RTCC_GenerateTimeString_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateTimeString_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateTimeString_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateTimeString_pos+1 
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       58
	MOVWF       POSTINC1+0 
	INFSNZ      RTCC_GenerateTimeString_pos+0, 1 
	INCF        RTCC_GenerateTimeString_pos+1, 1 
;RTCC.mpas,130 :: 		RTCC_GenerateDigits(dt.Second, pos);
	MOVLW       5
	ADDWF       FARG_RTCC_GenerateTimeString_dt+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateTimeString_dt+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_value+0 
	MOVF        RTCC_GenerateTimeString_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+0 
	MOVF        RTCC_GenerateTimeString_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateDigits_pos+1 
	CALL        RTCC_RTCC_GenerateDigits+0, 0
;RTCC.mpas,131 :: 		end;
L__RTCC_GenerateTimeString18:
;RTCC.mpas,132 :: 		pos := pos + 2;
	MOVLW       2
	ADDWF       RTCC_GenerateTimeString_pos+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      RTCC_GenerateTimeString_pos+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateTimeString_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateTimeString_pos+1 
;RTCC.mpas,133 :: 		pos^ := 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mpas,134 :: 		end;
L_end_RTCC_GenerateTimeString:
	RETURN      0
; end of _RTCC_GenerateTimeString

_RTCC_GenerateString:

;RTCC.mpas,138 :: 		begin
;RTCC.mpas,139 :: 		RTCC_GenerateDateStringDMY(dt, rtccstring);
	MOVF        FARG_RTCC_GenerateString_dt+0, 0 
	MOVWF       FARG_RTCC_GenerateDateStringDMY_dt+0 
	MOVF        FARG_RTCC_GenerateString_dt+1, 0 
	MOVWF       FARG_RTCC_GenerateDateStringDMY_dt+1 
	MOVF        FARG_RTCC_GenerateString_rtccstring+0, 0 
	MOVWF       FARG_RTCC_GenerateDateStringDMY_rtccstring+0 
	MOVF        FARG_RTCC_GenerateString_rtccstring+1, 0 
	MOVWF       FARG_RTCC_GenerateDateStringDMY_rtccstring+1 
	CALL        _RTCC_GenerateDateStringDMY+0, 0
;RTCC.mpas,140 :: 		pos := @rtccstring + 10;
	MOVLW       10
	ADDWF       FARG_RTCC_GenerateString_rtccstring+0, 0 
	MOVWF       R0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateString_rtccstring+1, 0 
	MOVWF       R1 
	MOVF        R0, 0 
	MOVWF       RTCC_GenerateString_pos+0 
	MOVF        R1, 0 
	MOVWF       RTCC_GenerateString_pos+1 
;RTCC.mpas,141 :: 		pos^ := ' ';
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       32
	MOVWF       POSTINC1+0 
;RTCC.mpas,142 :: 		Inc(pos);
	INFSNZ      RTCC_GenerateString_pos+0, 1 
	INCF        RTCC_GenerateString_pos+1, 1 
;RTCC.mpas,143 :: 		RTCC_GenerateTimeString(dt, pos, 0);
	MOVF        FARG_RTCC_GenerateString_dt+0, 0 
	MOVWF       FARG_RTCC_GenerateTimeString_dt+0 
	MOVF        FARG_RTCC_GenerateString_dt+1, 0 
	MOVWF       FARG_RTCC_GenerateTimeString_dt+1 
	MOVF        RTCC_GenerateString_pos+0, 0 
	MOVWF       FARG_RTCC_GenerateTimeString_rtccstring+0 
	MOVF        RTCC_GenerateString_pos+1, 0 
	MOVWF       FARG_RTCC_GenerateTimeString_rtccstring+1 
	CLRF        FARG_RTCC_GenerateTimeString_incl_sec+0 
	CALL        _RTCC_GenerateTimeString+0, 0
;RTCC.mpas,144 :: 		end;
L_end_RTCC_GenerateString:
	RETURN      0
; end of _RTCC_GenerateString
