
RTCC_RTCC_GenerateDigits:

;RTCC.mbas,14 :: 		sub procedure RTCC_GenerateDigits(dim value as char, dim pos as ^char)
;RTCC.mbas,15 :: 		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.mbas,16 :: 		Inc(pos)
	INFSNZ      FARG_RTCC_GenerateDigits_pos+0, 1 
	INCF        FARG_RTCC_GenerateDigits_pos+1, 1 
;RTCC.mbas,17 :: 		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.mbas,18 :: 		end sub
L_end_RTCC_GenerateDigits:
	RETURN      0
; end of RTCC_RTCC_GenerateDigits

RTCC_RTCC_GenerateDateStringDMY:

;RTCC.mbas,23 :: 		dim sep as char
;RTCC.mbas,24 :: 		sep = "/"
	MOVLW       47
	MOVWF       RTCC_GenerateDateStringDMY_sep+0 
;RTCC.mbas,25 :: 		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.mbas,26 :: 		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.mbas,27 :: 		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.mbas,28 :: 		pos^ = sep
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVF        RTCC_GenerateDateStringDMY_sep+0, 0 
	MOVWF       POSTINC1+0 
;RTCC.mbas,29 :: 		Inc(pos)
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mbas,30 :: 		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.mbas,31 :: 		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.mbas,32 :: 		pos^ = sep
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVF        RTCC_GenerateDateStringDMY_sep+0, 0 
	MOVWF       POSTINC1+0 
;RTCC.mbas,33 :: 		Inc(pos)
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mbas,34 :: 		pos^ = "2"
	MOVFF       RTCC_GenerateDateStringDMY_pos+0, FSR1
	MOVFF       RTCC_GenerateDateStringDMY_pos+1, FSR1H
	MOVLW       50
	MOVWF       POSTINC1+0 
;RTCC.mbas,35 :: 		Inc(pos)
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mbas,36 :: 		pos^ = "0"
	MOVFF       RTCC_GenerateDateStringDMY_pos+0, FSR1
	MOVFF       RTCC_GenerateDateStringDMY_pos+1, FSR1H
	MOVLW       48
	MOVWF       POSTINC1+0 
;RTCC.mbas,37 :: 		Inc(pos)
	INFSNZ      RTCC_GenerateDateStringDMY_pos+0, 1 
	INCF        RTCC_GenerateDateStringDMY_pos+1, 1 
;RTCC.mbas,38 :: 		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.mbas,39 :: 		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.mbas,40 :: 		pos^ = 0
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mbas,41 :: 		end sub
L_end_RTCC_GenerateDateStringDMY:
	RETURN      0
; end of RTCC_RTCC_GenerateDateStringDMY

RTCC_RTCC_GenerateTimeString:

;RTCC.mbas,45 :: 		dim pos as ^char
;RTCC.mbas,46 :: 		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.mbas,47 :: 		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.mbas,48 :: 		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.mbas,49 :: 		pos^ = ":"
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       58
	MOVWF       POSTINC1+0 
;RTCC.mbas,50 :: 		Inc(pos)
	INFSNZ      RTCC_GenerateTimeString_pos+0, 1 
	INCF        RTCC_GenerateTimeString_pos+1, 1 
;RTCC.mbas,51 :: 		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.mbas,52 :: 		if incl_sec then
	MOVF        FARG_RTCC_GenerateTimeString_incl_sec+0, 1 
	BTFSC       STATUS+0, 2 
	GOTO        L_RTCC_RTCC_GenerateTimeString4
;RTCC.mbas,53 :: 		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.mbas,54 :: 		pos^ = ":"
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	MOVLW       58
	MOVWF       POSTINC1+0 
;RTCC.mbas,55 :: 		Inc(pos)
	INFSNZ      RTCC_GenerateTimeString_pos+0, 1 
	INCF        RTCC_GenerateTimeString_pos+1, 1 
;RTCC.mbas,56 :: 		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
L_RTCC_RTCC_GenerateTimeString4:
;RTCC.mbas,58 :: 		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.mbas,59 :: 		pos^ = 0
	MOVFF       R0, FSR1
	MOVFF       R1, FSR1H
	CLRF        POSTINC1+0 
;RTCC.mbas,60 :: 		end sub
L_end_RTCC_GenerateTimeString:
	RETURN      0
; end of RTCC_RTCC_GenerateTimeString

_RTCC_GenerateString:

;RTCC.mbas,63 :: 		dim pos as ^char
;RTCC.mbas,64 :: 		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.mbas,65 :: 		pos = @rtccstring + 10
	MOVLW       10
	ADDWF       FARG_RTCC_GenerateString_rtccstring+0, 0 
	MOVWF       FSR1 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateString_rtccstring+1, 0 
	MOVWF       FSR1H 
;RTCC.mbas,66 :: 		pos^ = " "
	MOVLW       32
	MOVWF       POSTINC1+0 
;RTCC.mbas,67 :: 		RTCC_GenerateTimeString(@dt, @rtccstring + 11, 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 
	MOVLW       11
	ADDWF       FARG_RTCC_GenerateString_rtccstring+0, 0 
	MOVWF       FARG_RTCC_GenerateTimeString_rtccstring+0 
	MOVLW       0
	ADDWFC      FARG_RTCC_GenerateString_rtccstring+1, 0 
	MOVWF       FARG_RTCC_GenerateTimeString_rtccstring+1 
	CLRF        FARG_RTCC_GenerateTimeString_incl_sec+0 
	CALL        RTCC_RTCC_GenerateTimeString+0, 0
;RTCC.mbas,68 :: 		end sub
L_end_RTCC_GenerateString:
	RETURN      0
; end of _RTCC_GenerateString
