; Generated by holtek-gcc v3.19, Tue Aug 20 18:26:43 2019
; 
; 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]
mduwr0 equ [59h]
mduwr1 equ [5ah]
mduwr2 equ [5bh]
mduwr3 equ [5ch]
mduwr4 equ [5dh]
mduwr5 equ [5eh]
mduwrctrl equ [5fh]

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
___status equ [10]
___mp1h equ [4]
___mp1l equ [3]
___iar1 equ [2]
public _main
#pragma debug scope 2 1
#line 8 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
IFDEF WITH_DEFAULT_STARTUP
extern _main_initial0:near
extern _main_startup:near
ENDIF

ROMBANK 0 @start
@start .section com_l 'code'
_main_startup1:
@start .section com_e 'code'
	jmp _main

_main .section 'code'
_main proc
    local _main_2 db 7 dup(?)
#line 11 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	snz [10].5
	jmp _L2
#line 11 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	sz [10].4
	jmp _L8
_L2:
#line 15 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	call _fun_SysPowerOnInit
#line 16 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	call _fun_USIM_PowerOn
#line 17 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	call _fun_ADCInit
_L8:
#line 27 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
;# 27 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c" 1
	clr wdt
#line 29 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	snz _ADCSourceData[6].0
	jmp _L6
#line 31 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _ADCSourceData[6].0
#line 32 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,164
	mov _USIM_Data[20],a
#line 33 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[21]
#line 34 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_ADCSourceData[3]
	mov _USIM_Data[22],a
#line 35 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_ADCSourceData[2]
	mov _USIM_Data[23],a
#line 36 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_ADCSourceData[1]
	mov _USIM_Data[24],a
#line 37 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[23]
	add a,_USIM_Data[22]
	mov rb,a
	mov a,_USIM_Data[24]
	addm a,rb
	mov a,_USIM_Data[21]
	add a,_USIM_Data[20]
	mov ra,a
	mov a,rb
	add a,ra
	mov _USIM_Data[25],a
#line 38 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,5
	call _fun_UartStartTx
_L6:
#line 40 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	call _fun_UartTimeOutReset
#line 41 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	snz _USIM_Data[45].1
	jmp _L8
#pragma debug scope 3 2
;begin block, line: 41.-1
#line 43 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[45].1
#line 46 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[3]
	add a,_USIM_Data[2]
	mov ra,a
	mov a,_USIM_Data[4]
	addm a,ra
	mov a,_USIM_Data[1]
	add a,_USIM_Data[0]
	mov rb,a
	mov a,rb
	addm a,ra
#line 47 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,ra
	sub a,_USIM_Data[5]
	snz z
	jmp _L8
#line 49 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[0]
	mov _main_2[0],a
	mov a,_main_2[0]
	sub a,160
	sz z
	jmp _L9
	sub a,(161)-(160)
	sz z
	jmp _L10
	mov a,_main_2[0]
	sub a,162
	sz z
	jmp _L11
	mov a,_main_2[0]
	sub a,163
	snz z
	jmp _L8
#line 84 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	call _fun_ADCStop
#line 85 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,163
	mov _USIM_Data[20],a
	jmp _L19
_L9:
#line 52 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[1]
	mov _main_2[2],a
	clr _main_2[1]
	mov a,_USIM_Data[2]
	add a,_main_2[1]
	mov rb,a
	clr acc
	adc a,_main_2[2]
	mov rc,a
#line 53 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,160
	mov _USIM_Data[20],a
#line 54 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[1]
	mov _USIM_Data[21],a
#line 55 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[2]
	mov _USIM_Data[22],a
#line 56 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[23]
#pragma debug scope 4 3
;begin block, line: 56.-1
#pragma debug scope 5 4
;begin block, line: 56.-1
#line 122 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,rc
	mov [4],a
#line 123 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,rb
	mov [3],a
#pragma debug scope 4 3
#pragma debug scope 3 2
#line 57 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,[2]
	mov _USIM_Data[24],a
	jmp _L21
_L10:
#line 62 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[1]
	mov _main_2[4],a
	clr _main_2[3]
	mov a,_USIM_Data[2]
	add a,_main_2[3]
	mov rb,a
	clr acc
	adc a,_main_2[4]
	mov rc,a
#line 63 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[3]
	mov _main_2[6],a
	clr _main_2[5]
	mov a,_USIM_Data[4]
	add a,_main_2[5]
	mov rd,a
	clr acc
	adc a,_main_2[6]
	mov re,a
#pragma debug scope 6 3
;begin block, line: 63.-1
#pragma debug scope 7 6
;begin block, line: 63.-1
#line 109 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,rc
	mov [4],a
#line 110 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,rb
	mov [3],a
#line 111 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,rd
	mov [2],a
#pragma debug scope 6 3
#pragma debug scope 3 2
#line 65 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,161
	mov _USIM_Data[20],a
#line 66 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[1]
	mov _USIM_Data[21],a
#line 67 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[2]
	mov _USIM_Data[22],a
	jmp _L20
_L11:
#line 74 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	call _fun_ADCStart
#line 75 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,162
	mov _USIM_Data[20],a
_L19:
#line 86 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[21]
#line 87 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[22]
_L20:
#line 88 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[23]
#line 89 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	clr _USIM_Data[24]
_L21:
#line 90 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_USIM_Data[23]
	add a,_USIM_Data[22]
	mov rb,a
	mov a,_USIM_Data[24]
	addm a,rb
	mov a,_USIM_Data[21]
	add a,_USIM_Data[20]
	mov ra,a
	mov a,rb
	add a,ra
	mov _USIM_Data[25],a
#line 91 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,5
	call _fun_UartStartTx
#line 92 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	jmp _L8
#pragma debug scope 2 1
	jmp $
_main endp

@dummy proc
	call _main
@dummy endp

#line 92 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
#pragma debug scope 1 1
public _fun_WriteMcuRegister
#pragma debug scope 8 1
#line 108 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
_fun_WriteMcuRegister .section 'code'
_fun_WriteMcuRegister proc
public _fun_WriteMcuRegister_2
    local _fun_WriteMcuRegister_2 db 3 dup(?)	; 3,0
#pragma debug variable 12 8 _fun_WriteMcuRegister_2+0 "WriteAddress"
#pragma debug variable 8 8 _fun_WriteMcuRegister_2+2 "WriteData"
#line 109 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_fun_WriteMcuRegister_2[1]
	mov [4],a
#line 110 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_fun_WriteMcuRegister_2[0]
	mov [3],a
#line 111 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_fun_WriteMcuRegister_2[2]
	mov [2],a
	ret
_fun_WriteMcuRegister endp
#line 111 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
#pragma debug scope 1 1
public _fun_ReadMcuRegister
#pragma debug scope 9 1
#line 120 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
_fun_ReadMcuRegister .section 'code'
_fun_ReadMcuRegister proc
public _fun_ReadMcuRegister_2
    local _fun_ReadMcuRegister_2 db 2 dup(?)	; 2,0
#pragma debug variable 12 9 _fun_ReadMcuRegister_2+0 "ReadAddress"
#line 122 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_fun_ReadMcuRegister_2[1]
	mov [4],a
#line 123 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,_fun_ReadMcuRegister_2[0]
	mov [3],a
#line 124 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,[2]
	mov ra,a
#line 126 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
	mov a,ra
	ret
_fun_ReadMcuRegister endp
#line 126 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
#pragma debug scope 1 1
#pragma debug variable 8 1 ___mp1l "__mp1l" 1
#pragma debug variable 8 1 ___mp1h "__mp1h" 1
#pragma debug struct_begin 42 "__status_bits"
#pragma debug field 21 8 0 1 "__c" ;0,1
#pragma debug field 21 8 0 1 "__ac" ;1,1
#pragma debug field 21 8 0 1 "__z" ;2,1
#pragma debug field 21 8 0 1 "__ov" ;3,1
#pragma debug field 21 8 0 1 "__pdf" ;4,1
#pragma debug field 21 8 0 1 "__to" ;5,1
#pragma debug field 21 8 0 1 "__cz" ;6,1
#pragma debug field 21 8 0 1 "__sc" ;7,1
#pragma debug struct_end
#pragma debug union_begin 43 ""
#pragma debug field 2 42 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 43 1 ___status "__status" 1
#pragma debug variable 8 1 ___iar1 "__iar1" 1

; output external variables
extern _USIM_Data:byte
extern _ADCSourceData:byte
#line 8 "E:\VSProjects\DeltaSigmaADCTool\MCUTestTool\bin\Debug\res\ADC_Development_Kit\source\main.c"
@code .section at 0 'code'
	jmp _main_startup1

extern _fun_SysPowerOnInit:near
extern _fun_USIM_PowerOn:near
extern _fun_ADCInit:near
extern _fun_UartStartTx:near
extern _fun_UartTimeOutReset:near
extern _fun_ADCStop:near
extern _fun_ADCStart:near

; 
; Generated by holtek-gcc v3.19, Tue Aug 20 18:26:43 2019
; Rebuild 718
; end of file
