
RTCC_RTCC_GenerateDigits:

;RTCC.mpas,15 :: 		begin
;RTCC.mpas,16 :: 		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,17 :: 		Inc(pos);
	INFSNZ      FARG_RTCC_GenerateDigits_pos+0, 1 
	INCF        FARG_RTCC_GenerateDigits_pos+1, 1 
;RTCC.mpas,18 :: 		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,19 :: 		end;
L_end_RTCC_GenerateDigits:
	RETURN      0
; end of RTCC_RTCC_GenerateDigits

RTCC_RTCC_GenerateDateStringYMD:

;RTCC.mpas,24 :: 		begin
;RTCC.mpas,26 :: 		sep := '/';
	MOVLW       47
	MOVWF       RTCC_GenerateDateStringYMD_sep+0 
;RTCC.mpas,27 :: 		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,28 :: 		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,29 :: 		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,30 :: 		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,31 :: 		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,32 :: 		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,33 :: 		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,34 :: 		pos^ := 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mpas,35 :: 		end;
L_end_RTCC_GenerateDateStringYMD:
	RETURN      0
; end of RTCC_RTCC_GenerateDateStringYMD

RTCC_RTCC_GenerateDateStringDMY:

;RTCC.mpas,40 :: 		begin
;RTCC.mpas,42 :: 		sep := '/';
	MOVLW       47
	MOVWF       RTCC_GenerateDateStringDMY_sep+0 
;RTCC.mpas,43 :: 		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,44 :: 		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,45 :: 		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,46 :: 		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,47 :: 		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,48 :: 		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,49 :: 		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,50 :: 		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,51 :: 		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,52 :: 		pos^ := 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mpas,53 :: 		end;
L_end_RTCC_GenerateDateStringDMY:
	RETURN      0
; end of RTCC_RTCC_GenerateDateStringDMY

RTCC_RTCC_GenerateTimeString:

;RTCC.mpas,57 :: 		begin
;RTCC.mpas,59 :: 		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,60 :: 		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,61 :: 		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,62 :: 		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,63 :: 		if (incl_sec) then begin
	MOVF        FARG_RTCC_GenerateTimeString_incl_sec+0, 1 
	BTFSC       STATUS+0, 2 
	GOTO        L_RTCC_RTCC_GenerateTimeString5
;RTCC.mpas,64 :: 		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,65 :: 		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,66 :: 		end;
L_RTCC_RTCC_GenerateTimeString5:
;RTCC.mpas,67 :: 		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,68 :: 		pos^ := 0;
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mpas,69 :: 		end;
L_end_RTCC_GenerateTimeString:
	RETURN      0
; end of RTCC_RTCC_GenerateTimeString

_RTCC_GenerateString:

;RTCC.mpas,73 :: 		begin
;RTCC.mpas,74 :: 		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_RTCC_GenerateDateStringDMY+0, 0
;RTCC.mpas,75 :: 		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,76 :: 		pos^ := ' ';
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       32
	MOVWF       POSTINC1+0 
;RTCC.mpas,77 :: 		Inc(pos);
	INFSNZ      RTCC_GenerateString_pos+0, 1 
	INCF        RTCC_GenerateString_pos+1, 1 
;RTCC.mpas,78 :: 		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_RTCC_GenerateTimeString+0, 0
;RTCC.mpas,79 :: 		end;
L_end_RTCC_GenerateString:
	RETURN      0
; end of _RTCC_GenerateString
