;--------------------------------------------------------
; File Created by ChiponCC : aolisn inc.
; Version 3.0.4#6752 (Mar  1 2016 15:13:08) (MSVC)
; This file was generated Tue May 31 17:23:26 2016
;--------------------------------------------------------
; chipon port for the 16-bit core
;--------------------------------------------------------
;	.file	"../main.c"
	.radix dec
	.include "KF8TS2716.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	_PWMCTL_bits
	.extern	_BANK_bits
	.extern	_ADSCANCTL_bits
	.extern	_ANSEH_bits
	.extern	_ADCCTL0_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	_CTCTL0_bits
	.extern	_ADCINTCTL_bits
	.extern	_PUR1_bits
	.extern	_PUR2_bits
	.extern	_CTCTL1_bits
	.extern	_INTEDGCTL_bits
	.extern	_VBIASCTL_bits
	.extern	_VBIAS1EN_bits
	.extern	_VBIAS2EN_bits
	.extern	_VDAC_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	_LEDOMS1_bits
	.extern	_LEDODS0_bits
	.extern	_LEDOMS0_bits
	.extern	_LEDODS1_bits
	.extern	_LEDLUM_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	_PWM1L
	.extern	_PWM1H
	.extern	_PWMCTL
	.extern	_PP1
	.extern	_BANK
	.extern	_ADSCANCTL
	.extern	_ANSEH
	.extern	_ADCDATA0H
	.extern	_ADCCTL0
	.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	_P0LR
	.extern	_P2LR
	.extern	_P1LR
	.extern	_P3LR
	.extern	_TR3
	.extern	_EIE3
	.extern	_EIF3
	.extern	_OSCCAL2
	.extern	_OSCCAL3
	.extern	_T3L
	.extern	_ADCDATA1H
	.extern	_ADCDATA1L
	.extern	_CTCTL0
	.extern	_ADCINTCTL
	.extern	_ADCDATA2H
	.extern	_ADCDATA2L
	.extern	_ADCDATA3H
	.extern	_T3H
	.extern	_PUR1
	.extern	_PUR2
	.extern	_CTCTL1
	.extern	_INTEDGCTL
	.extern	_ADCDATA3L
	.extern	_VBIASCTL
	.extern	_VBIAS1EN
	.extern	_VBIAS2EN
	.extern	_VDAC
	.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	_LEDOMS1
	.extern	_LEDODS0
	.extern	_LEDOMS0
	.extern	_LEDODS1
	.extern	_VRECAL2
	.extern	_VRECAL3
	.extern	_LEDLUM
	.extern	_T4L
	.extern	_T4H
	.extern	_T4REL
	.extern	_T4REH
	.extern	_T4CTL
	.extern	_RC32KCAL
	.extern	__R2PCL
	.extern	_startup
	.extern	__sdcc_gsinit_startup
;--------------------------------------------------------
; global declarations
;--------------------------------------------------------
	.global	_delay_ms
	.global	_init_mcu
	.global	_init_led
	.global	_display_LED
	.global	_main
	.global	_display_data
	.global	_temp_data
	.global	_unint
	.global	_decade
	.global	_hundred
	.global	_thound
	.global	_smg_arr
	.global	_Led_Power_Code

	.global I0R1
	.global I0R7
	.global I0PSW
	.global I0PCH
	.global I1R1
	.global I1R7
	.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
I0R1		.res 1
I0R7		.res 1
I0PSW		.res 1
I0PCH		.res 1
I1R1		.res 1
I1R7		.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
_display_data	.res	2

UD_main_1	.udata
_temp_data	.res	2

UD_main_2	.udata
_unint	.res	1

UD_main_3	.udata
_decade	.res	1

UD_main_4	.udata
_hundred	.res	1

UD_main_5	.udata
_thound	.res	1

;--------------------------------------------------------
; absolute symbol definitions
;--------------------------------------------------------
;--------------------------------------------------------
; compiler-defined variables
;--------------------------------------------------------
UDL_main_0	.udata
r0x1009	.res	1
UDL_main_1	.udata
r0x1008	.res	1
UDL_main_2	.udata
r0x100A	.res	1
UDL_main_3	.udata
r0x100B	.res	1
UDL_main_4	.udata
r0x100C	.res	1
UDL_main_5	.udata
r0x100D	.res	1
UDL_main_6	.udata
r0x100E	.res	1
UDL_main_7	.udata
r0x100F	.res	1
UDL_main_8	.udata
r0x1010	.res	1
UDL_main_9	.udata
r0x1011	.res	1
;--------------------------------------------------------
; initialized data
;--------------------------------------------------------

ID_main_0	.code
_smg_arr
	RRET R0, #0xa0
	RRET R0, #0xbe
	RRET R0, #0x62
	RRET R0, #0x2a
	RRET R0, #0x3c
	RRET R0, #0x29
	RRET R0, #0x21
	RRET R0, #0xba
	RRET R0, #0x20
	RRET R0, #0x28
	RRET R0, #0xff
	RRET R0, #0xdf


ID_main_1	.code
_Led_Power_Code
	RRET R0, #0xc8
	RRET R0, #0x00
	RRET R0, #0x90
	RRET R0, #0x01
	RRET R0, #0x20
	RRET R0, #0x03
	RRET R0, #0xe8
	RRET R0, #0x03
	RRET R0, #0x14
	RRET R0, #0x05
	RRET R0, #0x40
	RRET R0, #0x06
	RRET R0, #0x08
	RRET R0, #0x07
	RRET R0, #0x34
	RRET R0, #0x08

;--------------------------------------------------------
; 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


func._main	.code
;***
;  PostBlock Stats: dbName = M
;***
;entry:  _main	;Function start
; 2 exit points
;has an exit
;functions called:
;   _init_mcu
;   _init_led
;   __R2PCL
;   __R2PCL
;   _delay_ms
;   _display_LED
;   _init_mcu
;   _init_led
;   __R2PCL
;   __R2PCL
;   _delay_ms
;   _display_LED
;5 compiler assigned registers:
;   r0x100E
;   r0x100F
;   r0x1010
;   r0x1011
;   STK00
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_main	;Function start
; 2 exit points
;	op : =
;	.line	150; "../main.c"	int i=0;
	BANKSEL	r0x100E
	CLR	r0x100E
	BANKSEL	r0x100F
	CLR	r0x100F
;	op : CALL
;	.line	151; "../main.c"	init_mcu();
	PAGESEL	_init_mcu
	CALL	_init_mcu
	PAGESEL	$
;	op : CALL
;	.line	152; "../main.c"	init_led();
	PAGESEL	_init_led
	CALL	_init_led
	PAGESEL	$
;	op : LABEL
;	op : <
;signed compare: left < lit(0x7=7), size=2, mask=ffff
_00044_DS_
;	.line	155; "../main.c"	if(i<7)
	BANKSEL	r0x100F
	MOVZ	R0, r0x100F
	ADD	R0,# 0x80
	ADD	R0,# 0x80
;comparing bytes at offset 1
	JB	PSW, 2
	JMP	_00050_DS_
	MOV	R0,# 0x07
	BANKSEL	r0x100E
	SUB	R0, r0x100E
_00050_DS_
	JNB	PSW, 0
	JMP	_00041_DS_
;	op : +
;	.line	157; "../main.c"	i++;
	BANKSEL	r0x100E
	INC	r0x100E
	JB	PSW, 2
	JMP	_00051_DS_
	BANKSEL	r0x100F
	INC	r0x100F
;	op : GOTO
_00051_DS_
	JMP	_00042_DS_
;	op : LABEL
;	op : =
_00041_DS_
;	.line	161; "../main.c"	i=0;
	BANKSEL	r0x100E
	CLR	r0x100E
	BANKSEL	r0x100F
	CLR	r0x100F
;	op : LABEL
;	op : LEFT_OP
_00042_DS_
;	.line	163; "../main.c"	display_data = Led_Power_Code[i];
	CLR	PSW, 0
	BANKSEL	r0x100E
	RLCR	r0x100E
	BANKSEL	r0x1010
	MOV	r0x1010, R0
	BANKSEL	r0x100F
	RLCR	r0x100F
	BANKSEL	r0x1011
	MOV	r0x1011, R0
;	op : +
	MOV	R0,# (_Led_Power_Code + 0)
	BANKSEL	r0x1010
	ADD	r0x1010, R0
	MOV	R0,# high (_Led_Power_Code + 0)
	AND	R0,# 0xff
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00052_DS_
	BANKSEL	r0x1011
	ADD	r0x1011, R0
;	op : GET_VALUE_AT_ADDRESS
_00052_DS_
	BANKSEL	r0x1011
	MOV	R1, r0x1011
	BANKSEL	r0x1010
	MOV	R0, r0x1010
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	_display_data
	MOV	_display_data, R0
	BANKSEL	r0x1011
	MOV	R1, r0x1011
	BANKSEL	r0x1010
	MOV	R0, r0x1010
	ADD	R0,# 0x01
	JNB	PSW, 0
	INC	R1
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	_display_data
	MOV	(_display_data + 1), R0
;	op : SEND
;	op : CALL
;	.line	164; "../main.c"	delay_ms(2000);
	MOV	R0,# 0xd0
	BANKSEL	STK00
	MOV	STK00, R0
	MOV	R0,# 0x07
	PAGESEL	_delay_ms
	CALL	_delay_ms
	PAGESEL	$
;	op : CALL
;	.line	165; "../main.c"	display_LED();
	PAGESEL	_display_LED
	CALL	_display_LED
	PAGESEL	$
;	op : GOTO
	JMP	_00044_DS_
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _main



func._display_LED	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _display_LED	;Function start
; 2 exit points
;has an exit
;functions called:
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;   __R2PCL
;5 compiler assigned registers:
;   r0x1008
;   r0x1009
;   r0x100A
;   r0x100B
;   r0x100C
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_display_LED	;Function start
; 2 exit points
;	op : RIGHT_OP
;	.line	112; "../main.c"	DIVAH = display_data>>8;
	BANKSEL	_display_data
	MOVZ	R0, (_display_data + 1)
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	BANKSEL	r0x1009
	CLR	r0x1009
	BANKSEL	r0x1008
	JB	r0x1008, 7
	JMP	_00053_DS_
	BANKSEL	r0x1009
	DEC	r0x1009
;	op : CAST
_00053_DS_
	BANKSEL	r0x1008
	MOVZ	R0, r0x1008
	BANKSEL	_DIVAH
	MOV	_DIVAH, R0
;	op : CAST
;	.line	113; "../main.c"	DIVAL = display_data;
	BANKSEL	_display_data
	MOVZ	R0, _display_data
	BANKSEL	_DIVAL
	MOV	_DIVAL, R0
;	op : =
;	.line	114; "../main.c"	DIVB = 10;
	MOV	R0,# 0x0a
	BANKSEL	_DIVB
	MOV	_DIVB, R0
;	op : =
;	.line	115; "../main.c"	DIVEN = 1;
	BANKSEL	_DIVCTL_bits
	SET	_DIVCTL_bits, 0
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00018_DS_
;	.line	116; "../main.c"	while(!DIVOEN);
	BANKSEL	_DIVCTL_bits
	JB	_DIVCTL_bits, 1
	JMP	_00018_DS_
;	op : =
;	.line	117; "../main.c"	unint = DIVR;   //	取余数
	BANKSEL	_DIVR
	MOVZ	R0, _DIVR
	BANKSEL	_unint
	MOV	_unint, R0
;	op : CAST
;	.line	118; "../main.c"	temp_data = DIVQH;
	BANKSEL	_DIVQH
	MOVZ	R0, _DIVQH
	BANKSEL	_temp_data
	MOV	_temp_data, R0
	BANKSEL	_temp_data
	CLR	(_temp_data + 1)
;	op : LEFT_OP
;	.line	119; "../main.c"	temp_data = (temp_data<<8) + DIVQL;
	BANKSEL	_temp_data
	MOVZ	R0, _temp_data
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	BANKSEL	r0x1008
	CLR	r0x1008
;	op : =
	BANKSEL	_DIVQL
	MOVZ	R0, _DIVQL
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	r0x100B
	MOV	r0x100B, R0
	BANKSEL	r0x100C
	CLR	r0x100C
;	op : +
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	BANKSEL	r0x100B
	ADD	R0, r0x100B
	BANKSEL	_temp_data
	MOV	_temp_data, R0
	BANKSEL	r0x1009
	MOV	R0, r0x1009
	BANKSEL	_temp_data
	MOV	(_temp_data + 1), R0
	MOV	R0,# 0x00
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00054_DS_
	BANKSEL	_temp_data
	ADD	(_temp_data + 1), R0
;	op : RIGHT_OP
_00054_DS_
;	.line	120; "../main.c"	DIVAH = temp_data>>8;
	BANKSEL	_temp_data
	MOVZ	R0, (_temp_data + 1)
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	BANKSEL	r0x1009
	CLR	r0x1009
;	op : CAST
	BANKSEL	r0x1008
	MOVZ	R0, r0x1008
	BANKSEL	_DIVAH
	MOV	_DIVAH, R0
;	op : CAST
;	.line	121; "../main.c"	DIVAL = temp_data;
	BANKSEL	_temp_data
	MOVZ	R0, _temp_data
	BANKSEL	_DIVAL
	MOV	_DIVAL, R0
;	op : =
;	.line	122; "../main.c"	DIVB = 10;
	MOV	R0,# 0x0a
	BANKSEL	_DIVB
	MOV	_DIVB, R0
;	op : =
;	.line	123; "../main.c"	DIVEN = 1;
	BANKSEL	_DIVCTL_bits
	SET	_DIVCTL_bits, 0
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00021_DS_
;	.line	124; "../main.c"	while(!DIVOEN);
	BANKSEL	_DIVCTL_bits
	JB	_DIVCTL_bits, 1
	JMP	_00021_DS_
;	op : =
;	.line	125; "../main.c"	decade = DIVR;   //	取余数
	BANKSEL	_DIVR
	MOVZ	R0, _DIVR
	BANKSEL	_decade
	MOV	_decade, R0
;	op : CAST
;	.line	126; "../main.c"	temp_data = DIVQH;
	BANKSEL	_DIVQH
	MOVZ	R0, _DIVQH
	BANKSEL	_temp_data
	MOV	_temp_data, R0
	BANKSEL	_temp_data
	CLR	(_temp_data + 1)
;	op : LEFT_OP
;	.line	127; "../main.c"	temp_data = (temp_data<<8) + DIVQL;
	BANKSEL	_temp_data
	MOVZ	R0, _temp_data
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	BANKSEL	r0x1008
	CLR	r0x1008
;	op : =
	BANKSEL	_DIVQL
	MOVZ	R0, _DIVQL
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	r0x100B
	MOV	r0x100B, R0
	BANKSEL	r0x100C
	CLR	r0x100C
;	op : +
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	BANKSEL	r0x100B
	ADD	R0, r0x100B
	BANKSEL	_temp_data
	MOV	_temp_data, R0
	BANKSEL	r0x1009
	MOV	R0, r0x1009
	BANKSEL	_temp_data
	MOV	(_temp_data + 1), R0
	MOV	R0,# 0x00
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00055_DS_
	BANKSEL	_temp_data
	ADD	(_temp_data + 1), R0
;	op : RIGHT_OP
_00055_DS_
;	.line	128; "../main.c"	DIVAH = temp_data>>8;
	BANKSEL	_temp_data
	MOVZ	R0, (_temp_data + 1)
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	BANKSEL	r0x1009
	CLR	r0x1009
;	op : CAST
	BANKSEL	r0x1008
	MOVZ	R0, r0x1008
	BANKSEL	_DIVAH
	MOV	_DIVAH, R0
;	op : CAST
;	.line	129; "../main.c"	DIVAL = temp_data;
	BANKSEL	_temp_data
	MOVZ	R0, _temp_data
	BANKSEL	_DIVAL
	MOV	_DIVAL, R0
;	op : =
;	.line	130; "../main.c"	DIVB = 10;
	MOV	R0,# 0x0a
	BANKSEL	_DIVB
	MOV	_DIVB, R0
;	op : =
;	.line	131; "../main.c"	DIVEN = 1;
	BANKSEL	_DIVCTL_bits
	SET	_DIVCTL_bits, 0
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00024_DS_
;	.line	132; "../main.c"	while(!DIVOEN);
	BANKSEL	_DIVCTL_bits
	JB	_DIVCTL_bits, 1
	JMP	_00024_DS_
;	op : =
;	.line	133; "../main.c"	hundred = DIVR;
	BANKSEL	_DIVR
	MOVZ	R0, _DIVR
	BANKSEL	_hundred
	MOV	_hundred, R0
;	op : CAST
;	.line	134; "../main.c"	temp_data = DIVQH;
	BANKSEL	_DIVQH
	MOVZ	R0, _DIVQH
	BANKSEL	_temp_data
	MOV	_temp_data, R0
	BANKSEL	_temp_data
	CLR	(_temp_data + 1)
;	op : LEFT_OP
;	.line	135; "../main.c"	temp_data = (temp_data<<8) + DIVQL;
	BANKSEL	_temp_data
	MOVZ	R0, _temp_data
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	BANKSEL	r0x1008
	CLR	r0x1008
;	op : =
	BANKSEL	_DIVQL
	MOVZ	R0, _DIVQL
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	r0x100B
	MOV	r0x100B, R0
	BANKSEL	r0x100C
	CLR	r0x100C
;	op : +
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	BANKSEL	r0x100B
	ADD	R0, r0x100B
	BANKSEL	_temp_data
	MOV	_temp_data, R0
	BANKSEL	r0x1009
	MOV	R0, r0x1009
	BANKSEL	_temp_data
	MOV	(_temp_data + 1), R0
	MOV	R0,# 0x00
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00056_DS_
	BANKSEL	_temp_data
	ADD	(_temp_data + 1), R0
;	op : RIGHT_OP
_00056_DS_
;	.line	136; "../main.c"	DIVAH = temp_data>>8;
	BANKSEL	_temp_data
	MOVZ	R0, (_temp_data + 1)
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	BANKSEL	r0x1009
	CLR	r0x1009
;	op : CAST
	BANKSEL	r0x1008
	MOVZ	R0, r0x1008
	BANKSEL	_DIVAH
	MOV	_DIVAH, R0
;	op : CAST
;	.line	137; "../main.c"	DIVAL = temp_data;
	BANKSEL	_temp_data
	MOVZ	R0, _temp_data
	BANKSEL	_DIVAL
	MOV	_DIVAL, R0
;	op : =
;	.line	138; "../main.c"	DIVB = 10;
	MOV	R0,# 0x0a
	BANKSEL	_DIVB
	MOV	_DIVB, R0
;	op : =
;	.line	139; "../main.c"	DIVEN = 1;
	BANKSEL	_DIVCTL_bits
	SET	_DIVCTL_bits, 0
;	op : LABEL
;	op : GET_VALUE_AT_ADDRESS
_00027_DS_
;	.line	140; "../main.c"	while(!DIVOEN);
	BANKSEL	_DIVCTL_bits
	JB	_DIVCTL_bits, 1
	JMP	_00027_DS_
;	op : =
;	.line	141; "../main.c"	thound = DIVR;
	BANKSEL	_DIVR
	MOVZ	R0, _DIVR
	BANKSEL	_thound
	MOV	_thound, R0
;	op : +
;	.line	142; "../main.c"	LEDDATA0 = smg_arr[thound];
	MOV	R0,# (_smg_arr + 0)
	BANKSEL	_thound
	ADD	R0, _thound
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	MOV	R0,# high (_smg_arr + 0)
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	CLR	R0
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00057_DS_
	BANKSEL	r0x1009
	ADD	r0x1009, R0
;	op : GET_VALUE_AT_ADDRESS
_00057_DS_
	BANKSEL	r0x1009
	MOV	R1, r0x1009
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	_LEDDATA0
	MOV	_LEDDATA0, R0
;	op : +
;	.line	143; "../main.c"	LEDDATA2 = smg_arr[hundred];
	MOV	R0,# (_smg_arr + 0)
	BANKSEL	_hundred
	ADD	R0, _hundred
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	MOV	R0,# high (_smg_arr + 0)
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	CLR	R0
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00058_DS_
	BANKSEL	r0x1009
	ADD	r0x1009, R0
;	op : GET_VALUE_AT_ADDRESS
_00058_DS_
	BANKSEL	r0x1009
	MOV	R1, r0x1009
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	_LEDDATA2
	MOV	_LEDDATA2, R0
;	op : +
;	.line	144; "../main.c"	LEDDATA3 = smg_arr[decade];
	MOV	R0,# (_smg_arr + 0)
	BANKSEL	_decade
	ADD	R0, _decade
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	MOV	R0,# high (_smg_arr + 0)
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	CLR	R0
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00059_DS_
	BANKSEL	r0x1009
	ADD	r0x1009, R0
;	op : GET_VALUE_AT_ADDRESS
_00059_DS_
	BANKSEL	r0x1009
	MOV	R1, r0x1009
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	_LEDDATA3
	MOV	_LEDDATA3, R0
;	op : +
;	.line	145; "../main.c"	LEDDATA4 = smg_arr[unint];
	MOV	R0,# (_smg_arr + 0)
	BANKSEL	_unint
	ADD	R0, _unint
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	MOV	R0,# high (_smg_arr + 0)
	BANKSEL	r0x1009
	MOV	r0x1009, R0
	CLR	R0
	JNB	PSW, 0
	INC	R0
	JNB	PSW, 2
	JMP	_00060_DS_
	BANKSEL	r0x1009
	ADD	r0x1009, R0
;	op : GET_VALUE_AT_ADDRESS
_00060_DS_
	BANKSEL	r0x1009
	MOV	R1, r0x1009
	BANKSEL	r0x1008
	MOV	R0, r0x1008
	PAGESEL	__R2PCL
	CALL	__R2PCL
	PAGESEL	$
	BANKSEL	r0x100A
	MOV	r0x100A, R0
;	op : CAST
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	_LEDDATA4
	MOV	_LEDDATA4, R0
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _display_LED



func._init_led	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _init_led	;Function start
; 2 exit points
;has an exit
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_init_led	;Function start
; 2 exit points
;	op : =
;	.line	92; "../main.c"	LEDOMS0 = 0x00;    //推挽输出
	BANKSEL	_LEDOMS0
	CLR	_LEDOMS0
;	op : =
;	.line	93; "../main.c"	LEDOMS1 = 0x00;    //推挽输出
	BANKSEL	_LEDOMS1
	CLR	_LEDOMS1
;	op : =
;	.line	95; "../main.c"	LEDPRE = 0x60;     //LED时钟源选择1:64分频；LED预分频比选择1:1 500hz
	MOV	R0,# 0x60
	BANKSEL	_LEDPRE
	MOV	_LEDPRE, R0
;	op : =
;	.line	96; "../main.c"	LEDDATA0 = 0XFF;
	MOV	R0,# 0xff
	BANKSEL	_LEDDATA0
	MOV	_LEDDATA0, R0
;	op : =
;	.line	97; "../main.c"	LEDDATA2 = 0XFF;
	MOV	R0,# 0xff
	BANKSEL	_LEDDATA2
	MOV	_LEDDATA2, R0
;	op : =
;	.line	98; "../main.c"	LEDDATA3 = 0XFF;
	MOV	R0,# 0xff
	BANKSEL	_LEDDATA3
	MOV	_LEDDATA3, R0
;	op : =
;	.line	99; "../main.c"	LEDDATA4 = 0XFF;
	MOV	R0,# 0xff
	BANKSEL	_LEDDATA4
	MOV	_LEDDATA4, R0
;	op : =
;	.line	101; "../main.c"	LEDLUM = 0x05;	 //设置辉度6:16
	MOV	R0,# 0x05
	BANKSEL	_LEDLUM
	MOV	_LEDLUM, R0
;	op : =
;	.line	102; "../main.c"	LEDCTL = 0x90;   //打开LED模块，开通LEDDAT0--LEDDAT4;选择共阴数码管
	MOV	R0,# 0x90
	BANKSEL	_LEDCTL
	MOV	_LEDCTL, R0
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _init_led



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	67; "../main.c"	OSCCTL = 0x60;          //设置为8M
	MOV	R0,# 0x60
	BANKSEL	_OSCCTL
	MOV	_OSCCTL, R0
;	op : =
;	.line	69; "../main.c"	TR0 = 0X04;            //P02设置为输入，其余口为输出
	MOV	R0,# 0x04
	BANKSEL	_TR0
	MOV	_TR0, R0
;	op : =
;	.line	70; "../main.c"	TR1 = 0x00;            //P1设置为输出
	BANKSEL	_TR1
	CLR	_TR1
;	op : =
;	.line	71; "../main.c"	TR2 = 0X00;            //P2设置为输出
	BANKSEL	_TR2
	CLR	_TR2
;	op : =
;	.line	72; "../main.c"	TR3 = 0X00;            //P3设置为输出
	BANKSEL	_TR3
	CLR	_TR3
;	op : =
;	.line	74; "../main.c"	P0LR=0x00;				//P0输出低
	BANKSEL	_P0LR
	CLR	_P0LR
;	op : =
;	.line	75; "../main.c"	P1LR=0x00;              //P1输出低
	BANKSEL	_P1LR
	CLR	_P1LR
;	op : =
;	.line	76; "../main.c"	P2LR=0x00;				//P2输出低
	BANKSEL	_P2LR
	CLR	_P2LR
;	op : =
;	.line	77; "../main.c"	P3LR=0x00;				//P3输出低
	BANKSEL	_P3LR
	CLR	_P3LR
;	op : =
;	.line	79; "../main.c"	P0=0x00;
	BANKSEL	_P0
	CLR	_P0
;	op : =
;	.line	80; "../main.c"	P1=0x00;
	BANKSEL	_P1
	CLR	_P1
;	op : =
;	.line	81; "../main.c"	P2=0x00;
	BANKSEL	_P2
	CLR	_P2
;	op : =
;	.line	82; "../main.c"	P3=0x00;
	BANKSEL	_P3
	CLR	_P3
;	op : LABEL
;	op : ENDFUNCTION
	CRET	
; exit point of _init_mcu



func._delay_ms	.code
;***
;  PostBlock Stats: dbName = C
;***
;entry:  _delay_ms	;Function start
; 2 exit points
;has an exit
;7 compiler assigned registers:
;   r0x1008
;   STK00
;   r0x1009
;   r0x100A
;   r0x100B
;   r0x100C
;   r0x100D
;; Starting PostCode block
;	op : LABEL
;	op : FUNCTION
_delay_ms	;Function start
; 2 exit points
;	op : RECEIVE
;	.line	48; "../main.c"	void delay_ms(int ms_data)
	BANKSEL	r0x1008
	MOV	r0x1008, R0
	BANKSEL	STK00
	MOVZ	R0, STK00
	BANKSEL	r0x1009
	MOV	r0x1009, R0
;	op : =
;	op : LABEL
;	op : =
_00004_DS_
;	.line	51; "../main.c"	while(ms_data--)
	BANKSEL	r0x1009
	MOVZ	R0, r0x1009
	BANKSEL	r0x100A
	MOV	r0x100A, R0
	BANKSEL	r0x1008
	MOVZ	R0, r0x1008
	BANKSEL	r0x100B
	MOV	r0x100B, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x1009
	ADD	r0x1009, R0
	JNB	PSW, 0
	JMP	_00061_DS_
	BANKSEL	r0x1008
	DEC	r0x1008
;	op : IFX
_00061_DS_
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	r0x100B
	ORL	R0, r0x100B
	JNB	PSW, 2
	JMP	_00007_DS_
;	op : INLINEASM
	CWDT 
;	op : =
;	.line	55; "../main.c"	while(j--);
	MOV	R0,# 0x64
	BANKSEL	r0x100A
	MOV	r0x100A, R0
	BANKSEL	r0x100B
	CLR	r0x100B
;	op : LABEL
;	op : =
_00001_DS_
	BANKSEL	r0x100A
	MOVZ	R0, r0x100A
	BANKSEL	r0x100C
	MOV	r0x100C, R0
	BANKSEL	r0x100B
	MOVZ	R0, r0x100B
	BANKSEL	r0x100D
	MOV	r0x100D, R0
;	op : -
	MOV	R0,# 0xff
	BANKSEL	r0x100A
	ADD	r0x100A, R0
	JNB	PSW, 0
	JMP	_00062_DS_
	BANKSEL	r0x100B
	DEC	r0x100B
;	op : IFX
_00062_DS_
	BANKSEL	r0x100C
	MOVZ	R0, r0x100C
	BANKSEL	r0x100D
	ORL	R0, r0x100D
	JNB	PSW, 2
	JMP	_00004_DS_
;	op : GOTO
	JMP	_00001_DS_
;	op : LABEL
;	op : ENDFUNCTION
_00007_DS_
	CRET	
; exit point of _delay_ms


;	code size estimation:
;	  333+  201 =   534 instructions ( 1470 byte)


	.end
