; Generated by holtek-gcc v3.19, Thu Dec 24 17:22:05 2020
; 
; Configuration:
;       without long instruction
;       Single ROM, Multi-RAM
;       bits_per_rom_unit:16
;       with mp1
;       with tbhp, address(0x9)
;          Use tabrd-const
;       
;       
;       
; use 'tabrdc' instead of 'tabrd'
;       

#pragma translator "holtek-gcc 4.6.4" "3.19" "build 20130711"
; Rebuild 718

ir equ [2]
mp equ [3]
sbp equ [1]
acc equ [5]
bp equ [4]
tblp equ [7]
tbhp equ [9]
status equ [10]
c equ [10].0
ac equ [10].1
z equ [10].2
ov equ [10].3
intc equ [11]

extern ra:byte
extern rb:byte
extern rc:byte
extern rd:byte
extern re:byte
extern rf:byte
extern rg:byte
extern rh:byte
extern _Crom2Prom:near
extern _Crom2PromNext:near

RAMBANK 0 @HCCINIT, @HCCINIT0

RAMBANK 0 @BITDATASEC, @BITDATASEC1
@HCCINIT	.section 'data'
@HCCINIT0	.section 'data'
@BITDATASEC	 .section 'data'
@BITDATASEC1	 .section 'data'

#pragma debug scope 1 1
	extern __DELAY3:near
	extern __DELAYX3:near
	extern __DELAYX6:near
	extern __DELAYY5:near
	extern __DELAYY3:near
	extern _builtin_holtek_delay_2:byte
public _fun_Vsen_Calculate
#pragma debug scope 2 1
#line 20 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
_fun_Vsen_Calculate .section 'code'
_fun_Vsen_Calculate proc
    local _fun_Vsen_Calculate_2 db 4 dup(?)	; 0,4
	mov a,32
	mov rh,a
#line 23 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	clr ra
_L6:
#line 26 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	mov a,124
	sub a,_gu16v_Rntc[0]
	mov a,24
	sbc a,_gu16v_Rntc[1]
	sz c
	jmp _L2
#line 28 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	mov a,-49
	mov _gu16v_Temp[0],a
	mov a,7
	mov _gu16v_Temp[1],a
#line 29 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	jmp _L1
_L2:
#line 31 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	mov a,1
	sub a,_gu16v_Rntc[0]
	mov a,7
	sbc a,_gu16v_Rntc[1]
	snz c
	jmp _L4
#line 33 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	mov a,-119
	mov _gu16v_Temp[0],a
	mov a,19
	mov _gu16v_Temp[1],a
#line 34 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	jmp _L1
_L4:
#line 38 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
;# 38 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C" 1
	clr wdt
#line 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	mov a,ra
	mov rf,a
	clr rg
	clr c
	rlca rf
	mov rb,a
	rlca rg
	mov rc,a
	mov a,low offset _gu16c_NTC_Table
	add a,rb
	mov mp,a
	mov a,high offset _gu16c_NTC_Table
	adc a,rc
	mov sbp,a
	call _Crom2Prom
	mov rb,a
	call _Crom2PromNext
	mov rc,a
	mov a,rb
	sub a,_gu16v_Rntc[0]
	mov a,rc
	sbc a,_gu16v_Rntc[1]
	snz c
	jmp _L5
	clr c
	rlca rf
	mov rd,a
	rlca rg
	mov re,a
	mov a,low (offset _gu16c_NTC_Table+2)
	add a,rd
	mov mp,a
	mov a,high (offset _gu16c_NTC_Table+2)
	adc a,re
	mov sbp,a
	call _Crom2Prom
	mov rd,a
	call _Crom2PromNext
	mov re,a
	mov a,rd
	sub a,_gu16v_Rntc[0]
	mov a,re
	sbc a,_gu16v_Rntc[1]
	sz c
	jmp _L5
#line 41 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	mov a,rf  
	mov _builtin_holtek_mulhi3_2[0],a  
	mov a,rg  
	mov _builtin_holtek_mulhi3_2[1],a
	mov a,100  
	mov _builtin_holtek_mulhi3_2[2],a  
	clr _builtin_holtek_mulhi3_2[3]
	call _builtin_holtek_mulhi3
	mov a,_builtin_holtek_mulhi3_2[4]  
	mov rf,a  
	mov a,_builtin_holtek_mulhi3_2[5]  
	mov rg,a
	mov a,208
	add a,rf
	mov _fun_Vsen_Calculate_2[0],a
	mov a,7
	adc a,rg
	mov _fun_Vsen_Calculate_2[1],a
	mov a,rb
	sub a,_gu16v_Rntc[0]
	mov rf,a
	mov a,rc
	sbc a,_gu16v_Rntc[1]
	mov rg,a
	mov a,rf
	mov _fun_Vsen_Calculate_2[2],a
	mov a,rg
	mov _fun_Vsen_Calculate_2[3],a
	mov a,rf  
	mov _builtin_holtek_mulhi3_2[0],a  
	mov a,rg  
	mov _builtin_holtek_mulhi3_2[1],a
	mov a,100  
	mov _builtin_holtek_mulhi3_2[2],a  
	clr _builtin_holtek_mulhi3_2[3]
	call _builtin_holtek_mulhi3
	mov a,_builtin_holtek_mulhi3_2[4]  
	mov rf,a  
	mov a,_builtin_holtek_mulhi3_2[5]  
	mov rg,a
	mov a,rb
	sub a,rd
	mov rb,a
	mov a,rc
	sbc a,re
	mov rc,a
	clr _builtin_holtek_udivmodhi4_2[6]
	mov a,rf  
	mov _builtin_holtek_udivmodhi4_2[0],a  
	mov a,rg  
	mov _builtin_holtek_udivmodhi4_2[1],a
	mov a,rb  
	mov _builtin_holtek_udivmodhi4_2[2],a  
	mov a,rc  
	mov _builtin_holtek_udivmodhi4_2[3],a
	call _builtin_holtek_udivmodhi4
	mov a,_builtin_holtek_udivmodhi4_2[0]  
	mov rf,a  
	mov a,_builtin_holtek_udivmodhi4_2[1]  
	mov rg,a
	mov a,rf
	add a,_fun_Vsen_Calculate_2[0]
	mov _gu16v_Temp[0],a
	mov a,rg
	adc a,_fun_Vsen_Calculate_2[1]
	mov _gu16v_Temp[1],a
#line 42 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
;# 42 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C" 1
	nop
#line 43 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	jmp _L1
_L5:
#line 45 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
	inc ra
	sdz rh
	jmp _L6
_L1:
	ret
_fun_Vsen_Calculate endp
#line 45 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
#pragma debug scope 1 1
public _gu16c_NTC_Table
@crom	.section 'crom'
#line 5 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
@crom	.section	'crom'
_gu16c_NTC_Table:
#pragma debug array 42 12 31 1
#pragma debug variable 42 1 _gu16c_NTC_Table "gu16c_NTC_Table"
	dc 6268
	dc 5987
	dc 5721
	dc 5468
	dc 5228
	dc 5000
	dc 4783
	dc 4578
	dc 4382
	dc 4196
	dc 4019
	dc 3850
	dc 3690
	dc 3537
	dc 3391
	dc 3253
	dc 3121
	dc 2995
	dc 2875
	dc 2760
	dc 2651
	dc 2546
	dc 2447
	dc 2352
	dc 2261
	dc 2174
	dc 2091
	dc 2012
	dc 1936
	dc 1863
	dc 1794
#line 3 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\NTC.C"
public _gu16v_Temp
@HCCINIT0 .section 'data'
_gu16v_Temp	db 2 dup(0)
#pragma debug variable 12 1 _gu16v_Temp "gu16v_Temp"

@HCCINIT .section 'data'

; output external variables
extern _gu16v_Rntc:byte
extern _builtin_holtek_mulhi3_2:byte
extern _builtin_holtek_mulhi3:near
extern _builtin_holtek_udivmodhi4_2:byte
extern _builtin_holtek_udivmodhi4:near

; 
; Generated by holtek-gcc v3.19, Thu Dec 24 17:22:05 2020
; Rebuild 718
; end of file
