; Generated by holtek-gcc v3.19, Mon Jul 14 16:56:28 2025
; 
; Configuration:
;       with long instruction
;       Single ROM, Multi-RAM
;       bits_per_rom_unit:16
;       with mp1
;       with tbhp, address(0x9)
;          Use tabrd-const
;       
; SFR address of long-instruction arch:
;    mp0 = -1,1,0
;    mp1 = 4,3,2
;    mp2 = 14,13,12
;    tbp = 9,7,8
;    acc = 5
;    pcl = 6
;    status = 10
;    bp = 11
;    intc = 32
;       
;       
; 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 [4]
acc equ [5]
bp equ [11]
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
cz equ [10].6
sc equ [10].7
intc equ [32]

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 @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
___adcs equ [93]
___sinc3 equ [95]
___adcr0 equ [89]
___adcr1 equ [90]
___pgac equ [83]
___modc equ [85]
___pgacs equ [84]
___pas0 equ [123]
___pwrc equ [68]
___ctrl equ [100]
___adacctrl equ [96]
___autoadcc equ [101]
___errchkc equ [102]
_adcAutoModeBuf equ [768]
public _Adc24_Cfg
#pragma debug scope 2 1
#line 125 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
_Adc24_Cfg .section 'code'
_Adc24_Cfg proc
public _Adc24_Cfg_2
    local _Adc24_Cfg_2 db 7 dup(?)	; 7,0
#pragma debug struct_begin 42 ""
#pragma debug field 0 8 "sampleRate"
#pragma debug field 0 8 "gain"
#pragma debug field 0 8 "channel"
#pragma debug field 0 8 "dataSkip"
#pragma debug field 0 8 "dataAvgCnt"
#pragma debug field 0 8 "autoWriteNum"
#pragma debug field 0 8 "errCheck"
#pragma debug struct_end
#pragma debug variable 42 2 _Adc24_Cfg_2+0 "cfg"
	mov a,_Adc24_Cfg_2[1]
	mov rc,a
	mov a,_Adc24_Cfg_2[2]
	mov ra,a
	mov a,_Adc24_Cfg_2[5]
	mov rb,a
#line 127 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_Adc24_Cfg_2[0]
	sub a,0
	sz z
	jmp _L3
	sub a,(1)-(0)
	sz z
	jmp _L4
#line 127 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_Adc24_Cfg_2[0]
	sub a,2
	sz z
	jmp _L5
	sub a,(3)-(2)
	sz z
	jmp _L6
	mov a,_Adc24_Cfg_2[0]
	sub a,4
	sz z
	jmp _L7
	sub a,(5)-(4)
	sz z
	jmp _L8
	mov a,_Adc24_Cfg_2[0]
	sub a,6
	sz z
	jmp _L9
	sub a,(7)-(6)
	sz z
	jmp _L10
	mov a,_Adc24_Cfg_2[0]
	sub a,8
	sz z
	jmp _L11
	sub a,(9)-(8)
	sz z
	jmp _L12
	mov a,_Adc24_Cfg_2[0]
	sub a,10
	sz z
	jmp _L13
	sub a,(11)-(10)
	sz z
	jmp _L14
	mov a,_Adc24_Cfg_2[0]
	sub a,12
	sz z
	jmp _L15
	sub a,(13)-(12)
	sz z
	jmp _L16
	mov a,_Adc24_Cfg_2[0]
	sub a,14
	sz z
	jmp _L17
	sub a,(15)-(14)
	sz z
	jmp _L18
	mov a,_Adc24_Cfg_2[0]
	sub a,17
	sz z
	jmp _L19
	sub a,(18)-(17)
	sz z
	jmp _L20
	mov a,_Adc24_Cfg_2[0]
	sub a,19
	sz z
	jmp _L21
	sub a,(20)-(19)
	sz z
	jmp _L22
	mov a,_Adc24_Cfg_2[0]
	sub a,21
	sz z
	jmp _L23
	sub a,(22)-(21)
	sz z
	jmp _L24
	mov a,_Adc24_Cfg_2[0]
	sub a,23
	sz z
	jmp _L25
	sub a,(24)-(23)
	sz z
	jmp _L26
	mov a,_Adc24_Cfg_2[0]
	sub a,25
	sz z
	jmp _L27
	mov a,_Adc24_Cfg_2[0]
	sub a,26
	snz z
	jmp _L2
#line 192 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,144
	mov [95],a
	jmp _L41
_L19:
#line 131 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	clr [89]
	jmp _L38
_L20:
#line 132 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,2
	mov [89],a
	jmp _L38
_L21:
#line 133 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,4
	mov [89],a
	jmp _L38
_L22:
#line 134 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,6
	mov [89],a
	jmp _L38
_L23:
#line 135 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,8
	mov [89],a
	jmp _L38
_L24:
#line 136 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,10
	mov [89],a
	jmp _L38
_L25:
#line 137 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	jmp _L41
_L26:
#line 138 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,14
	mov [89],a
	jmp _L38
_L27:
#line 139 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,16
	mov [89],a
	jmp _L38
_L3:
#line 141 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	clr [89]
	jmp _L40
_L4:
#line 142 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,2
	mov [89],a
	jmp _L40
_L5:
#line 143 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	clr [89]
	jmp _L39
_L6:
#line 144 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,4
	mov [89],a
	jmp _L40
_L7:
#line 145 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,2
	mov [89],a
	jmp _L39
_L8:
#line 146 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,6
	mov [89],a
	jmp _L40
_L9:
#line 147 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,4
	mov [89],a
	jmp _L39
_L10:
#line 148 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,8
	mov [89],a
	jmp _L40
_L11:
#line 149 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,6
	mov [89],a
	jmp _L39
_L12:
#line 150 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,10
	mov [89],a
	jmp _L40
_L13:
#line 151 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,8
	mov [89],a
	jmp _L39
_L14:
#line 152 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,12
	mov [89],a
	jmp _L40
_L15:
#line 153 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,10
	mov [89],a
	jmp _L39
_L16:
#line 154 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,14
	mov [89],a
_L40:
	clr [90]
	jmp _L2
_L17:
#line 155 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,12
	mov [89],a
	jmp _L39
_L18:
#line 156 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,31
	mov [93],a
	mov a,147
	mov [95],a
	mov a,14
	mov [89],a
_L39:
	mov a,64
	mov [90],a
	jmp _L2
_L41:
#line 192 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,12
	mov [89],a
_L38:
	mov a,16
	mov [90],a
_L2:
#line 198 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,rc
	mov [83],a
#line 199 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,rc
	sub a,128
	snz z
	jmp _L29
#line 201 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [85].1
#line 202 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [85].0
	jmp _L30
_L29:
#line 206 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [85].1
#line 207 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [85].0
_L30:
#line 211 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,ra
	mov [84],a
#line 212 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,ra
	and a,240
	mov rc,a
	mov a,rc
	sub a,208
	snz z
	jmp _L31
#line 214 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [123].3
	set [123].2
_L31:
#line 216 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,15
	andm a,ra
	mov a,ra
	sub a,13
	snz z
	jmp _L32
#line 218 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [123].7
	set [123].6
_L32:
#line 221 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [68].3
#line 222 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[84]
	sub a,188
	snz z
	jmp _L33
#line 224 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [68].3
_L33:
#line 228 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_Adc24_Cfg_2[3]
	mov [100],a
#line 231 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_Adc24_Cfg_2[4]
	mov [96],a
#line 234 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	snz rb
	jmp _L34
#line 236 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	deca rb
	mov ra,a
	mov a,ra
	add a,ra
	mov [101],a
_L34:
#line 240 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_Adc24_Cfg_2[6]
	mov [102],a
#line 242 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,low offset _adcAutoModeBuf
	mov _adcAutoModeBufP[0],a
	mov a,high offset _adcAutoModeBuf
	mov _adcAutoModeBufP[1],a
	ret
_Adc24_Cfg endp
#line 242 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
___intc1 equ [33]
public _Adc24_Enable
#pragma debug scope 3 1
#line 249 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
_Adc24_Enable .section 'code'
_Adc24_Enable proc
public _Adc24_Enable_2
    local _Adc24_Enable_2 db 7 dup(?)	; 7,0
#pragma debug struct_begin 43 ""
#pragma debug field 0 8 "sampleRate"
#pragma debug field 0 8 "gain"
#pragma debug field 0 8 "channel"
#pragma debug field 0 8 "dataSkip"
#pragma debug field 0 8 "dataAvgCnt"
#pragma debug field 0 8 "autoWriteNum"
#pragma debug field 0 8 "errCheck"
#pragma debug struct_end
#pragma debug variable 43 3 _Adc24_Enable_2+0 "cfg"
#line 267 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [33].4
	set [101].0
	clr [85].0
	clr [85].3
	clr [90].2
	set [101].7
	clr [96].6
	ret
_Adc24_Enable endp
#line 267 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
public _Adc24_Disable
#pragma debug scope 4 1
#line 274 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
_Adc24_Disable .section 'code'
_Adc24_Disable proc
#line 275 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr _adc24SourceData[6].0
#line 276 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr _adc24SourceData[4]
	clr _adc24SourceData[5]
#line 277 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [85].0
	clr [85].3
	ret
_Adc24_Disable endp
#line 277 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
___adrl equ [86]
___adrm equ [87]
___adrh equ [88]
public _Adc24_Poling
#pragma debug scope 5 1
#line 281 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
_Adc24_Poling .section 'code'
_Adc24_Poling proc
#line 300 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	snz [90].1
	jmp _L45
#line 303 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	inc _adc24SourceData[4]
	sz z
	inc _adc24SourceData[5]
#line 305 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,4
	sub a,_adc24SourceData[4]
	mov a,0
	sbc a,_adc24SourceData[5]
	sz c
	jmp _L47
#line 308 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [90].2
#line 309 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr _adc24SourceData[0]
#line 310 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[86]
	mov _adc24SourceData[1],a
#line 311 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[87]
	mov _adc24SourceData[2],a
#line 312 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[88]
	mov _adc24SourceData[3],a
#line 313 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [90].2
#line 314 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_adc24SourceData[1]
	mov _adc24SourceData[0],a
	mov a,_adc24SourceData[2]
	mov _adc24SourceData[1],a
	mov a,_adc24SourceData[3]
	mov _adc24SourceData[2],a
	clr _adc24SourceData[3]
	sz _adc24SourceData[2].7
	set _adc24SourceData[3]
#line 315 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set _adc24SourceData[6].0
_L47:
#line 317 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [90].1
_L45:
	ret
_Adc24_Poling endp
#line 317 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
public _ADC_Auto_Mode_ISR
#pragma debug scope 6 1
#line 327 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
@ADC_Auto_Mode_ISR_code .section at 12 'code'
ifdef INTERRUPT_DELAY
	nop
endif
	mov r1,a
	mov a,status
ifndef INTERRUPT_DELAY
	mov r2,a
endif
	jmp _ADC_Auto_Mode_ISR
#pragma debug scope 1 1
@dummy12 proc
	call _ADC_Auto_Mode_ISR
@dummy12 endp
#pragma debug scope 7 1
_ADC_Auto_Mode_ISR .section 'code'
_ADC_Auto_Mode_ISR proc
ifdef INTERRUPT_DELAY
	mov r2,a
endif
#line 328 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set _adc24SourceData[6].1
	mov a,r2
	mov status,a
	mov a,r1
	reti
_ADC_Auto_Mode_ISR endp

#line 328 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
___pa equ [20]
___adrl_avg equ [97]
___adrm_avg equ [98]
___adrh_avg equ [99]
public _ADC_Average_ISR
#pragma debug scope 8 1
#line 337 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
@ADC_Average_ISR_code .section at 52 'code'
ifdef INTERRUPT_DELAY
	nop
endif
	mov r1,a
	mov a,status
ifndef INTERRUPT_DELAY
	mov r2,a
endif
	jmp _ADC_Average_ISR
#pragma debug scope 1 1
@dummy52 proc
	call _ADC_Average_ISR
@dummy52 endp
#pragma debug scope 9 1
_ADC_Average_ISR .section 'code'
_ADC_Average_ISR proc
ifdef INTERRUPT_DELAY
	mov r2,a
endif
#line 338 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	snz [96].6
	jmp _L52
#line 340 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [20].4
#line 341 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [20].4
#line 342 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	inc _adc24SourceData[4]
	sz z
	inc _adc24SourceData[5]
#line 344 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,3
	sub a,_adc24SourceData[4]
	mov a,0
	sbc a,_adc24SourceData[5]
	sz c
	jmp _L54
#line 347 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [90].2
#line 348 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr _adc24SourceData[0]
#line 349 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[97]
	mov _adc24SourceData[1],a
#line 350 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[98]
	mov _adc24SourceData[2],a
#line 351 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[99]
	mov _adc24SourceData[3],a
#line 352 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [90].2
#line 353 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_adc24SourceData[1]
	mov _adc24SourceData[0],a
	mov a,_adc24SourceData[2]
	mov _adc24SourceData[1],a
	mov a,_adc24SourceData[3]
	mov _adc24SourceData[2],a
	clr _adc24SourceData[3]
	sz _adc24SourceData[2].7
	set _adc24SourceData[3]
#line 354 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set _adc24SourceData[6].0
_L54:
#line 356 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [96].6
_L52:
	mov a,r2
	mov status,a
	mov a,r1
	reti
_ADC_Average_ISR endp

#line 356 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
public _ADC_ISR
#pragma debug scope 10 1
#line 366 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
@ADC_ISR_code .section at 16 'code'
ifdef INTERRUPT_DELAY
	nop
endif
	mov r1,a
	mov a,status
ifndef INTERRUPT_DELAY
	mov r2,a
endif
	jmp _ADC_ISR
#pragma debug scope 1 1
@dummy16 proc
	call _ADC_ISR
@dummy16 endp
#pragma debug scope 11 1
_ADC_ISR .section 'code'
_ADC_ISR proc
ifdef INTERRUPT_DELAY
	mov r2,a
endif
#line 367 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	snz [90].1
	jmp _L58
#line 370 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	inc _adc24SourceData[4]
	sz z
	inc _adc24SourceData[5]
#line 372 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,3
	sub a,_adc24SourceData[4]
	mov a,0
	sbc a,_adc24SourceData[5]
	sz c
	jmp _L60
#line 375 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set [90].2
#line 376 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr _adc24SourceData[0]
#line 377 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[86]
	mov _adc24SourceData[1],a
#line 378 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[87]
	mov _adc24SourceData[2],a
#line 379 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,[88]
	mov _adc24SourceData[3],a
#line 380 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [90].2
#line 381 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	mov a,_adc24SourceData[1]
	mov _adc24SourceData[0],a
	mov a,_adc24SourceData[2]
	mov _adc24SourceData[1],a
	mov a,_adc24SourceData[3]
	mov _adc24SourceData[2],a
	clr _adc24SourceData[3]
	sz _adc24SourceData[2].7
	set _adc24SourceData[3]
#line 382 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	set _adc24SourceData[6].0
_L60:
#line 384 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
	clr [90].1
_L58:
	mov a,r2
	mov status,a
	mov a,r1
	reti
_ADC_ISR endp

#line 384 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
#pragma debug scope 1 1
#line 117 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
public _adc24SourceData
@HCCINIT0_adc24SourceData .section 'data'
_adc24SourceData	db 7 dup(0)
#pragma debug struct_begin 44 ""
#pragma debug field 0 8 "byteLow"
#pragma debug field 0 8 "byteMid"
#pragma debug field 0 8 "byteHigh"
#pragma debug field 0 8 "byteRes"
#pragma debug struct_end
#pragma debug union_begin 45 ""
#pragma debug field 2 44 "byte"
#pragma debug field 0 13 "adcData"
#pragma debug union_end
#pragma debug struct_begin 46 ""
#pragma debug field 21 8 0 1 "isReady" ;0,1
#pragma debug field 21 8 0 1 "isAutoModeReady" ;1,1
#pragma debug struct_end
#pragma debug union_begin 47 ""
#pragma debug field 2 46 "b"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug struct_begin 48 ""
#pragma debug field 3 45 "data"
#pragma debug field 0 12 "samplingCnt"
#pragma debug field 3 47 "flag"
#pragma debug struct_end
#pragma debug variable 48 1 _adc24SourceData "adc24SourceData"

@HCCINIT .section 'data'
#line 39 "d:\d200\product\git\bh66f2455_evm_cgm\2.code\bh66f2455_driver\driver\Adc24.c"
public _adcAutoModeBufP
@HCCINIT0_adcAutoModeBufP .section 'data'
_adcAutoModeBufP	db 2 dup(0)
#pragma debug pointer 49 7 1
#pragma debug variable 49 1 _adcAutoModeBufP "adcAutoModeBufP"

@HCCINIT .section 'data'
#pragma debug struct_begin 50 "__pa_bits"
#pragma debug field 21 8 0 1 "__pa0" ;0,1
#pragma debug field 21 8 0 1 "__pa1" ;1,1
#pragma debug field 21 8 0 1 "__pa2" ;2,1
#pragma debug field 21 8 0 1 "__pa3" ;3,1
#pragma debug field 21 8 0 1 "__pa4" ;4,1
#pragma debug field 21 8 0 1 "__pa5" ;5,1
#pragma debug field 21 8 0 1 "__pa6" ;6,1
#pragma debug field 21 8 0 1 "__pa7" ;7,1
#pragma debug struct_end
#pragma debug union_begin 51 ""
#pragma debug field 2 50 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 51 1 ___pa "__pa" 1
#pragma debug struct_begin 52 "__intc1_bits"
#pragma debug field 21 8 0 1 "__ade" ;0,1
#pragma debug field 21 8 0 1 "__mf0e" ;1,1
#pragma debug field 21 8 0 1 "__mf1e" ;2,1
#pragma debug field 21 8 0 1 "__int2e" ;3,1
#pragma debug field 21 8 0 1 "__adf" ;4,1
#pragma debug field 21 8 0 1 "__mf0f" ;5,1
#pragma debug field 21 8 0 1 "__mf1f" ;6,1
#pragma debug field 21 8 0 1 "__int2f" ;7,1
#pragma debug struct_end
#pragma debug union_begin 53 ""
#pragma debug field 2 52 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 53 1 ___intc1 "__intc1" 1
#pragma debug struct_begin 54 "__pwrc_bits"
#pragma debug field 21 8 0 3 ;0,3
#pragma debug field 21 8 0 1 "__vdetecten" ;3,1
#pragma debug field 21 8 0 4 ;4,4
#pragma debug struct_end
#pragma debug union_begin 55 ""
#pragma debug field 2 54 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 55 1 ___pwrc "__pwrc" 1
#pragma debug struct_begin 56 "__pgac_bits"
#pragma debug field 21 8 0 1 "__pgs0" ;0,1
#pragma debug field 21 8 0 1 "__pgs1" ;1,1
#pragma debug field 21 8 0 1 "__pgs2" ;2,1
#pragma debug field 21 8 0 1 "__ags" ;3,1
#pragma debug field 21 8 0 1 "__inx0" ;4,1
#pragma debug field 21 8 0 1 "__inx1" ;5,1
#pragma debug field 21 8 0 1 "__inis" ;6,1
#pragma debug field 21 8 0 1 ;7,1
#pragma debug struct_end
#pragma debug union_begin 57 ""
#pragma debug field 2 56 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 57 1 ___pgac "__pgac" 1
#pragma debug struct_begin 58 "__pgacs_bits"
#pragma debug field 21 8 0 1 "__chsp0" ;0,1
#pragma debug field 21 8 0 1 "__chsp1" ;1,1
#pragma debug field 21 8 0 1 "__chsp2" ;2,1
#pragma debug field 21 8 0 1 "__chsp3" ;3,1
#pragma debug field 21 8 0 1 "__chsn0" ;4,1
#pragma debug field 21 8 0 1 "__chsn1" ;5,1
#pragma debug field 21 8 0 1 "__chsn2" ;6,1
#pragma debug field 21 8 0 1 "__chsn3" ;7,1
#pragma debug struct_end
#pragma debug union_begin 59 ""
#pragma debug field 2 58 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 59 1 ___pgacs "__pgacs" 1
#pragma debug struct_begin 60 "__modc_bits"
#pragma debug field 21 8 0 1 "__pgaen" ;0,1
#pragma debug field 21 8 0 1 "__pgabps" ;1,1
#pragma debug field 21 8 0 1 "__adrst" ;2,1
#pragma debug field 21 8 0 1 "__aden" ;3,1
#pragma debug field 21 8 0 4 ;4,4
#pragma debug struct_end
#pragma debug union_begin 61 ""
#pragma debug field 2 60 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 61 1 ___modc "__modc" 1
#pragma debug variable 8 1 ___adrl "__adrl" 1
#pragma debug variable 8 1 ___adrm "__adrm" 1
#pragma debug variable 8 1 ___adrh "__adrh" 1
#pragma debug struct_begin 62 "__adcr0_bits"
#pragma debug field 21 8 0 1 ;0,1
#pragma debug field 21 8 0 1 "__ador0" ;1,1
#pragma debug field 21 8 0 1 "__ador1" ;2,1
#pragma debug field 21 8 0 1 "__ador2" ;3,1
#pragma debug field 21 8 0 1 "__ador3" ;4,1
#pragma debug field 21 8 0 3 ;5,3
#pragma debug struct_end
#pragma debug union_begin 63 ""
#pragma debug field 2 62 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 63 1 ___adcr0 "__adcr0" 1
#pragma debug struct_begin 64 "__adcr1_bits"
#pragma debug field 21 8 0 1 ;0,1
#pragma debug field 21 8 0 1 "__eoc" ;1,1
#pragma debug field 21 8 0 1 "__adcdl" ;2,1
#pragma debug field 21 8 0 1 ;3,1
#pragma debug field 21 8 0 1 "__flmsps" ;4,1
#pragma debug field 21 8 0 1 "__flms0" ;5,1
#pragma debug field 21 8 0 1 "__flms1" ;6,1
#pragma debug field 21 8 0 1 "__flms2" ;7,1
#pragma debug struct_end
#pragma debug union_begin 65 ""
#pragma debug field 2 64 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 65 1 ___adcr1 "__adcr1" 1
#pragma debug struct_begin 66 "__adcs_bits"
#pragma debug field 21 8 0 1 "__adck0" ;0,1
#pragma debug field 21 8 0 1 "__adck1" ;1,1
#pragma debug field 21 8 0 1 "__adck2" ;2,1
#pragma debug field 21 8 0 1 "__adck3" ;3,1
#pragma debug field 21 8 0 1 "__adck4" ;4,1
#pragma debug field 21 8 0 3 ;5,3
#pragma debug struct_end
#pragma debug union_begin 67 ""
#pragma debug field 2 66 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 67 1 ___adcs "__adcs" 1
#pragma debug struct_begin 68 "__sinc3_bits"
#pragma debug field 21 8 0 1 "__r_ckchop" ;0,1
#pragma debug field 21 8 0 1 "__r_filsel" ;1,1
#pragma debug field 21 8 0 1 "__cmpcp0" ;2,1
#pragma debug field 21 8 0 1 "__cmpcp1" ;3,1
#pragma debug field 21 8 0 1 "__modcp0" ;4,1
#pragma debug field 21 8 0 1 "__modcp1" ;5,1
#pragma debug field 21 8 0 1 "__pgacp0" ;6,1
#pragma debug field 21 8 0 1 "__pgacp1" ;7,1
#pragma debug struct_end
#pragma debug union_begin 69 ""
#pragma debug field 2 68 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 69 1 ___sinc3 "__sinc3" 1
#pragma debug struct_begin 70 "__adacctrl_bits"
#pragma debug field 21 8 0 1 "__adacc0" ;0,1
#pragma debug field 21 8 0 1 "__adacc1" ;1,1
#pragma debug field 21 8 0 1 "__adacc2" ;2,1
#pragma debug field 21 8 0 3 ;3,3
#pragma debug field 21 8 0 1 "__eoca" ;6,1
#pragma debug field 21 8 0 1 "__adavgen" ;7,1
#pragma debug struct_end
#pragma debug union_begin 71 ""
#pragma debug field 2 70 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 71 1 ___adacctrl "__adacctrl" 1
#pragma debug variable 8 1 ___adrl_avg "__adrl_avg" 1
#pragma debug variable 8 1 ___adrm_avg "__adrm_avg" 1
#pragma debug variable 8 1 ___adrh_avg "__adrh_avg" 1
#pragma debug struct_begin 72 "__ctrl_bits"
#pragma debug field 21 8 0 5 ;0,5
#pragma debug field 21 8 0 1 "__addsk0" ;5,1
#pragma debug field 21 8 0 1 "__addsk1" ;6,1
#pragma debug field 21 8 0 1 "__ctrlen" ;7,1
#pragma debug struct_end
#pragma debug union_begin 73 ""
#pragma debug field 2 72 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 73 1 ___ctrl "__ctrl" 1
#pragma debug struct_begin 74 "__autoadcc_bits"
#pragma debug field 21 8 0 1 "__bufrst" ;0,1
#pragma debug field 21 8 0 1 "__wrnum0" ;1,1
#pragma debug field 21 8 0 1 "__wrnum1" ;2,1
#pragma debug field 21 8 0 1 "__wrnum2" ;3,1
#pragma debug field 21 8 0 1 "__wrnum3" ;4,1
#pragma debug field 21 8 0 1 "__wrnum4" ;5,1
#pragma debug field 21 8 0 1 ;6,1
#pragma debug field 21 8 0 1 "__autoadcen" ;7,1
#pragma debug struct_end
#pragma debug union_begin 75 ""
#pragma debug field 2 74 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 75 1 ___autoadcc "__autoadcc" 1
#pragma debug struct_begin 76 "__errchkc_bits"
#pragma debug field 21 8 0 6 ;0,6
#pragma debug field 21 8 0 1 "__errchkrst" ;6,1
#pragma debug field 21 8 0 1 "__errchken" ;7,1
#pragma debug struct_end
#pragma debug union_begin 77 ""
#pragma debug field 2 76 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 77 1 ___errchkc "__errchkc" 1
#pragma debug struct_begin 78 "__pas0_bits"
#pragma debug field 21 8 0 1 "__pas00" ;0,1
#pragma debug field 21 8 0 1 "__pas01" ;1,1
#pragma debug field 21 8 0 1 "__pas02" ;2,1
#pragma debug field 21 8 0 1 "__pas03" ;3,1
#pragma debug field 21 8 0 1 "__pas04" ;4,1
#pragma debug field 21 8 0 1 "__pas05" ;5,1
#pragma debug field 21 8 0 1 "__pas06" ;6,1
#pragma debug field 21 8 0 1 "__pas07" ;7,1
#pragma debug struct_end
#pragma debug union_begin 79 ""
#pragma debug field 2 78 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 79 1 ___pas0 "__pas0" 1
#pragma debug array 80 7 64 1
#pragma debug variable 80 1 _adcAutoModeBuf "adcAutoModeBuf" 64
extern r1:byte
extern r2:byte

; 
; Generated by holtek-gcc v3.19, Mon Jul 14 16:56:28 2025
; Rebuild 718
; end of file
