opt subtitle "HI-TECH Software Omniscient Code Generator (Lite mode) build 10920"

opt pagewidth 120

	opt lm

	processor	16F877A
clrc	macro
	bcf	3,0
	endm
clrz	macro
	bcf	3,2
	endm
setc	macro
	bsf	3,0
	endm
setz	macro
	bsf	3,2
	endm
skipc	macro
	btfss	3,0
	endm
skipz	macro
	btfss	3,2
	endm
skipnc	macro
	btfsc	3,0
	endm
skipnz	macro
	btfsc	3,2
	endm
indf	equ	0
indf0	equ	0
pc	equ	2
pcl	equ	2
status	equ	3
fsr	equ	4
fsr0	equ	4
c	equ	1
z	equ	0
pclath	equ	10
	FNCALL	_main,_SysInit
	FNCALL	_main,_IN1307_EEPROM_Test
	FNCALL	_IN1307_EEPROM_Test,_Read_I2C
	FNCALL	_IN1307_EEPROM_Test,___bmul
	FNCALL	_IN1307_EEPROM_Test,_printf
	FNCALL	_SysInit,_Write_I2C
	FNCALL	_printf,_putch
	FNCALL	_printf,___lwdiv
	FNCALL	_printf,___lwmod
	FNROOT	_main
	global	_dpowers
psect	strings,class=STRING,delta=2
global __pstrings
__pstrings:
;	global	stringdir,stringtab,__stringbase
stringtab:
;	String table - string pointers are 1 byte each
stringcode:stringdir:
movlw high(stringdir)
movwf pclath
movf fsr,w
incf fsr
	addwf pc
__stringbase:
	retlw	0
psect	strings
	file	"C:\Program Files (x86)\HI-TECH Software\PICC\9.83\lib\doprnt.c"
	line	350
_dpowers:
	retlw	01h
	retlw	0

	retlw	0Ah
	retlw	0

	retlw	064h
	retlw	0

	retlw	0E8h
	retlw	03h

	retlw	010h
	retlw	027h

	global	_dpowers
	global	IN1307_EEPROM_Test@eeprom_data
	global	IN1307_EEPROM_Test@data
	global	IN1307_EEPROM_Test@data1
	global	IN1307_EEPROM_Test@h
	global	IN1307_EEPROM_Test@m
	global	IN1307_EEPROM_Test@s
	global	IN1307_EEPROM_Test@data2
	global	_PORTC
_PORTC	set	7
	global	_RCSTA
_RCSTA	set	24
	global	_SSPBUF
_SSPBUF	set	19
	global	_SSPCON
_SSPCON	set	20
	global	_TXREG
_TXREG	set	25
	global	_CARRY
_CARRY	set	24
	global	_GIE
_GIE	set	95
	global	_SPBRG
_SPBRG	set	153
	global	_SSPADD
_SSPADD	set	147
	global	_SSPSTAT
_SSPSTAT	set	148
	global	_TXSTA
_TXSTA	set	152
	global	_PEN
_PEN	set	1162
	global	_RCEN
_RCEN	set	1163
	global	_RSEN
_RSEN	set	1161
	global	_SEN
_SEN	set	1160
	global	_TRISC3
_TRISC3	set	1083
	global	_TRISC4
_TRISC4	set	1084
	global	_TRISC6
_TRISC6	set	1086
	global	_TRISC7
_TRISC7	set	1087
	global	_TRMT
_TRMT	set	1217
	global	_EEADR
_EEADR	set	269
	global	_EEDATA
_EEDATA	set	268
	global	_EECON1
_EECON1	set	396
	global	_EECON2
_EECON2	set	397
	global	_RD
_RD	set	3168
	global	_WR
_WR	set	3169
	global	_WREN
_WREN	set	3170
	
STR_1:	
	retlw	82	;'R'
	retlw	84	;'T'
	retlw	67	;'C'
	retlw	40	;'('
	retlw	104	;'h'
	retlw	111	;'o'
	retlw	117	;'u'
	retlw	114	;'r'
	retlw	58	;':'
	retlw	37	;'%'
	retlw	100	;'d'
	retlw	32	;' '
	retlw	109	;'m'
	retlw	105	;'i'
	retlw	110	;'n'
	retlw	117	;'u'
	retlw	116	;'t'
	retlw	101	;'e'
	retlw	58	;':'
	retlw	37	;'%'
	retlw	100	;'d'
	retlw	32	;' '
	retlw	115	;'s'
	retlw	101	;'e'
	retlw	99	;'c'
	retlw	111	;'o'
	retlw	110	;'n'
	retlw	100	;'d'
	retlw	58	;':'
	retlw	37	;'%'
	retlw	100	;'d'
	retlw	41	;')'
	retlw	32	;' '
	retlw	13
	retlw	10
	retlw	0
psect	strings
	file	"Test.as"
	line	#
psect cinit,class=CODE,delta=2
global start_initialization
start_initialization:

psect	bssBANK0,class=BANK0,space=1
global __pbssBANK0
__pbssBANK0:
IN1307_EEPROM_Test@eeprom_data:
       ds      2

IN1307_EEPROM_Test@data:
       ds      1

IN1307_EEPROM_Test@data1:
       ds      1

IN1307_EEPROM_Test@h:
       ds      1

IN1307_EEPROM_Test@m:
       ds      1

IN1307_EEPROM_Test@s:
       ds      1

IN1307_EEPROM_Test@data2:
       ds      1

; Clear objects allocated to BANK0
psect cinit,class=CODE,delta=2
	clrf	((__pbssBANK0)+0)&07Fh
	clrf	((__pbssBANK0)+1)&07Fh
	clrf	((__pbssBANK0)+2)&07Fh
	clrf	((__pbssBANK0)+3)&07Fh
	clrf	((__pbssBANK0)+4)&07Fh
	clrf	((__pbssBANK0)+5)&07Fh
	clrf	((__pbssBANK0)+6)&07Fh
	clrf	((__pbssBANK0)+7)&07Fh
psect cinit,class=CODE,delta=2
global end_of_initialization

;End of C runtime variable initialization code

end_of_initialization:
clrf status
ljmp _main	;jump to C main() function
psect	cstackCOMMON,class=COMMON,space=1
global __pcstackCOMMON
__pcstackCOMMON:
	global	?_Write_I2C
?_Write_I2C:	; 0 bytes @ 0x0
	global	?_putch
?_putch:	; 0 bytes @ 0x0
	global	??_putch
??_putch:	; 0 bytes @ 0x0
	global	?_IN1307_EEPROM_Test
?_IN1307_EEPROM_Test:	; 0 bytes @ 0x0
	global	?_SysInit
?_SysInit:	; 0 bytes @ 0x0
	global	?_main
?_main:	; 0 bytes @ 0x0
	global	?_Read_I2C
?_Read_I2C:	; 1 bytes @ 0x0
	global	?___bmul
?___bmul:	; 1 bytes @ 0x0
	global	?___lwdiv
?___lwdiv:	; 2 bytes @ 0x0
	global	Read_I2C@addr
Read_I2C@addr:	; 1 bytes @ 0x0
	global	Write_I2C@addr
Write_I2C@addr:	; 1 bytes @ 0x0
	global	putch@byte
putch@byte:	; 1 bytes @ 0x0
	global	___bmul@multiplicand
___bmul@multiplicand:	; 1 bytes @ 0x0
	global	___lwdiv@divisor
___lwdiv@divisor:	; 2 bytes @ 0x0
	ds	1
	global	??_Read_I2C
??_Read_I2C:	; 0 bytes @ 0x1
	global	??___bmul
??___bmul:	; 0 bytes @ 0x1
	global	Write_I2C@data
Write_I2C@data:	; 1 bytes @ 0x1
	ds	1
	global	??_Write_I2C
??_Write_I2C:	; 0 bytes @ 0x2
	global	Read_I2C@Read_Data
Read_I2C@Read_Data:	; 1 bytes @ 0x2
	global	Write_I2C@ID
Write_I2C@ID:	; 1 bytes @ 0x2
	global	___bmul@product
___bmul@product:	; 1 bytes @ 0x2
	global	___lwdiv@dividend
___lwdiv@dividend:	; 2 bytes @ 0x2
	ds	1
	global	??_SysInit
??_SysInit:	; 0 bytes @ 0x3
	global	Read_I2C@ID
Read_I2C@ID:	; 1 bytes @ 0x3
	global	___bmul@multiplier
___bmul@multiplier:	; 1 bytes @ 0x3
	ds	1
	global	??___lwdiv
??___lwdiv:	; 0 bytes @ 0x4
	ds	1
	global	___lwdiv@quotient
___lwdiv@quotient:	; 2 bytes @ 0x5
	ds	2
	global	___lwdiv@counter
___lwdiv@counter:	; 1 bytes @ 0x7
	ds	1
	global	?___lwmod
?___lwmod:	; 2 bytes @ 0x8
	global	___lwmod@divisor
___lwmod@divisor:	; 2 bytes @ 0x8
	ds	2
	global	___lwmod@dividend
___lwmod@dividend:	; 2 bytes @ 0xA
	ds	2
	global	??___lwmod
??___lwmod:	; 0 bytes @ 0xC
	ds	1
	global	___lwmod@counter
___lwmod@counter:	; 1 bytes @ 0xD
	ds	1
psect	cstackBANK0,class=BANK0,space=1
global __pcstackBANK0
__pcstackBANK0:
	global	?_printf
?_printf:	; 2 bytes @ 0x0
	ds	6
	global	??_printf
??_printf:	; 0 bytes @ 0x6
	ds	3
	global	printf@ap
printf@ap:	; 1 bytes @ 0x9
	ds	1
	global	printf@flag
printf@flag:	; 1 bytes @ 0xA
	ds	1
	global	printf@f
printf@f:	; 1 bytes @ 0xB
	ds	1
	global	printf@prec
printf@prec:	; 1 bytes @ 0xC
	ds	1
	global	printf@_val
printf@_val:	; 4 bytes @ 0xD
	ds	4
	global	printf@c
printf@c:	; 1 bytes @ 0x11
	ds	1
	global	??_IN1307_EEPROM_Test
??_IN1307_EEPROM_Test:	; 0 bytes @ 0x12
	ds	6
	global	??_main
??_main:	; 0 bytes @ 0x18
	ds	3
;;Data sizes: Strings 36, constant 10, data 0, bss 8, persistent 0 stack 0
;;Auto spaces:   Size  Autos    Used
;; COMMON          14     14      14
;; BANK0           80     27      35
;; BANK1           80      0       0
;; BANK3           96      0       0
;; BANK2           96      0       0

;;
;; Pointer list with targets:

;; ?___lwdiv	unsigned int  size(1) Largest target is 0
;;
;; ?___lwmod	unsigned int  size(1) Largest target is 0
;;
;; printf@f	PTR const unsigned char  size(1) Largest target is 36
;;		 -> STR_1(CODE[36]), 
;;
;; ?_printf	int  size(1) Largest target is 0
;;
;; printf@ap	PTR void [1] size(1) Largest target is 2
;;		 -> ?_printf(BANK0[2]), 
;;
;; S1276$_cp	PTR const unsigned char  size(1) Largest target is 0
;;
;; _val._str._cp	PTR const unsigned char  size(1) Largest target is 0
;;


;;
;; Critical Paths under _main in COMMON
;;
;;   _SysInit->_Write_I2C
;;   _printf->___lwmod
;;   ___lwmod->___lwdiv
;;
;; Critical Paths under _main in BANK0
;;
;;   _main->_IN1307_EEPROM_Test
;;   _IN1307_EEPROM_Test->_printf
;;
;; Critical Paths under _main in BANK1
;;
;;   None.
;;
;; Critical Paths under _main in BANK3
;;
;;   None.
;;
;; Critical Paths under _main in BANK2
;;
;;   None.

;;
;;Main: autosize = 0, tempsize = 3, incstack = 0, save=0
;;

;;
;;Call Graph Tables:
;;
;; ---------------------------------------------------------------------------------
;; (Depth) Function   	        Calls       Base Space   Used Autos Params    Refs
;; ---------------------------------------------------------------------------------
;; (0) _main                                                 3     3      0     956
;;                                             24 BANK0      3     3      0
;;                            _SysInit
;;                 _IN1307_EEPROM_Test
;; ---------------------------------------------------------------------------------
;; (1) _IN1307_EEPROM_Test                                   6     6      0     911
;;                                             18 BANK0      6     6      0
;;                           _Read_I2C
;;                             ___bmul
;;                             _printf
;; ---------------------------------------------------------------------------------
;; (1) _SysInit                                              3     3      0      45
;;                                              3 COMMON     3     3      0
;;                          _Write_I2C
;; ---------------------------------------------------------------------------------
;; (2) _printf                                              18    12      6     729
;;                                              0 BANK0     18    12      6
;;                              _putch
;;                            ___lwdiv
;;                            ___lwmod
;; ---------------------------------------------------------------------------------
;; (3) ___lwmod                                              6     2      4     159
;;                                              8 COMMON     6     2      4
;;                            ___lwdiv (ARG)
;; ---------------------------------------------------------------------------------
;; (3) ___lwdiv                                              8     4      4     162
;;                                              0 COMMON     8     4      4
;; ---------------------------------------------------------------------------------
;; (2) ___bmul                                               4     3      1      92
;;                                              0 COMMON     4     3      1
;; ---------------------------------------------------------------------------------
;; (3) _putch                                                1     1      0      22
;;                                              0 COMMON     1     1      0
;; ---------------------------------------------------------------------------------
;; (2) _Write_I2C                                            3     1      2      45
;;                                              0 COMMON     3     1      2
;; ---------------------------------------------------------------------------------
;; (2) _Read_I2C                                             4     3      1      90
;;                                              0 COMMON     4     3      1
;; ---------------------------------------------------------------------------------
;; Estimated maximum stack depth 3
;; ---------------------------------------------------------------------------------

;; Call Graph Graphs:

;; _main (ROOT)
;;   _SysInit
;;     _Write_I2C
;;   _IN1307_EEPROM_Test
;;     _Read_I2C
;;     ___bmul
;;     _printf
;;       _putch
;;       ___lwdiv
;;       ___lwmod
;;         ___lwdiv (ARG)
;;

;; Address spaces:

;;Name               Size   Autos  Total    Cost      Usage
;;BITCOMMON            E      0       0       0        0.0%
;;EEDATA             100      0       0       0        0.0%
;;NULL                 0      0       0       0        0.0%
;;CODE                 0      0       0       0        0.0%
;;COMMON               E      E       E       1      100.0%
;;BITSFR0              0      0       0       1        0.0%
;;SFR0                 0      0       0       1        0.0%
;;BITSFR1              0      0       0       2        0.0%
;;SFR1                 0      0       0       2        0.0%
;;STACK                0      0       3       2        0.0%
;;ABS                  0      0      31       3        0.0%
;;BITBANK0            50      0       0       4        0.0%
;;BITSFR3              0      0       0       4        0.0%
;;SFR3                 0      0       0       4        0.0%
;;BANK0               50     1B      23       5       43.8%
;;BITSFR2              0      0       0       5        0.0%
;;SFR2                 0      0       0       5        0.0%
;;BITBANK1            50      0       0       6        0.0%
;;BANK1               50      0       0       7        0.0%
;;BITBANK3            60      0       0       8        0.0%
;;BANK3               60      0       0       9        0.0%
;;BITBANK2            60      0       0      10        0.0%
;;BANK2               60      0       0      11        0.0%
;;DATA                 0      0      34      12        0.0%

	global	_main
psect	maintext,global,class=CODE,delta=2
global __pmaintext
__pmaintext:

;; *************** function _main *****************
;; Defined at:
;;		line 169 in file "D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
;; Parameters:    Size  Location     Type
;;		None
;; Auto vars:     Size  Location     Type
;;		None
;; Return value:  Size  Location     Type
;;		None               void
;; Registers used:
;;		wreg, fsr0l, fsr0h, status,2, status,0, btemp+1, pclath, cstack
;; Tracked objects:
;;		On entry : 17F/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         0       0       0       0       0
;;      Locals:         0       0       0       0       0
;;      Temps:          0       3       0       0       0
;;      Totals:         0       3       0       0       0
;;Total ram usage:        3 bytes
;; Hardware stack levels required when called:    3
;; This function calls:
;;		_SysInit
;;		_IN1307_EEPROM_Test
;; This function is called by:
;;		Startup code after reset
;; This function uses a non-reentrant model
;;
psect	maintext
	file	"D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
	line	169
	global	__size_of_main
	__size_of_main	equ	__end_of_main-_main
	
_main:	
	opt	stack 5
; Regs used in _main: [wreg-fsr0h+status,2+status,0+btemp+1+pclath+cstack]
	line	170
	
l3093:	
;test.c: 170: SysInit();
	fcall	_SysInit
	goto	l3095
	line	171
;test.c: 171: while (1)
	
l763:	
	line	173
	
l3095:	
;test.c: 172: {
;test.c: 173: IN1307_EEPROM_Test();
	fcall	_IN1307_EEPROM_Test
	line	174
	
l3097:	
;test.c: 174: _delay((unsigned long)((100)*(16000000/4000.0)));
	opt asmopt_off
movlw  3
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
movwf	((??_main+0)+0+2),f
movlw	8
movwf	((??_main+0)+0+1),f
	movlw	120
movwf	((??_main+0)+0),f
u2807:
	decfsz	((??_main+0)+0),f
	goto	u2807
	decfsz	((??_main+0)+0+1),f
	goto	u2807
	decfsz	((??_main+0)+0+2),f
	goto	u2807
opt asmopt_on

	goto	l3095
	line	175
	
l764:	
	line	171
	goto	l3095
	
l765:	
	line	176
	
l766:	
	global	start
	ljmp	start
	opt stack 0
GLOBAL	__end_of_main
	__end_of_main:
;; =============== function _main ends ============

	signat	_main,88
	global	_IN1307_EEPROM_Test
psect	text234,local,class=CODE,delta=2
global __ptext234
__ptext234:

;; *************** function _IN1307_EEPROM_Test *****************
;; Defined at:
;;		line 103 in file "D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
;; Parameters:    Size  Location     Type
;;		None
;; Auto vars:     Size  Location     Type
;;		None
;; Return value:  Size  Location     Type
;;		None               void
;; Registers used:
;;		wreg, fsr0l, fsr0h, status,2, status,0, btemp+1, pclath, cstack
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         0       0       0       0       0
;;      Locals:         0       0       0       0       0
;;      Temps:          0       6       0       0       0
;;      Totals:         0       6       0       0       0
;;Total ram usage:        6 bytes
;; Hardware stack levels used:    1
;; Hardware stack levels required when called:    2
;; This function calls:
;;		_Read_I2C
;;		___bmul
;;		_printf
;; This function is called by:
;;		_main
;; This function uses a non-reentrant model
;;
psect	text234
	file	"D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
	line	103
	global	__size_of_IN1307_EEPROM_Test
	__size_of_IN1307_EEPROM_Test	equ	__end_of_IN1307_EEPROM_Test-_IN1307_EEPROM_Test
	
_IN1307_EEPROM_Test:	
	opt	stack 5
; Regs used in _IN1307_EEPROM_Test: [wreg-fsr0h+status,2+status,0+btemp+1+pclath+cstack]
	line	107
	
l3063:	
;test.c: 104: static unsigned char data, data1, data2 = 0;
;test.c: 105: static unsigned char h, m, s = 0;
;test.c: 106: static unsigned eeprom_data = 0;
;test.c: 107: data = Read_I2C(0Xd0, 0);
	clrf	(?_Read_I2C)
	movlw	(0D0h)
	fcall	_Read_I2C
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data)
	line	108
	
l3065:	
;test.c: 108: data1 = (data & 0x0f);
	movf	(IN1307_EEPROM_Test@data),w
	andlw	0Fh
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data1)
	line	109
	
l3067:	
;test.c: 109: data2 = (data & 0x70);
	movf	(IN1307_EEPROM_Test@data),w
	andlw	070h
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data2)
	line	110
	
l3069:	
;test.c: 110: data2 = (data2 >> 4) *10;
	movlw	(0Ah)
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(?___bmul)
	movf	(IN1307_EEPROM_Test@data2),w
	movwf	(??_IN1307_EEPROM_Test+1)+0
	movlw	04h
u2775:
	clrc
	rrf	(??_IN1307_EEPROM_Test+1)+0,f
	addlw	-1
	skipz
	goto	u2775
	movf	0+(??_IN1307_EEPROM_Test+1)+0,w
	fcall	___bmul
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_IN1307_EEPROM_Test+2)+0
	movf	(??_IN1307_EEPROM_Test+2)+0,w
	movwf	(IN1307_EEPROM_Test@data2)
	line	111
	
l3071:	
;test.c: 111: s = (data2 + data1);
	movf	(IN1307_EEPROM_Test@data1),w
	addwf	(IN1307_EEPROM_Test@data2),w
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@s)
	line	113
	
l3073:	
;test.c: 113: data = Read_I2C(0Xd0, 1);
	clrf	(?_Read_I2C)
	bsf	status,0
	rlf	(?_Read_I2C),f
	movlw	(0D0h)
	fcall	_Read_I2C
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data)
	line	114
	
l3075:	
;test.c: 114: data1 = (data & 0x0f);
	movf	(IN1307_EEPROM_Test@data),w
	andlw	0Fh
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data1)
	line	115
	
l3077:	
;test.c: 115: data2 = (data & 0x70);
	movf	(IN1307_EEPROM_Test@data),w
	andlw	070h
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data2)
	line	116
	
l3079:	
;test.c: 116: data2 = (data2 >> 4) *10;
	movlw	(0Ah)
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(?___bmul)
	movf	(IN1307_EEPROM_Test@data2),w
	movwf	(??_IN1307_EEPROM_Test+1)+0
	movlw	04h
u2785:
	clrc
	rrf	(??_IN1307_EEPROM_Test+1)+0,f
	addlw	-1
	skipz
	goto	u2785
	movf	0+(??_IN1307_EEPROM_Test+1)+0,w
	fcall	___bmul
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_IN1307_EEPROM_Test+2)+0
	movf	(??_IN1307_EEPROM_Test+2)+0,w
	movwf	(IN1307_EEPROM_Test@data2)
	line	117
	
l3081:	
;test.c: 117: m = (data2 + data1);
	movf	(IN1307_EEPROM_Test@data1),w
	addwf	(IN1307_EEPROM_Test@data2),w
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@m)
	line	119
	
l3083:	
;test.c: 119: data = Read_I2C(0Xd0, 2);
	movlw	(02h)
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(?_Read_I2C)
	movlw	(0D0h)
	fcall	_Read_I2C
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_IN1307_EEPROM_Test+1)+0
	movf	(??_IN1307_EEPROM_Test+1)+0,w
	movwf	(IN1307_EEPROM_Test@data)
	line	120
	
l3085:	
;test.c: 120: data1 = (data & 0x0f);
	movf	(IN1307_EEPROM_Test@data),w
	andlw	0Fh
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data1)
	line	121
	
l3087:	
;test.c: 121: data2 = (data & 0x30);
	movf	(IN1307_EEPROM_Test@data),w
	andlw	030h
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@data2)
	line	122
;test.c: 122: data2 = (data2 >> 4) *10;
	movlw	(0Ah)
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(?___bmul)
	movf	(IN1307_EEPROM_Test@data2),w
	movwf	(??_IN1307_EEPROM_Test+1)+0
	movlw	04h
u2795:
	clrc
	rrf	(??_IN1307_EEPROM_Test+1)+0,f
	addlw	-1
	skipz
	goto	u2795
	movf	0+(??_IN1307_EEPROM_Test+1)+0,w
	fcall	___bmul
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_IN1307_EEPROM_Test+2)+0
	movf	(??_IN1307_EEPROM_Test+2)+0,w
	movwf	(IN1307_EEPROM_Test@data2)
	line	123
	
l3089:	
;test.c: 123: h = (data2 + data1);
	movf	(IN1307_EEPROM_Test@data1),w
	addwf	(IN1307_EEPROM_Test@data2),w
	movwf	(??_IN1307_EEPROM_Test+0)+0
	movf	(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(IN1307_EEPROM_Test@h)
	line	124
	
l3091:	
;test.c: 124: printf("RTC(hour:%d minute:%d second:%d) \r\n", h, m, s);
	movf	(IN1307_EEPROM_Test@h),w
	movwf	(??_IN1307_EEPROM_Test+0)+0
	clrf	(??_IN1307_EEPROM_Test+0)+0+1
	movf	0+(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(?_printf)
	movf	1+(??_IN1307_EEPROM_Test+0)+0,w
	movwf	(?_printf+1)
	movf	(IN1307_EEPROM_Test@m),w
	movwf	(??_IN1307_EEPROM_Test+2)+0
	clrf	(??_IN1307_EEPROM_Test+2)+0+1
	movf	0+(??_IN1307_EEPROM_Test+2)+0,w
	movwf	0+(?_printf)+02h
	movf	1+(??_IN1307_EEPROM_Test+2)+0,w
	movwf	1+(?_printf)+02h
	movf	(IN1307_EEPROM_Test@s),w
	movwf	(??_IN1307_EEPROM_Test+4)+0
	clrf	(??_IN1307_EEPROM_Test+4)+0+1
	movf	0+(??_IN1307_EEPROM_Test+4)+0,w
	movwf	0+(?_printf)+04h
	movf	1+(??_IN1307_EEPROM_Test+4)+0,w
	movwf	1+(?_printf)+04h
	movlw	((STR_1-__stringbase))&0ffh
	fcall	_printf
	line	126
	
l757:	
	return
	opt stack 0
GLOBAL	__end_of_IN1307_EEPROM_Test
	__end_of_IN1307_EEPROM_Test:
;; =============== function _IN1307_EEPROM_Test ends ============

	signat	_IN1307_EEPROM_Test,88
	global	_SysInit
psect	text235,local,class=CODE,delta=2
global __ptext235
__ptext235:

;; *************** function _SysInit *****************
;; Defined at:
;;		line 129 in file "D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
;; Parameters:    Size  Location     Type
;;		None
;; Auto vars:     Size  Location     Type
;;		None
;; Return value:  Size  Location     Type
;;		None               void
;; Registers used:
;;		wreg, status,2, status,0, pclath, cstack
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         0       0       0       0       0
;;      Locals:         0       0       0       0       0
;;      Temps:          3       0       0       0       0
;;      Totals:         3       0       0       0       0
;;Total ram usage:        3 bytes
;; Hardware stack levels used:    1
;; Hardware stack levels required when called:    1
;; This function calls:
;;		_Write_I2C
;; This function is called by:
;;		_main
;; This function uses a non-reentrant model
;;
psect	text235
	file	"D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
	line	129
	global	__size_of_SysInit
	__size_of_SysInit	equ	__end_of_SysInit-_SysInit
	
_SysInit:	
	opt	stack 6
; Regs used in _SysInit: [wreg+status,2+status,0+pclath+cstack]
	line	130
	
l2863:	
;test.c: 130: TRISC3 = 0;
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	bcf	(1083/8)^080h,(1083)&7
	line	131
;test.c: 131: TRISC3 = 0;
	bcf	(1083/8)^080h,(1083)&7
	line	132
	
l2865:	
;test.c: 132: PORTC =0XFF;
	movlw	(0FFh)
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(7)	;volatile
	line	133
;test.c: 133: _delay((unsigned long)((1000)*(16000000/4000.0)));
	opt asmopt_off
movlw  21
movwf	((??_SysInit+0)+0+2),f
movlw	75
movwf	((??_SysInit+0)+0+1),f
	movlw	209
movwf	((??_SysInit+0)+0),f
u2817:
	decfsz	((??_SysInit+0)+0),f
	goto	u2817
	decfsz	((??_SysInit+0)+0+1),f
	goto	u2817
	decfsz	((??_SysInit+0)+0+2),f
	goto	u2817
	clrwdt
opt asmopt_on

	line	135
	
l2867:	
;test.c: 135: TRISC3 = 1;
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	bsf	(1083/8)^080h,(1083)&7
	line	136
	
l2869:	
;test.c: 136: TRISC4 = 1;
	bsf	(1084/8)^080h,(1084)&7
	line	137
	
l2871:	
;test.c: 137: TRISC6 = 0;
	bcf	(1086/8)^080h,(1086)&7
	line	138
	
l2873:	
;test.c: 138: TRISC7 = 1;
	bsf	(1087/8)^080h,(1087)&7
	line	140
;test.c: 140: PORTC= 0XFF;
	movlw	(0FFh)
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(7)	;volatile
	line	142
;test.c: 142: SSPADD = 9;
	movlw	(09h)
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	movwf	(147)^080h	;volatile
	line	143
;test.c: 143: SSPSTAT = 0x80;
	movlw	(080h)
	movwf	(148)^080h	;volatile
	line	144
;test.c: 144: SSPCON = 0x28;
	movlw	(028h)
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(20)	;volatile
	line	149
;test.c: 149: TXSTA = 0B00100000;
	movlw	(020h)
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	movwf	(152)^080h	;volatile
	line	150
;test.c: 150: RCSTA = 0B10010000;
	movlw	(090h)
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(24)	;volatile
	line	151
;test.c: 151: SPBRG = 25;
	movlw	(019h)
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	movwf	(153)^080h	;volatile
	line	157
	
l2875:	
;test.c: 157: Write_I2C(0Xd0, 0x00, 0x00);
	clrf	(?_Write_I2C)
	clrf	0+(?_Write_I2C)+01h
	movlw	(0D0h)
	fcall	_Write_I2C
	line	158
	
l2877:	
;test.c: 158: _delay((unsigned long)((1)*(16000000/4000.0)));
	opt asmopt_off
movlw	6
movwf	((??_SysInit+0)+0+1),f
	movlw	48
movwf	((??_SysInit+0)+0),f
u2827:
	decfsz	((??_SysInit+0)+0),f
	goto	u2827
	decfsz	((??_SysInit+0)+0+1),f
	goto	u2827
	clrwdt
opt asmopt_on

	line	159
;test.c: 159: Write_I2C(0Xd0, 0x01, 0x03);
	clrf	(?_Write_I2C)
	bsf	status,0
	rlf	(?_Write_I2C),f
	movlw	(03h)
	movwf	(??_SysInit+0)+0
	movf	(??_SysInit+0)+0,w
	movwf	0+(?_Write_I2C)+01h
	movlw	(0D0h)
	fcall	_Write_I2C
	line	160
	
l2879:	
;test.c: 160: _delay((unsigned long)((1)*(16000000/4000.0)));
	opt asmopt_off
movlw	6
movwf	((??_SysInit+0)+0+1),f
	movlw	48
movwf	((??_SysInit+0)+0),f
u2837:
	decfsz	((??_SysInit+0)+0),f
	goto	u2837
	decfsz	((??_SysInit+0)+0+1),f
	goto	u2837
	clrwdt
opt asmopt_on

	line	161
	
l2881:	
;test.c: 161: Write_I2C(0Xd0, 0x02, 0x06);
	movlw	(02h)
	movwf	(??_SysInit+0)+0
	movf	(??_SysInit+0)+0,w
	movwf	(?_Write_I2C)
	movlw	(06h)
	movwf	(??_SysInit+1)+0
	movf	(??_SysInit+1)+0,w
	movwf	0+(?_Write_I2C)+01h
	movlw	(0D0h)
	fcall	_Write_I2C
	line	162
;test.c: 162: _delay((unsigned long)((1)*(16000000/4000.0)));
	opt asmopt_off
movlw	6
movwf	((??_SysInit+0)+0+1),f
	movlw	48
movwf	((??_SysInit+0)+0),f
u2847:
	decfsz	((??_SysInit+0)+0),f
	goto	u2847
	decfsz	((??_SysInit+0)+0+1),f
	goto	u2847
	clrwdt
opt asmopt_on

	line	163
	
l2883:	
;test.c: 163: Write_I2C(0Xd0, 0x07, 0x13);
	movlw	(07h)
	movwf	(??_SysInit+0)+0
	movf	(??_SysInit+0)+0,w
	movwf	(?_Write_I2C)
	movlw	(013h)
	movwf	(??_SysInit+1)+0
	movf	(??_SysInit+1)+0,w
	movwf	0+(?_Write_I2C)+01h
	movlw	(0D0h)
	fcall	_Write_I2C
	line	164
	
l2885:	
;test.c: 164: _delay((unsigned long)((1000)*(16000000/4000.0)));
	opt asmopt_off
movlw  21
movwf	((??_SysInit+0)+0+2),f
movlw	75
movwf	((??_SysInit+0)+0+1),f
	movlw	209
movwf	((??_SysInit+0)+0),f
u2857:
	decfsz	((??_SysInit+0)+0),f
	goto	u2857
	decfsz	((??_SysInit+0)+0+1),f
	goto	u2857
	decfsz	((??_SysInit+0)+0+2),f
	goto	u2857
	clrwdt
opt asmopt_on

	line	166
	
l760:	
	return
	opt stack 0
GLOBAL	__end_of_SysInit
	__end_of_SysInit:
;; =============== function _SysInit ends ============

	signat	_SysInit,88
	global	_printf
psect	text236,local,class=CODE,delta=2
global __ptext236
__ptext236:

;; *************** function _printf *****************
;; Defined at:
;;		line 461 in file "C:\Program Files (x86)\HI-TECH Software\PICC\9.83\lib\doprnt.c"
;; Parameters:    Size  Location     Type
;;  f               1    wreg     PTR const unsigned char 
;;		 -> STR_1(36), 
;; Auto vars:     Size  Location     Type
;;  f               1   11[BANK0 ] PTR const unsigned char 
;;		 -> STR_1(36), 
;;  _val            4   13[BANK0 ] struct .
;;  c               1   17[BANK0 ] char 
;;  prec            1   12[BANK0 ] char 
;;  flag            1   10[BANK0 ] unsigned char 
;;  ap              1    9[BANK0 ] PTR void [1]
;;		 -> ?_printf(2), 
;; Return value:  Size  Location     Type
;;                  2    0[BANK0 ] int 
;; Registers used:
;;		wreg, fsr0l, fsr0h, status,2, status,0, btemp+1, pclath, cstack
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         0       6       0       0       0
;;      Locals:         0       9       0       0       0
;;      Temps:          0       3       0       0       0
;;      Totals:         0      18       0       0       0
;;Total ram usage:       18 bytes
;; Hardware stack levels used:    1
;; Hardware stack levels required when called:    1
;; This function calls:
;;		_putch
;;		___lwdiv
;;		___lwmod
;; This function is called by:
;;		_IN1307_EEPROM_Test
;; This function uses a non-reentrant model
;;
psect	text236
	file	"C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\doprnt.c"
	line	461
	global	__size_of_printf
	__size_of_printf	equ	__end_of_printf-_printf
	
_printf:	
	opt	stack 5
; Regs used in _printf: [wreg-fsr0h+status,2+status,0+btemp+1+pclath+cstack]
;printf@f stored from wreg
	line	537
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(printf@f)
	
l3015:	
	movlw	(?_printf)&0ffh
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	movwf	(printf@ap)
	line	540
	goto	l3061
	
l778:	
	line	542
	
l3017:	
	movf	(printf@c),w
	xorlw	025h
	skipnz
	goto	u2691
	goto	u2690
u2691:
	goto	l779
u2690:
	line	545
	
l3019:	
	movf	(printf@c),w
	fcall	_putch
	line	546
	goto	l3061
	line	547
	
l779:	
	line	552
	clrf	(printf@flag)
	line	638
	goto	l3023
	line	640
	
l781:	
	line	641
	goto	l796
	line	700
	
l783:	
	goto	l3025
	line	701
	
l784:	
	line	702
	goto	l3025
	line	805
	
l786:	
	line	816
	goto	l3061
	line	825
	
l3021:	
	goto	l3025
	line	638
	
l780:	
	
l3023:	
	movlw	01h
	addwf	(printf@f),f
	movlw	-01h
	addwf	(printf@f),w
	movwf	fsr0
	fcall	stringdir
	movwf	(printf@c)
	; Switch size 1, requested type "space"
; Number of cases is 3, Range of values is 0 to 105
; switch strategies available:
; Name         Instructions Cycles
; simple_byte           10     6 (average)
; jumptable            260     6 (fixed)
; rangetable           110     6 (fixed)
; spacedrange          218     9 (fixed)
; locatedrange         106     3 (fixed)
;	Chosen strategy is simple_byte

	opt asmopt_off
	xorlw	0^0	; case 0
	skipnz
	goto	l796
	xorlw	100^0	; case 100
	skipnz
	goto	l3025
	xorlw	105^100	; case 105
	skipnz
	goto	l3025
	goto	l3061
	opt asmopt_on

	line	825
	
l785:	
	line	1254
	
l3025:	
	movf	(printf@ap),w
	movwf	fsr0
	bcf	status, 7	;select IRP bank0
	movf	indf,w
	movwf	(printf@_val)
	incf	fsr0,f
	movf	indf,w
	movwf	(printf@_val+1)
	
l3027:	
	movlw	(02h)
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	addwf	(printf@ap),f
	line	1256
	
l3029:	
	btfss	(printf@_val+1),7
	goto	u2701
	goto	u2700
u2701:
	goto	l3035
u2700:
	line	1257
	
l3031:	
	movlw	(03h)
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	iorwf	(printf@flag),f
	line	1258
	
l3033:	
	comf	(printf@_val),f
	comf	(printf@_val+1),f
	incf	(printf@_val),f
	skipnz
	incf	(printf@_val+1),f
	goto	l3035
	line	1259
	
l787:	
	line	1300
	
l3035:	
	clrf	(printf@c)
	bsf	status,0
	rlf	(printf@c),f
	
l3037:	
	movf	(printf@c),w
	xorlw	05h
	skipz
	goto	u2711
	goto	u2710
u2711:
	goto	l3041
u2710:
	goto	l3049
	
l3039:	
	goto	l3049
	line	1301
	
l788:	
	
l3041:	
	movf	(printf@c),w
	movwf	(??_printf+0)+0
	addwf	(??_printf+0)+0,w
	addlw	low((_dpowers-__stringbase))
	movwf	fsr0
	fcall	stringdir
	movwf	(??_printf+1)+0
	fcall	stringdir
	movwf	(??_printf+1)+0+1
	movf	1+(??_printf+1)+0,w
	subwf	(printf@_val+1),w
	skipz
	goto	u2725
	movf	0+(??_printf+1)+0,w
	subwf	(printf@_val),w
u2725:
	skipnc
	goto	u2721
	goto	u2720
u2721:
	goto	l3045
u2720:
	goto	l3049
	line	1302
	
l3043:	
	goto	l3049
	
l790:	
	line	1300
	
l3045:	
	movlw	(01h)
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	addwf	(printf@c),f
	
l3047:	
	movf	(printf@c),w
	xorlw	05h
	skipz
	goto	u2731
	goto	u2730
u2731:
	goto	l3041
u2730:
	goto	l3049
	
l789:	
	line	1433
	
l3049:	
	movf	(printf@flag),w
	andlw	03h
	btfsc	status,2
	goto	u2741
	goto	u2740
u2741:
	goto	l3053
u2740:
	line	1434
	
l3051:	
	movlw	(02Dh)
	fcall	_putch
	goto	l3053
	
l791:	
	line	1467
	
l3053:	
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movf	(printf@c),w
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	movwf	(printf@prec)
	line	1469
	goto	l3059
	
l793:	
	line	1484
	
l3055:	
	movlw	low(0Ah)
	movwf	(?___lwmod)
	movlw	high(0Ah)
	movwf	((?___lwmod))+1
	movf	(printf@prec),w
	movwf	(??_printf+0)+0
	addwf	(??_printf+0)+0,w
	addlw	low((_dpowers-__stringbase))
	movwf	fsr0
	fcall	stringdir
	movwf	(?___lwdiv)
	fcall	stringdir
	movwf	(?___lwdiv+1)
	movf	(printf@_val+1),w
	clrf	1+(?___lwdiv)+02h
	addwf	1+(?___lwdiv)+02h
	movf	(printf@_val),w
	clrf	0+(?___lwdiv)+02h
	addwf	0+(?___lwdiv)+02h

	fcall	___lwdiv
	movf	(1+(?___lwdiv)),w
	clrf	1+(?___lwmod)+02h
	addwf	1+(?___lwmod)+02h
	movf	(0+(?___lwdiv)),w
	clrf	0+(?___lwmod)+02h
	addwf	0+(?___lwmod)+02h

	fcall	___lwmod
	movf	(0+(?___lwmod)),w
	addlw	030h
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_printf+1)+0
	movf	(??_printf+1)+0,w
	movwf	(printf@c)
	line	1516
	
l3057:	
	movf	(printf@c),w
	fcall	_putch
	goto	l3059
	line	1517
	
l792:	
	line	1469
	
l3059:	
	movlw	(-1)
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	addwf	(printf@prec),f
	movf	((printf@prec)),w
	xorlw	-1
	skipz
	goto	u2751
	goto	u2750
u2751:
	goto	l3055
u2750:
	goto	l3061
	
l794:	
	goto	l3061
	line	1525
	
l777:	
	line	540
	
l3061:	
	movlw	01h
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	addwf	(printf@f),f
	movlw	-01h
	addwf	(printf@f),w
	movwf	fsr0
	fcall	stringdir
	movwf	(??_printf+0)+0
	movf	(??_printf+0)+0,w
	movwf	(printf@c)
	movf	((printf@c)),f
	skipz
	goto	u2761
	goto	u2760
u2761:
	goto	l3017
u2760:
	goto	l796
	
l795:	
	goto	l796
	line	1527
	
l782:	
	line	1533
;	Return value of _printf is never used
	
l796:	
	return
	opt stack 0
GLOBAL	__end_of_printf
	__end_of_printf:
;; =============== function _printf ends ============

	signat	_printf,602
	global	___lwmod
psect	text237,local,class=CODE,delta=2
global __ptext237
__ptext237:

;; *************** function ___lwmod *****************
;; Defined at:
;;		line 5 in file "C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\lwmod.c"
;; Parameters:    Size  Location     Type
;;  divisor         2    8[COMMON] unsigned int 
;;  dividend        2   10[COMMON] unsigned int 
;; Auto vars:     Size  Location     Type
;;  counter         1   13[COMMON] unsigned char 
;; Return value:  Size  Location     Type
;;                  2    8[COMMON] unsigned int 
;; Registers used:
;;		wreg, status,2, status,0
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         4       0       0       0       0
;;      Locals:         1       0       0       0       0
;;      Temps:          1       0       0       0       0
;;      Totals:         6       0       0       0       0
;;Total ram usage:        6 bytes
;; Hardware stack levels used:    1
;; This function calls:
;;		Nothing
;; This function is called by:
;;		_printf
;; This function uses a non-reentrant model
;;
psect	text237
	file	"C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\lwmod.c"
	line	5
	global	__size_of___lwmod
	__size_of___lwmod	equ	__end_of___lwmod-___lwmod
	
___lwmod:	
	opt	stack 5
; Regs used in ___lwmod: [wreg+status,2+status,0]
	line	8
	
l2993:	
	movf	(___lwmod@divisor+1),w
	iorwf	(___lwmod@divisor),w
	skipnz
	goto	u2631
	goto	u2630
u2631:
	goto	l3011
u2630:
	line	9
	
l2995:	
	clrf	(___lwmod@counter)
	bsf	status,0
	rlf	(___lwmod@counter),f
	line	10
	goto	l3001
	
l1497:	
	line	11
	
l2997:	
	movlw	01h
	
u2645:
	clrc
	rlf	(___lwmod@divisor),f
	rlf	(___lwmod@divisor+1),f
	addlw	-1
	skipz
	goto	u2645
	line	12
	
l2999:	
	movlw	(01h)
	movwf	(??___lwmod+0)+0
	movf	(??___lwmod+0)+0,w
	addwf	(___lwmod@counter),f
	goto	l3001
	line	13
	
l1496:	
	line	10
	
l3001:	
	btfss	(___lwmod@divisor+1),(15)&7
	goto	u2651
	goto	u2650
u2651:
	goto	l2997
u2650:
	goto	l3003
	
l1498:	
	goto	l3003
	line	14
	
l1499:	
	line	15
	
l3003:	
	movf	(___lwmod@divisor+1),w
	subwf	(___lwmod@dividend+1),w
	skipz
	goto	u2665
	movf	(___lwmod@divisor),w
	subwf	(___lwmod@dividend),w
u2665:
	skipc
	goto	u2661
	goto	u2660
u2661:
	goto	l3007
u2660:
	line	16
	
l3005:	
	movf	(___lwmod@divisor),w
	subwf	(___lwmod@dividend),f
	movf	(___lwmod@divisor+1),w
	skipc
	decf	(___lwmod@dividend+1),f
	subwf	(___lwmod@dividend+1),f
	goto	l3007
	
l1500:	
	line	17
	
l3007:	
	movlw	01h
	
u2675:
	clrc
	rrf	(___lwmod@divisor+1),f
	rrf	(___lwmod@divisor),f
	addlw	-1
	skipz
	goto	u2675
	line	18
	
l3009:	
	movlw	low(01h)
	subwf	(___lwmod@counter),f
	btfss	status,2
	goto	u2681
	goto	u2680
u2681:
	goto	l3003
u2680:
	goto	l3011
	
l1501:	
	goto	l3011
	line	19
	
l1495:	
	line	20
	
l3011:	
	movf	(___lwmod@dividend+1),w
	clrf	(?___lwmod+1)
	addwf	(?___lwmod+1)
	movf	(___lwmod@dividend),w
	clrf	(?___lwmod)
	addwf	(?___lwmod)

	goto	l1502
	
l3013:	
	line	21
	
l1502:	
	return
	opt stack 0
GLOBAL	__end_of___lwmod
	__end_of___lwmod:
;; =============== function ___lwmod ends ============

	signat	___lwmod,8314
	global	___lwdiv
psect	text238,local,class=CODE,delta=2
global __ptext238
__ptext238:

;; *************** function ___lwdiv *****************
;; Defined at:
;;		line 5 in file "C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\lwdiv.c"
;; Parameters:    Size  Location     Type
;;  divisor         2    0[COMMON] unsigned int 
;;  dividend        2    2[COMMON] unsigned int 
;; Auto vars:     Size  Location     Type
;;  quotient        2    5[COMMON] unsigned int 
;;  counter         1    7[COMMON] unsigned char 
;; Return value:  Size  Location     Type
;;                  2    0[COMMON] unsigned int 
;; Registers used:
;;		wreg, status,2, status,0
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         4       0       0       0       0
;;      Locals:         3       0       0       0       0
;;      Temps:          1       0       0       0       0
;;      Totals:         8       0       0       0       0
;;Total ram usage:        8 bytes
;; Hardware stack levels used:    1
;; This function calls:
;;		Nothing
;; This function is called by:
;;		_printf
;; This function uses a non-reentrant model
;;
psect	text238
	file	"C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\lwdiv.c"
	line	5
	global	__size_of___lwdiv
	__size_of___lwdiv	equ	__end_of___lwdiv-___lwdiv
	
___lwdiv:	
	opt	stack 5
; Regs used in ___lwdiv: [wreg+status,2+status,0]
	line	9
	
l2967:	
	clrf	(___lwdiv@quotient)
	clrf	(___lwdiv@quotient+1)
	line	10
	
l2969:	
	movf	(___lwdiv@divisor+1),w
	iorwf	(___lwdiv@divisor),w
	skipnz
	goto	u2561
	goto	u2560
u2561:
	goto	l2989
u2560:
	line	11
	
l2971:	
	clrf	(___lwdiv@counter)
	bsf	status,0
	rlf	(___lwdiv@counter),f
	line	12
	goto	l2977
	
l1487:	
	line	13
	
l2973:	
	movlw	01h
	
u2575:
	clrc
	rlf	(___lwdiv@divisor),f
	rlf	(___lwdiv@divisor+1),f
	addlw	-1
	skipz
	goto	u2575
	line	14
	
l2975:	
	movlw	(01h)
	movwf	(??___lwdiv+0)+0
	movf	(??___lwdiv+0)+0,w
	addwf	(___lwdiv@counter),f
	goto	l2977
	line	15
	
l1486:	
	line	12
	
l2977:	
	btfss	(___lwdiv@divisor+1),(15)&7
	goto	u2581
	goto	u2580
u2581:
	goto	l2973
u2580:
	goto	l2979
	
l1488:	
	goto	l2979
	line	16
	
l1489:	
	line	17
	
l2979:	
	movlw	01h
	
u2595:
	clrc
	rlf	(___lwdiv@quotient),f
	rlf	(___lwdiv@quotient+1),f
	addlw	-1
	skipz
	goto	u2595
	line	18
	movf	(___lwdiv@divisor+1),w
	subwf	(___lwdiv@dividend+1),w
	skipz
	goto	u2605
	movf	(___lwdiv@divisor),w
	subwf	(___lwdiv@dividend),w
u2605:
	skipc
	goto	u2601
	goto	u2600
u2601:
	goto	l2985
u2600:
	line	19
	
l2981:	
	movf	(___lwdiv@divisor),w
	subwf	(___lwdiv@dividend),f
	movf	(___lwdiv@divisor+1),w
	skipc
	decf	(___lwdiv@dividend+1),f
	subwf	(___lwdiv@dividend+1),f
	line	20
	
l2983:	
	bsf	(___lwdiv@quotient)+(0/8),(0)&7
	goto	l2985
	line	21
	
l1490:	
	line	22
	
l2985:	
	movlw	01h
	
u2615:
	clrc
	rrf	(___lwdiv@divisor+1),f
	rrf	(___lwdiv@divisor),f
	addlw	-1
	skipz
	goto	u2615
	line	23
	
l2987:	
	movlw	low(01h)
	subwf	(___lwdiv@counter),f
	btfss	status,2
	goto	u2621
	goto	u2620
u2621:
	goto	l2979
u2620:
	goto	l2989
	
l1491:	
	goto	l2989
	line	24
	
l1485:	
	line	25
	
l2989:	
	movf	(___lwdiv@quotient+1),w
	clrf	(?___lwdiv+1)
	addwf	(?___lwdiv+1)
	movf	(___lwdiv@quotient),w
	clrf	(?___lwdiv)
	addwf	(?___lwdiv)

	goto	l1492
	
l2991:	
	line	26
	
l1492:	
	return
	opt stack 0
GLOBAL	__end_of___lwdiv
	__end_of___lwdiv:
;; =============== function ___lwdiv ends ============

	signat	___lwdiv,8314
	global	___bmul
psect	text239,local,class=CODE,delta=2
global __ptext239
__ptext239:

;; *************** function ___bmul *****************
;; Defined at:
;;		line 3 in file "C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\bmul.c"
;; Parameters:    Size  Location     Type
;;  multiplier      1    wreg     unsigned char 
;;  multiplicand    1    0[COMMON] unsigned char 
;; Auto vars:     Size  Location     Type
;;  multiplier      1    3[COMMON] unsigned char 
;;  product         1    2[COMMON] unsigned char 
;; Return value:  Size  Location     Type
;;                  1    wreg      unsigned char 
;; Registers used:
;;		wreg, status,2, status,0
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         1       0       0       0       0
;;      Locals:         2       0       0       0       0
;;      Temps:          1       0       0       0       0
;;      Totals:         4       0       0       0       0
;;Total ram usage:        4 bytes
;; Hardware stack levels used:    1
;; This function calls:
;;		Nothing
;; This function is called by:
;;		_IN1307_EEPROM_Test
;; This function uses a non-reentrant model
;;
psect	text239
	file	"C:\Program Files (x86)\HI-TECH Software\PICC\9.83\sources\bmul.c"
	line	3
	global	__size_of___bmul
	__size_of___bmul	equ	__end_of___bmul-___bmul
	
___bmul:	
	opt	stack 6
; Regs used in ___bmul: [wreg+status,2+status,0]
;___bmul@multiplier stored from wreg
	movwf	(___bmul@multiplier)
	line	4
	
l2953:	
	clrf	(___bmul@product)
	line	6
	
l1473:	
	line	7
	btfss	(___bmul@multiplier),(0)&7
	goto	u2541
	goto	u2540
u2541:
	goto	l2957
u2540:
	line	8
	
l2955:	
	movf	(___bmul@multiplicand),w
	movwf	(??___bmul+0)+0
	movf	(??___bmul+0)+0,w
	addwf	(___bmul@product),f
	goto	l2957
	
l1474:	
	line	9
	
l2957:	
	clrc
	rlf	(___bmul@multiplicand),f

	line	10
	
l2959:	
	clrc
	rrf	(___bmul@multiplier),f

	line	11
	
l2961:	
	movf	(___bmul@multiplier),f
	skipz
	goto	u2551
	goto	u2550
u2551:
	goto	l1473
u2550:
	goto	l2963
	
l1475:	
	line	12
	
l2963:	
	movf	(___bmul@product),w
	goto	l1476
	
l2965:	
	line	13
	
l1476:	
	return
	opt stack 0
GLOBAL	__end_of___bmul
	__end_of___bmul:
;; =============== function ___bmul ends ============

	signat	___bmul,8313
	global	_putch
psect	text240,local,class=CODE,delta=2
global __ptext240
__ptext240:

;; *************** function _putch *****************
;; Defined at:
;;		line 95 in file "D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
;; Parameters:    Size  Location     Type
;;  byte            1    wreg     unsigned char 
;; Auto vars:     Size  Location     Type
;;  byte            1    0[COMMON] unsigned char 
;; Return value:  Size  Location     Type
;;		None               void
;; Registers used:
;;		wreg
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         0       0       0       0       0
;;      Locals:         1       0       0       0       0
;;      Temps:          0       0       0       0       0
;;      Totals:         1       0       0       0       0
;;Total ram usage:        1 bytes
;; Hardware stack levels used:    1
;; This function calls:
;;		Nothing
;; This function is called by:
;;		_printf
;; This function uses a non-reentrant model
;;
psect	text240
	file	"D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
	line	95
	global	__size_of_putch
	__size_of_putch	equ	__end_of_putch-_putch
	
_putch:	
	opt	stack 5
; Regs used in _putch: [wreg]
;putch@byte stored from wreg
	movwf	(putch@byte)
	line	97
	
l2949:	
;test.c: 97: while (!TRMT)
	goto	l737
	
l738:	
	line	98
;test.c: 98: continue;
	
l737:	
	line	97
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfss	(1217/8)^080h,(1217)&7
	goto	u2531
	goto	u2530
u2531:
	goto	l737
u2530:
	goto	l2951
	
l739:	
	line	99
	
l2951:	
;test.c: 99: TXREG = byte;
	movf	(putch@byte),w
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(25)	;volatile
	line	100
	
l740:	
	return
	opt stack 0
GLOBAL	__end_of_putch
	__end_of_putch:
;; =============== function _putch ends ============

	signat	_putch,4216
	global	_Write_I2C
psect	text241,local,class=CODE,delta=2
global __ptext241
__ptext241:

;; *************** function _Write_I2C *****************
;; Defined at:
;;		line 60 in file "D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
;; Parameters:    Size  Location     Type
;;  ID              1    wreg     unsigned char 
;;  addr            1    0[COMMON] unsigned char 
;;  data            1    1[COMMON] unsigned char 
;; Auto vars:     Size  Location     Type
;;  ID              1    2[COMMON] unsigned char 
;; Return value:  Size  Location     Type
;;		None               void
;; Registers used:
;;		wreg
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         2       0       0       0       0
;;      Locals:         1       0       0       0       0
;;      Temps:          0       0       0       0       0
;;      Totals:         3       0       0       0       0
;;Total ram usage:        3 bytes
;; Hardware stack levels used:    1
;; This function calls:
;;		Nothing
;; This function is called by:
;;		_SysInit
;; This function uses a non-reentrant model
;;
psect	text241
	file	"D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
	line	60
	global	__size_of_Write_I2C
	__size_of_Write_I2C	equ	__end_of_Write_I2C-_Write_I2C
	
_Write_I2C:	
	opt	stack 6
; Regs used in _Write_I2C: [wreg]
;Write_I2C@ID stored from wreg
	line	62
	movwf	(Write_I2C@ID)
	
l1929:	
;test.c: 62: SEN = 1;
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	bsf	(1160/8)^080h,(1160)&7
	line	63
;test.c: 63: while (SEN);
	goto	l713
	
l714:	
	
l713:	
	btfsc	(1160/8)^080h,(1160)&7
	goto	u81
	goto	u80
u81:
	goto	l713
u80:
	goto	l1931
	
l715:	
	line	66
	
l1931:	
;test.c: 66: SSPBUF = ID;
	movf	(Write_I2C@ID),w
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(19)	;volatile
	line	68
;test.c: 68: while (SSPSTAT & 0x04);
	goto	l716
	
l717:	
	
l716:	
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfsc	(148)^080h,(2)&7
	goto	u91
	goto	u90
u91:
	goto	l716
u90:
	goto	l1933
	
l718:	
	line	72
	
l1933:	
;test.c: 72: SSPBUF = addr;
	movf	(Write_I2C@addr),w
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(19)	;volatile
	line	74
;test.c: 74: while (SSPSTAT & 0x04);
	goto	l719
	
l720:	
	
l719:	
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfsc	(148)^080h,(2)&7
	goto	u101
	goto	u100
u101:
	goto	l719
u100:
	goto	l1935
	
l721:	
	line	78
	
l1935:	
;test.c: 78: SSPBUF = data;
	movf	(Write_I2C@data),w
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(19)	;volatile
	line	80
;test.c: 80: while (SSPSTAT & 0x04);
	goto	l722
	
l723:	
	
l722:	
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfsc	(148)^080h,(2)&7
	goto	u111
	goto	u110
u111:
	goto	l722
u110:
	
l724:	
	line	84
;test.c: 84: PEN = 1;
	bsf	(1162/8)^080h,(1162)&7
	line	85
;test.c: 85: while (PEN);
	goto	l725
	
l726:	
	
l725:	
	btfsc	(1162/8)^080h,(1162)&7
	goto	u121
	goto	u120
u121:
	goto	l725
u120:
	goto	l728
	
l727:	
	line	86
	
l728:	
	return
	opt stack 0
GLOBAL	__end_of_Write_I2C
	__end_of_Write_I2C:
;; =============== function _Write_I2C ends ============

	signat	_Write_I2C,12408
	global	_Read_I2C
psect	text242,local,class=CODE,delta=2
global __ptext242
__ptext242:

;; *************** function _Read_I2C *****************
;; Defined at:
;;		line 18 in file "D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
;; Parameters:    Size  Location     Type
;;  ID              1    wreg     unsigned char 
;;  addr            1    0[COMMON] unsigned char 
;; Auto vars:     Size  Location     Type
;;  ID              1    3[COMMON] unsigned char 
;;  Read_Data       1    2[COMMON] unsigned char 
;; Return value:  Size  Location     Type
;;                  1    wreg      unsigned char 
;; Registers used:
;;		wreg, status,2
;; Tracked objects:
;;		On entry : 0/0
;;		On exit  : 0/0
;;		Unchanged: 0/0
;; Data sizes:     COMMON   BANK0   BANK1   BANK3   BANK2
;;      Params:         1       0       0       0       0
;;      Locals:         2       0       0       0       0
;;      Temps:          1       0       0       0       0
;;      Totals:         4       0       0       0       0
;;Total ram usage:        4 bytes
;; Hardware stack levels used:    1
;; This function calls:
;;		Nothing
;; This function is called by:
;;		_IN1307_EEPROM_Test
;; This function uses a non-reentrant model
;;
psect	text242
	file	"D:\Product\PIC\LK-PIC-TB16F18F\Firmware\RTC_I2C_TEST\test.c"
	line	18
	global	__size_of_Read_I2C
	__size_of_Read_I2C	equ	__end_of_Read_I2C-_Read_I2C
	
_Read_I2C:	
	opt	stack 6
; Regs used in _Read_I2C: [wreg+status,2]
;Read_I2C@ID stored from wreg
	movwf	(Read_I2C@ID)
	line	19
	
l2933:	
;test.c: 19: unsigned char Read_Data = 0;
	clrf	(Read_I2C@Read_Data)
	line	21
;test.c: 21: SEN = 1;
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	bsf	(1160/8)^080h,(1160)&7
	line	22
;test.c: 22: while (SEN);
	goto	l689
	
l690:	
	
l689:	
	btfsc	(1160/8)^080h,(1160)&7
	goto	u2461
	goto	u2460
u2461:
	goto	l689
u2460:
	goto	l2935
	
l691:	
	line	25
	
l2935:	
;test.c: 25: SSPBUF = ID;
	movf	(Read_I2C@ID),w
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(19)	;volatile
	line	27
;test.c: 27: while (SSPSTAT & 0x04);
	goto	l692
	
l693:	
	
l692:	
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfsc	(148)^080h,(2)&7
	goto	u2471
	goto	u2470
u2471:
	goto	l692
u2470:
	goto	l2937
	
l694:	
	line	31
	
l2937:	
;test.c: 31: SSPBUF = addr;
	movf	(Read_I2C@addr),w
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(19)	;volatile
	line	33
;test.c: 33: while (SSPSTAT & 0x04);
	goto	l695
	
l696:	
	
l695:	
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfsc	(148)^080h,(2)&7
	goto	u2481
	goto	u2480
u2481:
	goto	l695
u2480:
	
l697:	
	line	37
;test.c: 37: RSEN = 1;
	bsf	(1161/8)^080h,(1161)&7
	line	38
;test.c: 38: while (RSEN);
	goto	l698
	
l699:	
	
l698:	
	btfsc	(1161/8)^080h,(1161)&7
	goto	u2491
	goto	u2490
u2491:
	goto	l698
u2490:
	goto	l2939
	
l700:	
	line	41
	
l2939:	
;test.c: 41: SSPBUF = ID | 1;
	movf	(Read_I2C@ID),w
	iorlw	01h
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movwf	(19)	;volatile
	line	43
;test.c: 43: while (SSPSTAT & 0x04);
	goto	l701
	
l702:	
	
l701:	
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	btfsc	(148)^080h,(2)&7
	goto	u2501
	goto	u2500
u2501:
	goto	l701
u2500:
	
l703:	
	line	47
;test.c: 47: RCEN = 1;
	bsf	(1163/8)^080h,(1163)&7
	line	48
;test.c: 48: while (RCEN);
	goto	l704
	
l705:	
	
l704:	
	btfsc	(1163/8)^080h,(1163)&7
	goto	u2511
	goto	u2510
u2511:
	goto	l704
u2510:
	goto	l2941
	
l706:	
	line	50
	
l2941:	
;test.c: 50: Read_Data = SSPBUF;
	bcf	status, 5	;RP0=0, select bank0
	bcf	status, 6	;RP1=0, select bank0
	movf	(19),w	;volatile
	movwf	(??_Read_I2C+0)+0
	movf	(??_Read_I2C+0)+0,w
	movwf	(Read_I2C@Read_Data)
	line	53
	
l2943:	
;test.c: 53: PEN = 1;
	bsf	status, 5	;RP0=1, select bank1
	bcf	status, 6	;RP1=0, select bank1
	bsf	(1162/8)^080h,(1162)&7
	line	54
;test.c: 54: while (PEN);
	goto	l707
	
l708:	
	
l707:	
	btfsc	(1162/8)^080h,(1162)&7
	goto	u2521
	goto	u2520
u2521:
	goto	l707
u2520:
	goto	l2945
	
l709:	
	line	56
	
l2945:	
;test.c: 56: return (Read_Data);
	movf	(Read_I2C@Read_Data),w
	goto	l710
	
l2947:	
	line	57
	
l710:	
	return
	opt stack 0
GLOBAL	__end_of_Read_I2C
	__end_of_Read_I2C:
;; =============== function _Read_I2C ends ============

	signat	_Read_I2C,8313
psect	text243,local,class=CODE,delta=2
global __ptext243
__ptext243:
	global	btemp
	btemp set 07Eh

	DABS	1,126,2	;btemp
	global	wtemp0
	wtemp0 set btemp
	end
