; Generated by holtek-gcc v3.19, Thu Dec 24 17:22:07 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
___pa equ [34]
public _fun_Wait_KEY_UP
#pragma debug scope 2 1
#line 8 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
_fun_Wait_KEY_UP .section 'code'
_fun_Wait_KEY_UP proc
#line 9 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	clr _gu16_CorrCount[0]
	clr _gu16_CorrCount[1]
_L8:
#line 12 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	sz [34].7
	jmp _L2
#line 14 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	set _gu8_System_flag[0].2
	jmp _L5
_L2:
#line 17 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	snz _gu8_System_flag[0].2
	jmp _L3
#line 19 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	snz [34].7
	jmp _L5
#line 21 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	inc _gu8v_KeyCount[0]
#line 22 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	mov a,3
	sub a,_gu8v_KeyCount[0]
	sz c
	jmp _L3
#line 24 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	clr _gu8_System_flag[0].2
#line 25 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	clr _gu8v_KeyCount[0]
#line 26 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	jmp _L1
_L5:
#line 31 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	clr _gu8v_KeyCount[0]
_L3:
#line 34 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	inc _gu16_CorrCount[0]
	sz z
	inc _gu16_CorrCount[1]
#line 35 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	mov a,232
	sub a,_gu16_CorrCount[0]
	mov a,3
	sbc a,_gu16_CorrCount[1]
	snz c
	jmp _L1
#line 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF 16*10>263690
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	ERRMESSAGE 'the value 16*10of the argument exceeds the maxinum 263690'
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF 16*10<0
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	ERRMESSAGE 'the value 16*10 of the argument exceeds the mininum 0'
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF 16*10==0
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	JMP $
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF 16*10==1
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	NOP
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF 16*10==2
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	NOP
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	NOP
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF 16*10==3
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	NOP
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	NOP
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	NOP
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF (16*10<8) AND (16*10>3)
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	CALL __DELAY3 + 7 -16*10
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF (16*10< 0404h) AND (16*10>7)
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV A,16*10/4-1
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	CALL __DELAYX3 + 3 -(16*10 MOD 4)
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF (16*10< 0x40B) AND (16*10> 0403h)
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV A,0 
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	CALL __DELAYX6 + 0x40a -16*10
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF (16*10 >= 0x40b) AND ((((16*10-9)%0402h)/4+1)>256)
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV A,(16*10-9)/0402h
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV _builtin_holtek_delay_2,A
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV A,0
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	CALL __DELAYY5 +5- (((16*10-9)%0402h)%6)
	ENDIF
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	IF (16*10 >= 0x40b) AND ((((16*10-9)%0402h)/4+1)<=256)
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV A,(16*10-9)/0402h
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV _builtin_holtek_delay_2,A
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	MOV A,((16*10-9)%0402h)/4+1
;# 39 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c" 1
	CALL __DELAYY3 +3-(((16*10-9)%0402h)%4)
	ENDIF
#line 40 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
	jmp _L8
_L1:
	ret
_fun_Wait_KEY_UP endp
#line 40 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
#pragma debug scope 1 1
#line 4 "\\dgdc1\Y680\Y680 對外資料\0 開發板資料\BH67F2132DemoBoard\BH67F2132-SoftWare\USER\Key.c"
public _gu8v_KeyCount
@HCCINIT0 .section 'data'
_gu8v_KeyCount	db 0
#pragma debug variable 8 1 _gu8v_KeyCount "gu8v_KeyCount"

@HCCINIT .section 'data'
#pragma debug struct_begin 42 "__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 43 ""
#pragma debug field 2 42 "bits"
#pragma debug field 0 8 "byte"
#pragma debug union_end
#pragma debug variable 43 1 ___pa "__pa" 1

; output external variables
extern _gu8_System_flag:byte
extern _gu16_CorrCount:byte

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