;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Sep 24 2015 15:22:16) (MSVC)
; This file was generated Fri Dec 25 14:49:22 2015
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../main.c"
	.list	p=KF8F4156
	.radix dec
	.include "KF8F4156.inc"
;--------------------------------------------------------
; external declarations
;--------------------------------------------------------
	.extern	_PSW_bits
	.extern	_P0_bits
	.extern	_P2_bits
	.extern	_P1_bits
	.extern	_P3_bits
	.extern	_INTCTL_bits
	.extern	_EIF1_bits
	.extern	_EIF2_bits
	.extern	_T1CTL_bits
	.extern	_T2CTL0_bits
	.extern	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_ADSCANCTL_bits
	.extern	_C1CTL_bits
	.extern	_VDACS_bits
	.extern	_AMPCTL_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_bits
	.extern	_AMPDT_bits
	.extern	_OPTR_bits
	.extern	_IP0_bits
	.extern	_IP1_bits
	.extern	_IP2_bits
	.extern	_TR0_bits
	.extern	_TR2_bits
	.extern	_TR1_bits
	.extern	_OSCSTA_bits
	.extern	_IP3_bits
	.extern	_VRECTL_bits
	.extern	_EIE1_bits
	.extern	_EIE2_bits
	.extern	_PCTL_bits
	.extern	_OSCCTL_bits
	.extern	_ANSEL_bits
	.extern	_PUR0_bits
	.extern	_IOCL_bits
	.extern	_ADCCTL1_bits
	.extern	_P0LR_bits
	.extern	_P2LR_bits
	.extern	_P1LR_bits
	.extern	_P3LR_bits
	.extern	_TR3_bits
	.extern	_EIE3_bits
	.extern	_EIF3_bits
	.extern	_PWM5CTL0_bits
	.extern	_ADCINTCTL_bits
	.extern	_PWM5CTL1_bits
	.extern	_P5ASCTL_bits
	.extern	_PSTRCTL_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_INTEDGCTL_bits
	.extern	_VBIASCTL_bits
	.extern	_VBIAS1EN_bits
	.extern	_VBIAS2EN_bits
	.extern	_PWM5OC_bits
	.extern	_T2CTL1_bits
	.extern	_VDAC_bits
	.extern	_PWM5CTL2_bits
	.extern	_PWMPC_bits
	.extern	_RSCTL_bits
	.extern	_BRCTL_bits
	.extern	_TSCTL_bits
	.extern	_SSCICTL0_bits
	.extern	_SSCICTL1_bits
	.extern	_SSCISTA_bits
	.extern	_SSCIMSK_bits
	.extern	_WDTPS_bits
	.extern	_MULCTL_bits
	.extern	_DIVCTL_bits
	.extern	_LEDCTL_bits
	.extern	_LEDPRE_bits
	.extern	_LEDDATA0_bits
	.extern	_LEDDATA1_bits
	.extern	_LEDDATA2_bits
	.extern	_LEDDATA3_bits
	.extern	_LEDDATA4_bits
	.extern	_LEDDATA5_bits
	.extern	_LEDDATA6_bits
	.extern	_LEDDATA7_bits
	.extern	_C1FILTCTL_bits
	.extern	_C1FILTPRE_bits
	.extern	_LEDOMS1_bits
	.extern	_LEDODS0_bits
	.extern	_LEDOMS0_bits
	.extern	_LEDODS1_bits
	.extern	_LEDLUM_bits
	.extern	_PWM5FC_bits
	.extern	_T4CTL_bits
	.extern	_T0
	.extern	_PCL
	.extern	_PSW
	.extern	_P0
	.extern	_P2
	.extern	_P1
	.extern	_P3
	.extern	_PCH
	.extern	_INTCTL
	.extern	_EIF1
	.extern	_EIF2
	.extern	_T1L
	.extern	_T1H
	.extern	_T1CTL
	.extern	_T2L
	.extern	_T2CTL0
	.extern	_PWM1L
	.extern	_PWM1H
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_ADSCANCTL
	.extern	_C1CTL
	.extern	_VDACS
	.extern	_AMPCTL
	.extern	_ANSEH
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.extern	_AMPDT
	.extern	_OPTR
	.extern	_IP0
	.extern	_IP1
	.extern	_IP2
	.extern	_TR0
	.extern	_TR2
	.extern	_TR1
	.extern	_OSCSTA
	.extern	_IP3
	.extern	_VRECAL1
	.extern	_VRECTL
	.extern	_EIE1
	.extern	_EIE2
	.extern	_PCTL
	.extern	_OSCCTL
	.extern	_OSCCAL0
	.extern	_ANSEL
	.extern	_PP2
	.extern	_PWM2L
	.extern	_PWM2H
	.extern	_PUR0
	.extern	_IOCL
	.extern	_OSCCAL1
	.extern	_NVMDATAH
	.extern	_NVMDATAL
	.extern	_NVMADDRH
	.extern	_NVMADDRL
	.extern	_NVMCTL0
	.extern	_NVMCTL1
	.extern	_ADCDATA0L
	.extern	_ADCCTL1
	.extern	_T2CCRH
	.extern	_T2H
	.extern	_PP5H
	.extern	_PWM5H0
	.extern	_PWM5H1
	.extern	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_P3LR
	.extern	_TR3
	.extern	_EIE3
	.extern	_EIF3
	.extern	_OSCCAL2
	.extern	_OSCCAL3
	.extern	_ADCDATA1H
	.extern	_ADCDATA1L
	.extern	_PP5L
	.extern	_T2CCRL
	.extern	_PWM5L0
	.extern	_PWM5L1
	.extern	_PWM5CTL0
	.extern	_ADCINTCTL
	.extern	_ADCDATA2H
	.extern	_ADCDATA2L
	.extern	_PWM5CTL1
	.extern	_P5ASCTL
	.extern	_PSTRCTL
	.extern	_ADCDATA3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_INTEDGCTL
	.extern	_ADCDATA3L
	.extern	_VBIASCTL
	.extern	_VBIAS1EN
	.extern	_VBIAS2EN
	.extern	_PWM5OC
	.extern	_T2CTL1
	.extern	_VDAC
	.extern	_PWM5CTL2
	.extern	_PWMPC
	.extern	_RSCTL
	.extern	_TXSDR
	.extern	_RXSDR
	.extern	_BRCTL
	.extern	_TSCTL
	.extern	_EUBRGL
	.extern	_EUBRGH
	.extern	_SSCICTL0
	.extern	_SSCICTL1
	.extern	_SSCISTA
	.extern	_SSCIBUFR
	.extern	_SSCIMSK
	.extern	_WDTPS
	.extern	_MULAH
	.extern	_MULAL
	.extern	_MULBH
	.extern	_MULBL
	.extern	_MULCTL
	.extern	_MULRES3
	.extern	_MULRES2
	.extern	_MULRES1
	.extern	_MULRES0
	.extern	_DIVCTL
	.extern	_DIVAH
	.extern	_DIVAL
	.extern	_DIVB
	.extern	_DIVQH
	.extern	_DIVQL
	.extern	_DIVR
	.extern	_LEDCTL
	.extern	_LEDPRE
	.extern	_LEDDATA0
	.extern	_LEDDATA1
	.extern	_LEDDATA2
	.extern	_LEDDATA3
	.extern	_LEDDATA4
	.extern	_LEDDATA5
	.extern	_LEDDATA6
	.extern	_LEDDATA7
	.extern	_C1FILTCTL
	.extern	_C1FILTPRE
	.extern	_LEDOMS1
	.extern	_LEDODS0
	.extern	_LEDOMS0
	.extern	_LEDODS1
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_LEDLUM
	.extern	_PWM5FC
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL
	.extern	_startup
	.extern	__sdcc_gsinit_startup
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_init_mcu
	.global	_led_init
	.global	_Start_for_led
	.global	_Stop_for_led
	.global	_main
	.global	_int_fun0
	.global	_int_fun1
	.global	_L_1
	.global	_L_2
	.global	_L_3
	.global	_L_4
	.global	_timer
	.global	_work_flag
	.global	_ARR_List

	.global I0R1
	.global I0PSW
	.global I0PCH
	.global I1R1
	.global I1PSW
	.global I1PCH
	.global STK11
	.global STK10
	.global STK09
	.global STK08
	.global STK07
	.global STK06
	.global STK05
	.global STK04
	.global STK03
	.global STK02
	.global STK01
	.global STK00

sharebank .udata 0x0080
I0R1		.res 1
I0PSW		.res 1
I0PCH		.res 1
I1R1		.res 1
I1PSW		.res 1
I1PCH		.res 1
STK11	.res 1
	.type STK11, 108
STK10	.res 1
	.type STK10, 108
STK09	.res 1
	.type STK09, 108
STK08	.res 1
	.type STK08, 108
STK07	.res 1
	.type STK07, 108
STK06	.res 1
	.type STK06, 108
STK05	.res 1
	.type STK05, 108
STK04	.res 1
	.type STK04, 108
STK03	.res 1
	.type STK03, 108
STK02	.res 1
	.type STK02, 108
STK01	.res 1
	.type STK01, 108
STK00	.res 1
	.type STK00, 108

;--------------------------------------------------------
; global definitions
;--------------------------------------------------------
UD_main_0	.udata
_L_1	.res	1

UD_main_1	.udata
_L_2	.res	1

UD_main_2	.udata
_L_3	.res	1

UD_main_3	.udata
_L_4	.res	1

UD_main_4	.udata
_timer	.res	2

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_main_0	.udata
r0x1019	.res	1
UDL_main_1	.udata
r0x101A	.res	1
UDL_main_2	.udata
r0x101B	.res	1
UDL_main_3	.udata
r0x101C	.res	1
UDL_main_4	.udata
r0x101D	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------

ID_main_0	.idata
_work_flag
	.db	0x01


ID_main_1	.idata
_ARR_List
	.db	0xc0
	.db	0xf9
	.db	0xa4
	.db	0xb0
	.db	0x99
	.db	0x92
	.db	0x82
	.db	0xf8
	.db	0x80
	.db	0x90
	.db	0x88
	.db	0x83
	.db	0xa7
	.db	0xa1
	.db	0x86
	.db	0x8e
	.db	0xbf
	.db	0xff

;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
;	.udata_ovr
;--------------------------------------------------------
; reset vector 
;--------------------------------------------------------
STARTUP	.code 0x0000
	NOP
	PAGESEL	init_imp
	JMP		init_imp

	.global	init_imp
INIT_IMP	.code
init_imp
	PAGESEL	_startup
	CALL	_startup
	PAGESEL	__sdcc_gsinit_startup
	CALL	__sdcc_gsinit_startup
	PAGESEL	_main
	JMP		_main
;--------------------------------------------------------
; interrupt and initialization code
;--------------------------------------------------------
interrupt_0x04	.code	0x4
	MOV		R2,R0
	MOV		R3,BANK
	MOV		R0,PSW
	BANKSEL	I0PSW
	MOV		I0PSW,R0
	MOV		R0,PCH
	BANKSEL	I0PCH
	MOV		I0PCH,R0
	MOV		I0R1,R1
	PAGESEL	interrupt_service_routine_0x04
	JMP		interrupt_service_routine_0x04



func._int_fun0	.code
;***
;  PostBlock Stats: dbName = I
;***
;entry:  _int_fun0	;Function start
; 0 exit points
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_int_fun0	;Function start
; 0 exit points
;	op : GET_VALUE_AT_ADDRESS
; R3 resprent for wsave,R4 resprent for ssave, R5 resprent for psave
interrupt_service_routine_0x04
;	.line	187; "../main.c"	if(T0IF)
	BANKSEL	_INTCTL_bits
	JB	_INTCTL_bits, 2
	JMP	_00053_DS_
;	op : =
;	.line	189; "../main.c"	T0IF=0;
	BANKSEL	_INTCTL_bits
	CLR	_INTCTL_bits, 2
;	op : =
;	.line	190; "../main.c"	T0=0x64;
	MOV	R0,# 0x64
	BANKSEL	_T0
	MOV	_T0, R0
;	op : +
;	.line	192; "../main.c"	timer++;
	BANKSEL	_timer
	INC	_timer
	JB	PSW, 2
	JMP	_00052_DS_
	BANKSEL	_timer
	INC	(_timer + 1)
;	op : >
;swapping arguments (AOP_TYPEs 1/3)
;unsigned compare: left >= lit(0x51=81), size=2
_00052_DS_
;	.line	193; "../main.c"	if(timer>80)	// 加快慢控制
	MOV	R0,# 0x00
	BANKSEL	_timer
	SUB	R0, (_timer + 1)
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00047_DS_
	MOV	R0,# 0x51
	BANKSEL	_timer
	SUB	R0, _timer
_00047_DS_
	JB	PSW, 0
	JMP	_00053_DS_
;	op : =
;	.line	195; "../main.c"	timer=0;
	BANKSEL	_timer
	CLR	_timer
	BANKSEL	_timer
	CLR	(_timer + 1)
;	op : +
;	.line	197; "../main.c"	L_4++;
	BANKSEL	_L_4
	INC	_L_4
;	op : EQ_OP
;	.line	198; "../main.c"	if(L_4==10)
	BANKSEL	_L_4
	MOVZ	R0, _L_4
	XOR	R0,# 0x0a
	JB	PSW, 2
	JMP	_00053_DS_
;	op : =
;	.line	200; "../main.c"	L_4=0;
	BANKSEL	_L_4
	CLR	_L_4
;	op : +
;	.line	201; "../main.c"	L_3++;
	BANKSEL	_L_3
	INC	_L_3
;	op : EQ_OP
;	.line	202; "../main.c"	if(L_3==10)
	BANKSEL	_L_3
	MOVZ	R0, _L_3
	XOR	R0,# 0x0a
	JB	PSW, 2
	JMP	_00053_DS_
;	op : =
;	.line	204; "../main.c"	L_3=0;
	BANKSEL	_L_3
	CLR	_L_3
;	op : +
;	.line	205; "../main.c"	L_2++;
	BANKSEL	_L_2
	INC	_L_2
;	op : EQ_OP
;	.line	206; "../main.c"	if(L_2==10)
	BANKSEL	_L_2
	MOVZ	R0, _L_2
	XOR	R0,# 0x0a
	JB	PSW, 2
	JMP	_00053_DS_
;	op : =
;	.line	208; "../main.c"	L_2=0;
	BANKSEL	_L_2
	CLR	_L_2
;	op : +
;	.line	209; "../main.c"	L_1++;
	BANKSEL	_L_1
	INC	_L_1
;	op : EQ_OP
;	.line	210; "../main.c"	if(L_1==10)
	BANKSEL	_L_1
	MOVZ	R0, _L_1
;	.line	212; "../main.c"	L_1=0;
	XOR	R0,# 0x0a
	JB	PSW, 2
	JMP	_00053_DS_
	BANKSEL	_L_1
	CLR	_L_1
_00053_DS_
	BANKSEL	I0R1
	MOV	R1, I0R1
	BANKSEL	I0PCH
	MOV	R0, I0PCH
	MOV	PCH, R0
	BANKSEL	I0PSW
	MOV	R0, I0PSW
	MOV	PSW, R0
	MOV	BANK, R3
	MOV	R0, R2
	IRET	



func._int_fun1	.code
;***
;  PostBlock Stats: dbName = I
;***
;entry:  _int_fun1	;Function start
; 0 exit points
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_int_fun1	;Function start
; 0 exit points
;	op : LABEL
;	op : ENDFUNCTION
; R3 resprent for wsave,R4 resprent for ssave, R5 resprent for psave
interrupt_service_routine_0x14
_00048_DS_
;	.line	226; "../main.c"	}
	IRET	



func._main	.code
;***
;  PostBlock Stats: dbName = M
;***
;entry:  _main	;Function start
; 2 exit points
;has an exit
;functions called:
;   _init_mcu
;   _led_init
;   _Start_for_led
;   _Start_for_led
;   _Stop_for_led
;   _init_mcu
;   _led_init
;   _Start_for_led
;   _Start_for_led
;   _Stop_for_led
;5 compiler assigned registers:
;   r0x1019
;   r0x101A
;   r0x101B
;   r0x101C
;   r0x101D
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_main	;Function start
; 2 exit points
;	op : =
;	.line	146; "../main.c"	unsigned int timeA=0,timeB=0;
	BANKSEL	r0x1019
	CLR	r0x1019
	BANKSEL	r0x101A
	CLR	r0x101A
;	op : =
	BANKSEL	r0x101B
	CLR	r0x101B
	BANKSEL	r0x101C
	CLR	r0x101C
;	op : CALL
;	.line	148; "../main.c"	init_mcu();
	PAGESEL	_init_mcu
	CALL	_init_mcu
	PAGESEL	$
;	op : CALL
;	.line	149; "../main.c"	led_init();
	PAGESEL	_led_init
	CALL	_led_init
	PAGESEL	$
;	op : CALL
;	.line	150; "../main.c"	Start_for_led();// 优先LED显示
	PAGESEL	_Start_for_led
	CALL	_Start_for_led
	PAGESEL	$
;	op : =
;	.line	151; "../main.c"	P1LR2=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 2
;	op : LABEL
;	op : +
_00017_DS_
;	.line	154; "../main.c"	LEDDATA3=ARR_List[L_1];
	BANKSEL	_L_1
	MOV	R0, _L_1
	ADD	R0,# (_ARR_List + 0)
	BANKSEL	r0x101D
	MOV	r0x101D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x101D
	MOV	R1, r0x101D
	BANKSEL	_ARR_List
	LD	R0, [R1]
	BANKSEL	_LEDDATA3
	MOV	_LEDDATA3, R0
;	op : +
;	.line	155; "../main.c"	LEDDATA2=ARR_List[L_2];
	BANKSEL	_L_2
	MOV	R0, _L_2
	ADD	R0,# (_ARR_List + 0)
	BANKSEL	r0x101D
	MOV	r0x101D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x101D
	MOV	R1, r0x101D
	BANKSEL	_ARR_List
	LD	R0, [R1]
	BANKSEL	_LEDDATA2
	MOV	_LEDDATA2, R0
;	op : +
;	.line	156; "../main.c"	LEDDATA1=ARR_List[L_3];
	BANKSEL	_L_3
	MOV	R0, _L_3
	ADD	R0,# (_ARR_List + 0)
	BANKSEL	r0x101D
	MOV	r0x101D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x101D
	MOV	R1, r0x101D
	BANKSEL	_ARR_List
	LD	R0, [R1]
	BANKSEL	_LEDDATA1
	MOV	_LEDDATA1, R0
;	op : +
;	.line	157; "../main.c"	LEDDATA0=ARR_List[L_4];
	BANKSEL	_L_4
	MOV	R0, _L_4
	ADD	R0,# (_ARR_List + 0)
	BANKSEL	r0x101D
	MOV	r0x101D, R0
;	op : GET_VALUE_AT_ADDRESS
	BANKSEL	r0x101D
	MOV	R1, r0x101D
	BANKSEL	_ARR_List
	LD	R0, [R1]
	BANKSEL	_LEDDATA0
	MOV	_LEDDATA0, R0
;	op : +
;	.line	160; "../main.c"	timeA++;
	BANKSEL	r0x1019
	INC	r0x1019
	JB	PSW, 2
	JMP	_00050_DS_
	BANKSEL	r0x101A
	INC	r0x101A
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x4E21=20001), size=2
_00050_DS_
;	.line	161; "../main.c"	if(timeA>20000)
	MOV	R0,# 0x4e
	BANKSEL	r0x101A
	SUB	R0, r0x101A
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00025_DS_
	MOV	R0,# 0x21
	BANKSEL	r0x1019
	SUB	R0, r0x1019
_00025_DS_
	JB	PSW, 0
	JMP	_00017_DS_
;	op : =
;	.line	163; "../main.c"	timeA=0;
	BANKSEL	r0x1019
	CLR	r0x1019
	BANKSEL	r0x101A
	CLR	r0x101A
;	op : +
;	.line	164; "../main.c"	timeB++;
	BANKSEL	r0x101B
	INC	r0x101B
	JB	PSW, 2
	JMP	_00051_DS_
	BANKSEL	r0x101C
	INC	r0x101C
;	op : >
;swapping arguments (AOP_TYPEs 1/2)
;unsigned compare: left >= lit(0x6=6), size=2
_00051_DS_
;	.line	165; "../main.c"	if(timeB>5)
	MOV	R0,# 0x00
	BANKSEL	r0x101C
	SUB	R0, r0x101C
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00026_DS_
	MOV	R0,# 0x06
	BANKSEL	r0x101B
	SUB	R0, r0x101B
_00026_DS_
	JB	PSW, 0
	JMP	_00017_DS_
;	op : =
;	.line	167; "../main.c"	timeB=0;
	BANKSEL	r0x101B
	CLR	r0x101B
	BANKSEL	r0x101C
	CLR	r0x101C
;	op : IFX
;	.line	168; "../main.c"	if(!work_flag)
	MOV	R0,# 0x00
	BANKSEL	_work_flag
	ORL	R0, _work_flag
	JB	PSW, 2
	JMP	_00010_DS_
;	op : CALL
;	.line	170; "../main.c"	Start_for_led();
	PAGESEL	_Start_for_led
	CALL	_Start_for_led
	PAGESEL	$
;	op : =
;	.line	171; "../main.c"	P1LR2=0;
	BANKSEL	_P1LR_bits
	CLR	_P1LR_bits, 2
;	op : GOTO
	JMP	_00017_DS_
;	op : LABEL
;	op : CALL
_00010_DS_
;	.line	175; "../main.c"	Stop_for_led();
	PAGESEL	_Stop_for_led
	CALL	_Stop_for_led
	PAGESEL	$
;	op : =
;	.line	176; "../main.c"	P1LR2=1;
	BANKSEL	_P1LR_bits
	SET	_P1LR_bits, 2
;	op : GOTO
	JMP	_00017_DS_
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _main



func._Stop_for_led	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _Stop_for_led	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_Stop_for_led	;Function start
; 2 exit points
;	op : =
;	.line	139; "../main.c"	T0IE=0;
	BANKSEL	_INTCTL_bits
	CLR	_INTCTL_bits, 5
;	op : =
;	.line	140; "../main.c"	LEDCTL=0x00;
	BANKSEL	_LEDCTL
	CLR	_LEDCTL
;	op : =
;	.line	141; "../main.c"	work_flag=0;
	BANKSEL	_work_flag
	CLR	_work_flag
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _Stop_for_led



func._Start_for_led	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _Start_for_led	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_Start_for_led	;Function start
; 2 exit points
;	op : =
;	.line	119; "../main.c"	L_1=9;
	MOV	R0,# 0x09
	BANKSEL	_L_1
	MOV	_L_1, R0
;	op : =
;	.line	120; "../main.c"	L_2=9;
	MOV	R0,# 0x09
	BANKSEL	_L_2
	MOV	_L_2, R0
;	op : =
;	.line	121; "../main.c"	L_3=8;
	MOV	R0,# 0x08
	BANKSEL	_L_3
	MOV	_L_3, R0
;	op : =
;	.line	122; "../main.c"	L_4=7;
	MOV	R0,# 0x07
	BANKSEL	_L_4
	MOV	_L_4, R0
;	op : =
;	.line	123; "../main.c"	timer=0;
	BANKSEL	_timer
	CLR	_timer
	BANKSEL	_timer
	CLR	(_timer + 1)
;	op : =
;	.line	125; "../main.c"	LEDCTL=LED_WORK_MODE;
	MOV	R0,# 0x8c
	BANKSEL	_LEDCTL
	MOV	_LEDCTL, R0
;	op : =
;	.line	127; "../main.c"	T0=0x64;
	MOV	R0,# 0x64
	BANKSEL	_T0
	MOV	_T0, R0
;	op : =
;	.line	128; "../main.c"	T0IE=1;
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 5
;	op : =
;	.line	129; "../main.c"	work_flag=1;
	MOV	R0,# 0x01
	BANKSEL	_work_flag
	MOV	_work_flag, R0
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _Start_for_led



func._led_init	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _led_init	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_led_init	;Function start
; 2 exit points
;	op : =
;	.line	87; "../main.c"	LEDOMS0=0x00;			//LED-COMx端输出模式设置位
	BANKSEL	_LEDOMS0
	CLR	_LEDOMS0
;	op : =
;	.line	88; "../main.c"	LEDOMS1=0x00;			//LED-SEGx端输出模式设置位
	BANKSEL	_LEDOMS1
	CLR	_LEDOMS1
;	op : =
;	.line	90; "../main.c"	LEDODS0=0xFF;			//LED-COMx端开漏方式选择位
	MOV	R0,# 0xff
	BANKSEL	_LEDODS0
	MOV	_LEDODS0, R0
;	op : =
;	.line	91; "../main.c"	LEDODS1=0xFF;			//LED-SEGx端开漏方式选择位
	MOV	R0,# 0xff
	BANKSEL	_LEDODS1
	MOV	_LEDODS1, R0
;	op : =
;	.line	94; "../main.c"	LEDLUM=0x01;
	MOV	R0,# 0x01
	BANKSEL	_LEDLUM
	MOV	_LEDLUM, R0
;	op : =
;	.line	100; "../main.c"	LEDPRE=0x72;
	MOV	R0,# 0x72
	BANKSEL	_LEDPRE
	MOV	_LEDPRE, R0
;	op : GET_VALUE_AT_ADDRESS
;	.line	102; "../main.c"	LEDDATA3=ARR_List[10];								//千位
	BANKSEL	_ARR_List
	MOVZ	R0,  (_ARR_List + 10)
	BANKSEL	_LEDDATA3
	MOV	_LEDDATA3, R0
;	op : GET_VALUE_AT_ADDRESS
;	.line	103; "../main.c"	LEDDATA2=ARR_List[11];		 						//百位
	BANKSEL	_ARR_List
	MOVZ	R0,  (_ARR_List + 11)
	BANKSEL	_LEDDATA2
	MOV	_LEDDATA2, R0
;	op : GET_VALUE_AT_ADDRESS
;	.line	104; "../main.c"	LEDDATA1=ARR_List[12];					 			//十位
	BANKSEL	_ARR_List
	MOVZ	R0,  (_ARR_List + 12)
	BANKSEL	_LEDDATA1
	MOV	_LEDDATA1, R0
;	op : GET_VALUE_AT_ADDRESS
;	.line	105; "../main.c"	LEDDATA0=ARR_List[13];  //   0 亮 1灭，与共阴共阳无关 	//个位
	BANKSEL	_ARR_List
	MOVZ	R0,  (_ARR_List + 13)
	BANKSEL	_LEDDATA0
	MOV	_LEDDATA0, R0
;	op : =
;	.line	107; "../main.c"	LEDCTL=LED_WORK_MODE;  // 默认开启 显示  ABCD
	MOV	R0,# 0x8c
	BANKSEL	_LEDCTL
	MOV	_LEDCTL, R0
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _led_init



func._init_mcu	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _init_mcu	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_init_mcu	;Function start
; 2 exit points
;	op : =
;	.line	61; "../main.c"	OSCCTL = 0x60;           //8M
	MOV	R0,# 0x60
	BANKSEL	_OSCCTL
	MOV	_OSCCTL, R0
;	op : =
;	.line	64; "../main.c"	TR0 = 0x04;
	MOV	R0,# 0x04
	BANKSEL	_TR0
	MOV	_TR0, R0
;	op : =
;	.line	65; "../main.c"	TR1 = 0x00;
	BANKSEL	_TR1
	CLR	_TR1
;	op : =
;	.line	66; "../main.c"	TR2 = 0x00;
	BANKSEL	_TR2
	CLR	_TR2
;	op : =
;	.line	67; "../main.c"	TR3 = 0x00;  	// LED输出
	BANKSEL	_TR3
	CLR	_TR3
;	op : =
;	.line	69; "../main.c"	P0LR = 0X1B;	// COM 端高电平
	MOV	R0,# 0x1b
	BANKSEL	_P0LR
	MOV	_P0LR, R0
;	op : =
;	.line	70; "../main.c"	P1LR = 0X00;
	BANKSEL	_P1LR
	CLR	_P1LR
;	op : =
;	.line	71; "../main.c"	P2LR = 0X00;
	BANKSEL	_P2LR
	CLR	_P2LR
;	op : =
;	.line	72; "../main.c"	P3LR = 0X00;
	BANKSEL	_P3LR
	CLR	_P3LR
;	op : =
;	.line	74; "../main.c"	OPTR=0x44;		//使能上拉，T0计时模式，等待启动
	MOV	R0,# 0x44
	BANKSEL	_OPTR
	MOV	_OPTR, R0
;	op : =
;	.line	76; "../main.c"	AIE=1;
	BANKSEL	_INTCTL_bits
	SET	_INTCTL_bits, 7
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _init_mcu


;	code size estimation:
;	  192+  103 =   295 instructions (  796 byte)


	.end
