; Generated by holtek-gcc v3.20, Thu Aug 27 16:47:56 2020
; 
; Configuration:
;       with long instruction
;       Multi-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 = 16
;       
;       
; use 'tabrdc' instead of 'tabrd'
;       

#pragma translator "holtek-gcc 4.6.4" "3.20" "build 20130711"
; Rebuild 610

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 [16]
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
___pas1 equ [335]
___ifs2 equ [331]
___pas0 equ [334]
___simc0 equ [108]
___simc2 equ [111]
___mfi3 equ [73]
___intc2 equ [18]
___intc0 equ [16]
public _Drv_USIM_PowerOn
#pragma debug scope 2 1
#line 27 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
_Drv_USIM_PowerOn .section 'code'
_Drv_USIM_PowerOn proc
#line 39 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	lclr [335].3
	lset [335].2
	lclr [331].4
	lclr [335].1
	lset [335].0
	lclr [331].5
	lclr [334].7
	lset [334].6
	lclr [334].3
	lset [334].2
	lclr [331].6
#line 42 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [108]
#line 43 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,4
	mov [111],a
#line 44 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	set [108].1
	clr [73].7
	set [73].3
#line 46 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [18].7
#line 47 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	set [18].3
#line 48 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	set [16].0
	ret
_Drv_USIM_PowerOn endp
#line 48 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
#pragma debug scope 1 1
public _Drv_USIM_PowerDown
#pragma debug scope 3 1
#line 55 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
_Drv_USIM_PowerDown .section 'code'
_Drv_USIM_PowerDown proc
#line 62 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [108].1
#line 63 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [73].3
	clr [73].7
	ret
_Drv_USIM_PowerDown endp
#line 63 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
#pragma debug scope 1 1
___simd equ [110]
public _USIM_ISR
#pragma debug scope 4 1
#line 74 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
rombank 0 @USIM_ISR_code
@USIM_ISR_code .section at 44 'code'
	mov r1,a
	mov a,bp
	clr bp
	jmp _USIM_ISR
ROMBANK 0 _USIM_ISR
#pragma debug scope 1 1
@dummy44 proc
	call _USIM_ISR
@dummy44 endp
#pragma debug scope 5 1
_USIM_ISR .section 'code'
_USIM_ISR proc
	mov r2,a
	mov a, status
	mov r3,a
	mov a,mp
	mov r4,a
	mov a,sbp
	mov r5,a
	mov a,tblp
	mov r6,a
	mov a,tbhp
	mov r7,a
#line 141 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	snz [111].0
	jmp _L3
#line 143 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,low offset _USIM_Data
	add a,_USIM_Data[40]
	mov mp,a
	mov a,high offset _USIM_Data
	clr sbp
	adcm a,sbp
	mov a,[110]
	mov ir,a
#line 144 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	inc _USIM_Data[40]
#line 145 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [111].0
_L7:
#line 148 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [111].1
#line 150 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,low (offset _USIM_Data+20)
	add a,_USIM_Data[41]
	mov mp,a
	mov a,high (offset _USIM_Data+20)
	clr sbp
	adcm a,sbp
	fcall _Crom2Prom
	mov [110],a
#line 151 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	inc _USIM_Data[41]
#line 152 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,19
	sub a,_USIM_Data[40]
	sz c
	jmp _L5
#line 154 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr _USIM_Data[40]
#line 155 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr _USIM_Data[41]
#line 156 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	set _USIM_Data[45].1
_L5:
#line 158 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	sz [111].1
	jmp _L7
_L3:
	mov a,r2
	mov bp,a
	mov a,r3
	mov status,a
	mov a,r4
	mov mp,a
	mov a,r5
	mov sbp,a
	mov a,r6
	mov tblp,a
	mov a,r7
	mov tbhp,a
	tabrdc acc
	mov a,r1
	reti
_USIM_ISR endp

#line 158 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
#pragma debug scope 1 1
public _Drv_SIMSPI_TxRxByte
#pragma debug scope 6 1
#line 170 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
_Drv_SIMSPI_TxRxByte .section 'code'
_Drv_SIMSPI_TxRxByte proc
    local _Drv_SIMSPI_TxRxByte_2 db 1 dup(?)	; 0,1
	mov _Drv_SIMSPI_TxRxByte_2[0],a
#pragma debug variable 8 6 _Drv_SIMSPI_TxRxByte_2+0 "txByte"
_L15:
#line 173 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [111].1
#line 174 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
;# 174 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c" 1
	clr wdt
#line 175 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,_Drv_SIMSPI_TxRxByte_2[0]
	mov [110],a
#line 176 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	sz [111].1
	jmp _L15
_L14:
#line 177 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	sz [111].0
	jmp _L17
#line 179 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
;# 179 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c" 1
	clr wdt
	jmp _L14
_L17:
#line 181 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [111].0
#line 182 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,[110]
	mov ra,a
#line 183 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,ra
	ret
_Drv_SIMSPI_TxRxByte endp
#line 183 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
#pragma debug scope 1 1
public _Drv_SIMSPI_TxRxBuf
#pragma debug scope 7 1
#line 186 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
_Drv_SIMSPI_TxRxBuf .section 'code'
_Drv_SIMSPI_TxRxBuf proc
public _Drv_SIMSPI_TxRxBuf_2
    local _Drv_SIMSPI_TxRxBuf_2 db 6 dup(?)	; 2,4
	mov _Drv_SIMSPI_TxRxBuf_2[3],a
#pragma debug variable 8 7 _Drv_SIMSPI_TxRxBuf_2+3 "len"
#pragma debug pointer 42 8 7
#pragma debug variable 42 7 _Drv_SIMSPI_TxRxBuf_2+0 "txBuf"
#pragma debug variable 8 7 _Drv_SIMSPI_TxRxBuf_2+2 "i"
#line 187 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr _Drv_SIMSPI_TxRxBuf_2[2]
#line 188 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr _Drv_SIMSPI_TxRxBuf_2[2]
	jmp _L19
_L20:
#line 190 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	mov a,_Drv_SIMSPI_TxRxBuf_2[2]
	mov _Drv_SIMSPI_TxRxBuf_2[4],a
	clr _Drv_SIMSPI_TxRxBuf_2[5]
	mov a,_Drv_SIMSPI_TxRxBuf_2[2]
	add a,_Drv_SIMSPI_TxRxBuf_2[0]
	mov mp,a
	clr acc
	adc a,_Drv_SIMSPI_TxRxBuf_2[1]
	mov sbp,a
	fcall _Crom2Prom
	mov ra,a
	mov a,ra
	fcall _Drv_SIMSPI_TxRxByte
	mov ra,a
	mov a,low offset _USIM_Data
	add a,_Drv_SIMSPI_TxRxBuf_2[4]
	mov mp,a
	mov a,high offset _USIM_Data
	adc a,_Drv_SIMSPI_TxRxBuf_2[5]
	mov sbp,a
	mov a,ra
	mov ir,a
#line 191 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	clr [73].7
#line 188 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
	inc _Drv_SIMSPI_TxRxBuf_2[2]
_L19:
	mov a,_Drv_SIMSPI_TxRxBuf_2[2]
	sub a,_Drv_SIMSPI_TxRxBuf_2[3]
	snz c
	jmp _L20
	ret
_Drv_SIMSPI_TxRxBuf endp
#line 188 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
#pragma debug scope 1 1
#line 20 "c:\users\iris\desktop\2. demo code\bh67f5362_simspi\BH67F5362_Drv\Drv_USIM.c"
public _USIM_Data
@HCCINIT0_USIM_Data .section 'data'
_USIM_Data	db 46 dup(0)
#pragma debug struct_begin 43 ""
#pragma debug field 21 8 0 1 "TxIsBusy" ;0,1
#pragma debug field 21 8 0 1 "RxIsOK" ;1,1
#pragma debug struct_end
#pragma debug union_begin 44 ""
#pragma debug field 2 43 "b"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug struct_begin 45 ""
#pragma debug field 1 8 20 "RxBuf"
#pragma debug field 1 8 20 "TxBuf"
#pragma debug field 0 8 "RxOffset"
#pragma debug field 0 8 "TxOffset"
#pragma debug field 0 8 "RxLength"
#pragma debug field 0 8 "TxLength"
#pragma debug field 0 8 "RxTimeOut"
#pragma debug field 3 44 "flag"
#pragma debug struct_end
#pragma debug variable 45 1 _USIM_Data "USIM_Data"

@HCCINIT .section 'data'
#pragma debug struct_begin 46 "__intc0_bits"
#pragma debug field 21 8 0 1 "__emi" ;0,1
#pragma debug field 21 8 0 1 "__int0e" ;1,1
#pragma debug field 21 8 0 1 "__int1e" ;2,1
#pragma debug field 21 8 0 1 "__mf6e" ;3,1
#pragma debug field 21 8 0 1 "__int0f" ;4,1
#pragma debug field 21 8 0 1 "__int1f" ;5,1
#pragma debug field 21 8 0 1 "__mf6f" ;6,1
#pragma debug field 21 8 0 1 ;7,1
#pragma debug struct_end
#pragma debug union_begin 47 ""
#pragma debug field 2 46 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 47 1 ___intc0 "__intc0" 1
#pragma debug struct_begin 48 "__intc2_bits"
#pragma debug field 21 8 0 1 "__mf2e" ;0,1
#pragma debug field 21 8 0 1 "__mf8e" ;1,1
#pragma debug field 21 8 0 1 "__mf9e" ;2,1
#pragma debug field 21 8 0 1 "__mf3e" ;3,1
#pragma debug field 21 8 0 1 "__mf2f" ;4,1
#pragma debug field 21 8 0 1 "__mf8f" ;5,1
#pragma debug field 21 8 0 1 "__mf9f" ;6,1
#pragma debug field 21 8 0 1 "__mf3f" ;7,1
#pragma debug struct_end
#pragma debug union_begin 49 ""
#pragma debug field 2 48 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 49 1 ___intc2 "__intc2" 1
#pragma debug struct_begin 50 "__mfi3_bits"
#pragma debug field 21 8 0 1 "__lve" ;0,1
#pragma debug field 21 8 0 1 "__dee" ;1,1
#pragma debug field 21 8 0 1 "__spie" ;2,1
#pragma debug field 21 8 0 1 "__sime" ;3,1
#pragma debug field 21 8 0 1 "__lvf" ;4,1
#pragma debug field 21 8 0 1 "__def" ;5,1
#pragma debug field 21 8 0 1 "__spif" ;6,1
#pragma debug field 21 8 0 1 "__simf" ;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 ___mfi3 "__mfi3" 1
#pragma debug struct_begin 52 "__simc0_bits"
#pragma debug field 21 8 0 1 "__simicf" ;0,1
#pragma debug field 21 8 0 1 "__simen" ;1,1
#pragma debug field 21 8 0 1 "__simdeb0" ;2,1
#pragma debug field 21 8 0 1 "__simdeb1" ;3,1
#pragma debug field 21 8 0 1 ;4,1
#pragma debug field 21 8 0 1 "__sim0" ;5,1
#pragma debug field 21 8 0 1 "__sim1" ;6,1
#pragma debug field 21 8 0 1 "__sim2" ;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 ___simc0 "__simc0" 1
#pragma debug variable 8 1 ___simd "__simd" 1
#pragma debug struct_begin 54 "__simc2_bits"
#pragma debug field 21 8 0 1 "__trf" ;0,1
#pragma debug field 21 8 0 1 "__wcol" ;1,1
#pragma debug field 21 8 0 1 "__csen" ;2,1
#pragma debug field 21 8 0 1 "__mls" ;3,1
#pragma debug field 21 8 0 1 "__ckeg" ;4,1
#pragma debug field 21 8 0 1 "__ckpolb" ;5,1
#pragma debug field 21 8 0 2 ;6,2
#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 ___simc2 "__simc2" 1
#pragma debug struct_begin 56 "__ifs2_bits"
#pragma debug field 21 8 0 1 "__int0ps" ;0,1
#pragma debug field 21 8 0 1 "__int1ps" ;1,1
#pragma debug field 21 8 0 1 "__int2ps" ;2,1
#pragma debug field 21 8 0 1 "__int3ps" ;3,1
#pragma debug field 21 8 0 1 "__scksclps" ;4,1
#pragma debug field 21 8 0 1 "__sdisdaps" ;5,1
#pragma debug field 21 8 0 1 "__scsbps" ;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 ___ifs2 "__ifs2" 1
#pragma debug struct_begin 58 "__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 59 ""
#pragma debug field 2 58 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 59 1 ___pas0 "__pas0" 1
#pragma debug struct_begin 60 "__pas1_bits"
#pragma debug field 21 8 0 1 "__pas10" ;0,1
#pragma debug field 21 8 0 1 "__pas11" ;1,1
#pragma debug field 21 8 0 1 "__pas12" ;2,1
#pragma debug field 21 8 0 1 "__pas13" ;3,1
#pragma debug field 21 8 0 1 "__pas14" ;4,1
#pragma debug field 21 8 0 1 "__pas15" ;5,1
#pragma debug field 21 8 0 1 "__pas16" ;6,1
#pragma debug field 21 8 0 1 "__pas17" ;7,1
#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 ___pas1 "__pas1" 1
extern r1:byte
extern r2:byte
extern r3:byte
extern r4:byte
extern r5:byte
extern r6:byte
extern r7:byte

; 
; Generated by holtek-gcc v3.20, Thu Aug 27 16:47:56 2020
; Rebuild 610
; end of file
