; Asm codes generated by Shanghai Haier C Compiler
; HRCO, Ver: 1.0,0117

#INCLUDE       	<ES7P0693.INC>
#INCLUDE       	<OPERATION.INC>
	PUBLIC         	_Duty
	PUBLIC         	_RAMclear
	PUBLIC         	_GPIOInit
	PUBLIC         	_isr
	PUBLIC         	_main
_isr_#T20433_7	EQU            	_isrDATA + 0X0		; Bank 0
_isr_#T20440_7	EQU            	_isrDATA + 0X0		; Bank 0
#TMP	EQU            	?_TMP+ 0X3		; Bank 0
?_TMP_RET	EQU            	?_TMP		; Bank 0
_T21TR_0#sh	EQU            	0X74F		; Bank 0
_T21EN_0#sh	EQU            	0X797		; Bank 0
_T21OC_0#sh	EQU            	0XE9		; Bank 0
_T21PL_0#sh	EQU            	0XEC		; Bank 0
_T21PH_0#sh	EQU            	0XED		; Bank 0
_T21R0L_0#sh	EQU            	0XEE		; Bank 0
_T21R0H_0#sh	EQU            	0XEF		; Bank 0
_T21CL_0#sh	EQU            	0XF0		; Bank 0
_T21CM_0#sh	EQU            	0XF1		; Bank 0
_T21R1L_0#sh	EQU            	0XF3		; Bank 0
_T21R1H_0#sh	EQU            	0XF4		; Bank 0
_T21R2L_0#sh	EQU            	0XF5		; Bank 0
_T21R2H_0#sh	EQU            	0XF6		; Bank 0
_MULA_0#sh	EQU            	(MULA - 0X6080) % 0X40 + 0xC0		; Bank 0
_MULB_0#sh	EQU            	(MULB - 0X6080) % 0X40 + 0xC0		; Bank 0
_MULL_0#sh	EQU            	(MULL - 0X6080) % 0X40 + 0xC0		; Bank 0
_MULH_0#sh	EQU            	(MULH - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEL_0#sh	EQU            	(DIVEL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEM_0#sh	EQU            	(DIVEM - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVSL_0#sh	EQU            	(DIVSL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVSH_0#sh	EQU            	(DIVSH - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVQL_0#sh	EQU            	(DIVQL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVQM_0#sh	EQU            	(DIVQM - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVRL_0#sh	EQU            	(DIVRL - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVRH_0#sh	EQU            	(DIVRH - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVC_0#sh	EQU            	(DIVC - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEU_0#sh	EQU            	(DIVEU - 0X6080) % 0X40 + 0xC0		; Bank 0
_DIVEH_0#sh	EQU            	(DIVEH - 0X6080) % 0X40 + 0xC0		; Bank 0
	_DESC          	RAMclear,0X0,0X0
RAMclear#	CSEG           
_RAMclear
; /*******************************************************
; *Copytight(C),2017,Shanghai Eastsoft Microelectronics Co.,Ltd.
; *文件名：pwm_multiprecision.c
; *作  者：AE Team
; *版  本：v1.0，编译于iDesigner(v4.2.3.166) + 工具链HRCC(v1.2.0.106)
; *日  期：2020/12/17
; *描  述：PWM模式计数时钟源选择INTHRC，T21多精度pwm模式，T21_CH0(PA0)和T21_CH1(PA7)输出pwm互补波形，T21_CH2(PB7)输出占空比连续变化的pwm波形
; *备  注：适用于ES7P0693，本例程仅供参考
; 本软件仅供学习和演示使用，对用户直接引用代码所带来的风险或后果不承担任何法律责任。
; *******************************************************/
; #include <hic.h>
; #define CLRWDT()   {__Asm CWDT;}        //宏定义清狗指令
; unsigned int Duty;        //T21 pwm2占空比
; /******************************************************
; 函数名：void RAMclear(void)
; 描  述：RAM区数据清零，RAM区地址0x0000~0x03FF
; 输入值：无
; 输出值：无
; 返回值：无
; *******************************************************/
; void RAMclear(void)
; {
#line 26	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     for (IAAH=0; IAAH<=0x03; IAAH++)
	CLR            	BKSR
;   26:(    ASGN_1,          0 ,            ,      IAAH)

; ITemplate_CLR1_4_TMP
	CLR            	_IAAH_0
;   26:(     LABEL,    #L20268 ,            ,          )

; ITemplate_LABEL
#L20268
;   26:(    JGT_1U,       IAAH ,          3 ,   #L20345)

; ITemplate_JGT1_4U
	MOV            	_IAAH_0,	0x0
	SUBI           	0x3
	JBS            	PSW,	0x0
	GOTO           	#L20345
;     {
#line 28	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         for (IAAL=0; IAAL<0xFF; IAAL++)
;   28:(    ASGN_1,          0 ,            ,      IAAL)

; ITemplate_CLR1_4_TMP
	CLR            	_IAAL_0
;   28:(     LABEL,    #L20285 ,            ,          )

; ITemplate_LABEL
#L20285
;   28:(    JGE_1U,       IAAL ,        255 ,   #L20286)

; ITemplate_JGE1_4U
	MOVI           	0xff
	SUB            	_IAAL_0,	0x0
	JBC            	PSW,	0x0
	GOTO           	#L20286
#line 29	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;             IAD = 0x00;
;   29:(    ASGN_1,          0 ,            ,       IAD)

; ITemplate_CLR1_4_TMP
	CLR            	_IAD_0
;   28:(     ADD_1,       IAAL ,          1 ,      IAAL)

; ITemplate_INC_1_TMP
	INC            	_IAAL_0
;   29:(       JMP,            ,            ,   #L20285)

; ITemplate_JMP
	GOTO           	#L20285
;   29:(     LABEL,    #L20286 ,            ,          )

; ITemplate_LABEL
#L20286
#line 30	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         IAD = 0x00;
;   30:(    ASGN_1,          0 ,            ,       IAD)

; ITemplate_CLR1_4_TMP
	CLR            	_IAD_0
;   26:(     ADD_1,       IAAH ,          1 ,      IAAH)

; ITemplate_INC_1_TMP
	INC            	_IAAH_0
#line 31	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     }
;   31:(       JMP,            ,            ,   #L20268)

; ITemplate_JMP
	GOTO           	#L20268
#line 32	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ; }
;   32:(     LABEL,    #L20345 ,            ,          )

; ITemplate_LABEL
#L20345
;   32:(       RET,            ,            ,          )

; ITemplate_RET
	RET            			; Bank 0		; ShBank 0
	_DESC          	GPIOInit,0X0,0X0
GPIOInit#	CSEG           
_GPIOInit
; /******************************************************
; 函数名：void GPIOInit(void)
; 描  述：首先初始化所有未用到的IO口为输出低电平
; 输入值：无
; 输出值：无
; 返回值：无
; *******************************************************/
; void GPIOInit(void)
; {
#line 43	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     ANSL = 0xFF;        //选择对应端口为数字IO功能
	CLR            	BKSR
;   43:(    ASGN_1,        255 ,            ,      ANSL)

; ITemplate_ASGN1_4_R
	MOVI           	0xff
	MOVA           	_ANSL_0
#line 44	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ; 	ANSH = 0xFF;
;   44:(    ASGN_1,        255 ,            ,      ANSH)

; ITemplate_ASGN1_4_R
	MOVI           	0xff
	MOVA           	_ANSH_0
#line 45	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PAT = 0x00;         //所有IO设为输出低电平
;   45:(    ASGN_1,          0 ,            ,       PAT)

; ITemplate_CLR1_4_TMP
	CLR            	_PAT_0
#line 46	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PBT = 0x00;
;   46:(    ASGN_1,          0 ,            ,       PBT)

; ITemplate_CLR1_4_TMP
	CLR            	_PBT_0
#line 47	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PCT = 0x00;
;   47:(    ASGN_1,          0 ,            ,       PCT)

; ITemplate_CLR1_4_TMP
	CLR            	_PCT_0
#line 48	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PA = 0x00;
;   48:(    ASGN_1,          0 ,            ,        PA)

; ITemplate_CLR1_4_TMP
	CLR            	_PA_0
#line 49	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PB = 0x00;
;   49:(    ASGN_1,          0 ,            ,        PB)

; ITemplate_CLR1_4_TMP
	CLR            	_PB_0
#line 50	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PC = 0x00;
;   50:(    ASGN_1,          0 ,            ,        PC)

; ITemplate_CLR1_4_TMP
	CLR            	_PC_0
#line 51	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PB2 = 1;        //打开学习板蜂鸣器
;   51:(    ASGN_0,          1 ,            ,       PB2)

; ITemplate_SET_0_TMP
	BSS            	(_PB2_0)/8,	(_PB2_0)%8
#line 52	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PA4 = 1;        //关闭学习板LED1
;   52:(    ASGN_0,          1 ,            ,       PA4)

; ITemplate_SET_0_TMP
	BSS            	(_PA4_0)/8,	(_PA4_0)%8
#line 53	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PA5 = 1;        //关闭学习板LED2
;   53:(    ASGN_0,          1 ,            ,       PA5)

; ITemplate_SET_0_TMP
	BSS            	(_PA5_0)/8,	(_PA5_0)%8
#line 54	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PA6 = 1;        //关闭学习板LED3
;   54:(    ASGN_0,          1 ,            ,       PA6)

; ITemplate_SET_0_TMP
	BSS            	(_PA6_0)/8,	(_PA6_0)%8
#line 55	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     PA7 = 1;        //关闭学习板LED4
;   55:(    ASGN_0,          1 ,            ,       PA7)

; ITemplate_SET_0_TMP
	BSS            	(_PA7_0)/8,	(_PA7_0)%8
#line 56	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ; }
;   56:(       RET,            ,            ,          )

; ITemplate_RET
	RET            			; Bank 0		; ShBank 0
	_DESC          	##isr,0X3,0X0

SECTION1isr	UNINTIAL       	0		; Bank 0
	ORG            	0X80		; Bank 0
_isrDATA	RSEG           	0X1		; Bank 0
; interrupt fun entry
	PUBLIC         	SAVED_TMP
SECTION0_INT_SAVED_00	UNINTIAL       		; Bank 0
SAVED_FSR	RSEG           	0x3
SECTION0_INT_SAVED_3	UNINTIAL       		; Bank 0
SAVED_TMP	RSEG           	0x1
INT_ENTRY	CSEG           	0x04
; ITemplate_InterruptHead
_INT_ENTRY
	PUSH           	
	CLR            	PCRH
	CLR            	BKSR
	MOV            	IAAL,	0x0
	MOVA           	(SAVED_FSR) & 0X7F		; Bank 0
	MOV            	IAAH,	0x0
	MOVA           	(SAVED_FSR+0x1) & 0X7F		; Bank 0
	MOV            	(CSEG_PTR) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR+0x2) & 0X7F		; Bank 0
	MOV            	(CSEG_PTR+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR+0x3) & 0X7F		; Bank 0
	MOV            	(MUL_TEMP) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP+0x2) & 0X7F		; Bank 0
	MOV            	(MUL_TEMP+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP+0x3) & 0X7F		; Bank 0
isr#	CSEG           
_isr
; /*******************************************************
; 函数名：void isr(void) interrupt
; 描  述：中断服务程序，周期溢出时将T21R的值更新至精度缓冲器(实际起作用，但不可见)。
;         所以每次进入中断函数时更新至精度缓冲器中的数是上一次周期溢出时的T21R值
; 输入值：无
; 输出值：无
; 返回值：无
; *******************************************************/
; void isr(void) interrupt
; {
#line 68	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     if (T21PIE==1 && T21PIF==1)        //定时器pwm周期中断
;   68:(    CVB_SC,     T21PIE ,            ,   #T20433)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_T21PIE_0)/8,	(_T21PIE_0)%8
	MOVI           	0x1
	SECTION        	0x1
	MOVA           	(_isr_#T20433_7) & 0X7F		; Bank 1
;   68:(    JNEQ_1,          1 ,    #T20433 ,   #L20498)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20433_7) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20498
;   68:(    CVB_SC,     T21PIF ,            ,   #T20440)

; ITemplate_CVB_UC
	MOVI           	0x0
	JBC            	(_T21PIF_0)/8,	(_T21PIF_0)%8
	MOVI           	0x1
	MOVA           	(_isr_#T20440_7) & 0X7F		; Bank 1
;   68:(    JNEQ_1,          1 ,    #T20440 ,   #L20498)

; ITemplate_JNEQ1_4
	MOV            	(_isr_#T20440_7) & 0X7F,	0x0		; Bank 1
	XORI           	0x1
	JBS            	PSW,	0x2
	GOTO           	#L20498
;     {
#line 70	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         Duty ++;
;   70:(     ADD_2,       Duty ,          1 ,      Duty)

; ITemplate_INC_2_TMP
	INC            	(_Duty) & 0X7F		; Bank 1
	JBS            	PSW,	0x2
	GOTO           	#L20619
	INC            	(_Duty+0x1) & 0X7F		; Bank 1
#L20619
#line 71	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         if (Duty >= 0x03E8)        //占空比大于周期，重新赋初值
;   71:(    JLT_2U,       Duty ,       1000 ,   #L20461)

; ITemplate_JLT1_4U
	MOVI           	0x3
	SUB            	(_Duty+0x1) & 0X7F,	0x0		; Bank 1
	JBS            	PSW,	0x2
	GOTO           	#L20620
	MOVI           	0xe8
	SUB            	(_Duty) & 0X7F,	0x0		; Bank 1
#L20620
	JBS            	PSW,	0x0
	GOTO           	#L20461
#line 72	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;             Duty = 0x0001;
;   72:(    ASGN_2,          1 ,            ,      Duty)

; ITemplate_ASGN1_4_R
	MOVI           	0x0
	MOVA           	(_Duty+0x1) & 0X7F		; Bank 1
	MOVI           	0x1
	MOVA           	(_Duty) & 0X7F		; Bank 1
;   72:(     LABEL,    #L20461 ,            ,          )

; ITemplate_LABEL
#L20461
#line 74	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         T21R2H = Duty>>8;    
;   74:(    RSH_2U,       Duty ,          8 ,    T21R2H)

; ITemplate_RSH1_4U
	MOVI           	0x8
	ADDI           	0x1
	SECTION        	0x0
	MOVA           	(?_TMP) & 0X7F		; Bank 0
	MOVRA          	_Duty		; Bank 1
	MOVA           	(?_TMP+0x1) & 0X7F		; Bank 0
	MOVRA          	_Duty+0x1		; Bank 1
	MOVA           	(?_TMP+0x2) & 0X7F		; Bank 0
	MOV            	(?_TMP) & 0X7F,	0x0		; Bank 0
	GOTO           	#L20621
#L20622
	BCC            	PSW,	0x0
	RR             	(?_TMP+0x2) & 0X7F,	0x1		; Bank 0
	RR             	(?_TMP+0x1) & 0X7F,	0x1		; Bank 0
#L20621
	ADDI           	0xff
	JBS            	PSW,	0x2
	GOTO           	#L20622
	MOV            	(?_TMP+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	_T21R2H_0#sh		; ShBank 0
#line 75	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         T21R2L = Duty;      
;   75:(   CVUI_UC,       Duty ,            ,    T21R2L)

; ITemplate_CVSMT
	MOVRA          	_Duty		; Bank 1
	MOVA           	_T21R2L_0#sh		; ShBank 0
#line 76	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         T21PIF = 0;                //清标志位
;   76:(    ASGN_0,          0 ,            ,    T21PIF)

; ITemplate_CLR_0_TMP
	BCC            	(_T21PIF_0)/8,	(_T21PIF_0)%8
;     }
#line 78	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ; }
;   78:(     LABEL,    #L20498 ,            ,          )

; ITemplate_LABEL
#L20498
;   78:(     RET_I,            ,            ,          )

; ITemplate_RET_I
	SECTION        	0x0
	GOTO           	_INT_RESTORE		; Bank 0		; ShBank 0
; interrupt fun restore
INT_RESTORE	CSEG           
; ITemplate_InterruptTail
_INT_RESTORE
	NOP            	
	NOP            	
	MOV            	(CSEG_PTR+0x3) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR+0x1) & 0X7F		; Bank 0
	MOV            	(CSEG_PTR+0x2) & 0X7F,	0x0		; Bank 0
	MOVA           	(CSEG_PTR) & 0X7F		; Bank 0
	MOV            	(MUL_TEMP+0x2) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP) & 0X7F		; Bank 0
	MOVA           	MULA
	MOV            	(MUL_TEMP+0x3) & 0X7F,	0x0		; Bank 0
	MOVA           	(MUL_TEMP+0x1) & 0X7F		; Bank 0
	MOVA           	MULB
	MOV            	(SAVED_FSR+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	IAAH
	MOV            	(SAVED_FSR) & 0X7F,	0x0		; Bank 0
	MOVA           	IAAL
	POP            	
	RETIE          	
	_DESC          	main,0X3,0X0,RAMclear,GPIOInit
main#	CSEG           
_main
; /*******************************************************
; 函数名：void main(void)
; 描  述：主函数，T21_CH0(PA0)和T21_CH1(PA7)输出pwm互补波形，T21_CH2(PB7)输出占空比连续变化的pwm波形
; 输入值：无
; 输出值：无
; 返回值：无
; *******************************************************/
; void main(void) 
; {
#line 89	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     RAMclear();
	CLR            	BKSR
;   89:(      CALL, (RAMclear.0) ,            ,          )

; ITemplate_CALL
	SEGMENTSEL     	_RAMclear
	CALL           	_RAMclear		; Bank 0		; ShBank 0
	SEGMENTSEL     	$
#line 90	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     GPIOInit();
;   90:(      CALL, (GPIOInit.0) ,            ,          )

; ITemplate_CALL
	SEGMENTSEL     	_GPIOInit
	CALL           	_GPIOInit		; Bank 0		; ShBank 0
	SEGMENTSEL     	$
#line 91	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21CL = 0xC0;        //多精度pwm模式
;   91:(    ASGN_1,        192 ,            ,     T21CL)

; ITemplate_ASGN1_4_R
	MOVI           	0xc0
	MOVA           	_T21CL_0#sh		; ShBank 0
#line 92	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21CM = 0x2F;        //T21_CH0输出低有效、T21_CH1输出高有效，预分频1:16
;   92:(    ASGN_1,         47 ,            ,     T21CM)

; ITemplate_ASGN1_4_R
	MOVI           	0x2f
	MOVA           	_T21CM_0#sh		; ShBank 0
#line 93	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21OC = 0x65;        //T21_CH2输出高有效，打开捕捉端口复用功能，PWM时钟源选择INTHRC
;   93:(    ASGN_1,        101 ,            ,     T21OC)

; ITemplate_ASGN1_4_R
	MOVI           	0x65
	MOVA           	_T21OC_0#sh		; ShBank 0
#line 94	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21PH = 0x03;        //pwm周期
;   94:(    ASGN_1,          3 ,            ,     T21PH)

; ITemplate_ASGN1_4_R
	MOVI           	0x3
	MOVA           	_T21PH_0#sh		; ShBank 0
#line 95	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21PL = 0xE8;
;   95:(    ASGN_1,        232 ,            ,     T21PL)

; ITemplate_ASGN1_4_R
	MOVI           	0xe8
	MOVA           	_T21PL_0#sh		; ShBank 0
#line 96	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21R0H = 0x01;       //pwm0占空比
;   96:(    ASGN_1,          1 ,            ,    T21R0H)

; ITemplate_ASGN1_4_R
	MOVI           	0x1
	MOVA           	_T21R0H_0#sh		; ShBank 0
#line 97	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21R0L = 0x4D;
;   97:(    ASGN_1,         77 ,            ,    T21R0L)

; ITemplate_ASGN1_4_R
	MOVI           	0x4d
	MOVA           	_T21R0L_0#sh		; ShBank 0
#line 98	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21R1H = 0x01;
;   98:(    ASGN_1,          1 ,            ,    T21R1H)

; ITemplate_ASGN1_4_R
	MOVI           	0x1
	MOVA           	_T21R1H_0#sh		; ShBank 0
#line 99	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21R1L = 0x4D;
;   99:(    ASGN_1,         77 ,            ,    T21R1L)

; ITemplate_ASGN1_4_R
	MOVI           	0x4d
	MOVA           	_T21R1L_0#sh		; ShBank 0
#line 100	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     Duty = 0x0001;       //pwm2占空比
;  100:(    ASGN_2,          1 ,            ,      Duty)

; ITemplate_ASGN1_4_R
	MOVI           	0x0
	MOVAR          	_Duty+0x1		; Bank 1
	MOVI           	0x1
	MOVAR          	_Duty		; Bank 1
#line 101	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21R2H = Duty>>8;
;  101:(    RSH_2U,       Duty ,          8 ,    T21R2H)

; ITemplate_RSH1_4U
	MOVI           	0x8
	ADDI           	0x1
	MOVA           	(?_TMP) & 0X7F		; Bank 0
	MOVRA          	_Duty		; Bank 1
	MOVA           	(?_TMP+0x1) & 0X7F		; Bank 0
	MOVRA          	_Duty+0x1		; Bank 1
	MOVA           	(?_TMP+0x2) & 0X7F		; Bank 0
	MOV            	(?_TMP) & 0X7F,	0x0		; Bank 0
	GOTO           	#L20623
#L20624
	BCC            	PSW,	0x0
	RR             	(?_TMP+0x2) & 0X7F,	0x1		; Bank 0
	RR             	(?_TMP+0x1) & 0X7F,	0x1		; Bank 0
#L20623
	ADDI           	0xff
	JBS            	PSW,	0x2
	GOTO           	#L20624
	MOV            	(?_TMP+0x1) & 0X7F,	0x0		; Bank 0
	MOVA           	_T21R2H_0#sh		; ShBank 0
#line 102	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21R2L = Duty;
;  102:(   CVUI_UC,       Duty ,            ,    T21R2L)

; ITemplate_CVSMT
	MOVRA          	_Duty		; Bank 1
	MOVA           	_T21R2L_0#sh		; ShBank 0
#line 103	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21TR = 1;           //启动pwm输出
;  103:(    ASGN_0,          1 ,            ,     T21TR)

; ITemplate_SET_0_TMP
	BSS            	(_T21TR_0#sh)/8,	(_T21TR_0#sh)%8		; ShBank 0
#line 104	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21PIE = 1;          //打开T21周期2中断    
;  104:(    ASGN_0,          1 ,            ,    T21PIE)

; ITemplate_SET_0_TMP
	BSS            	(_T21PIE_0)/8,	(_T21PIE_0)%8
#line 105	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21PIF = 0;          //清标志位
;  105:(    ASGN_0,          0 ,            ,    T21PIF)

; ITemplate_CLR_0_TMP
	BCC            	(_T21PIF_0)/8,	(_T21PIF_0)%8
#line 106	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     GIE = 1;             //开全局中断    
;  106:(    ASGN_0,          1 ,            ,       GIE)

; ITemplate_SET_0_TMP
	BSS            	(_GIE_0)/8,	(_GIE_0)%8
#line 107	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     T21EN = 1;           //使能T21
;  107:(    ASGN_0,          1 ,            ,     T21EN)

; ITemplate_SET_0_TMP
	BSS            	(_T21EN_0#sh)/8,	(_T21EN_0#sh)%8		; ShBank 0
#line 108	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     while (1)
;  108:(     LABEL,    #L20615 ,            ,          )

; ITemplate_LABEL
#L20615
;     {
#line 110	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;         CLRWDT();
; ITemplate_LABEL
;-----------Embedded Asm--------------
	CWDT
;-------------------------------------
#line 111	E:\lisq\public_lisq\ES7P\Examples_ES7P0693\T21\pwm_multiprecision_INTHRC\pwm_multiprecision.c ;     }
;  111:(       JMP,            ,            ,   #L20615)

; ITemplate_JMP
	GOTO           	#L20615

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC0	PSECT	FLAG=0X1088,ADDR=0X7FCB7
_GIE_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC1	PSECT	FLAG=0X1088,ADDR=0X7FCEB
_T21PIE_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC2	PSECT	FLAG=0X1088,ADDR=0X7FCF3
_T21PIF_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC3	PSECT	FLAG=0X1088,ADDR=0X7FD44
_PA4_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC4	PSECT	FLAG=0X1088,ADDR=0X7FD45
_PA5_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC5	PSECT	FLAG=0X1088,ADDR=0X7FD46
_PA6_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC6	PSECT	FLAG=0X1088,ADDR=0X7FD47
_PA7_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC7	PSECT	FLAG=0X1088,ADDR=0X7FD4A
_PB2_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC8	PSECT	FLAG=0X1088,ADDR=0X3054F
_T21TR_0	RSEG           	0X1		; Bank 0

SECTION8E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC9	PSECT	FLAG=0X1088,ADDR=0X30597
_T21EN_0	RSEG           	0X1		; Bank 0

SECTION1E__lisq_public_lisq_ES7P_Examples_ES7P0693_T21_pwm_multiprecision_INTHRC_pwm_multiprecision_c_STATIC	UNINTIAL       	0		; Bank 0
	ORG            	0X81		; Bank 0
_Duty	RSEG           	0X2		; Bank 0

SECTION8D__Program_Files__x86__iDesigner4_1_tools_INCLUDE_ES7P0693_h_STATIC	UNINTIAL       	0		; Bank 0
	ORG            	0XFF80		; Bank 0
_IAD_0	RSEG           	0X1		; Bank 0
	ORG            	0XFF81		; Bank 0
_IAAL_0	RSEG           	0X1		; Bank 0
	ORG            	0XFF82		; Bank 0
_IAAH_0	RSEG           	0X1		; Bank 0
	ORG            	0XFF8D		; Bank 0
_ANSH_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFA8		; Bank 0
_PA_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFA9		; Bank 0
_PB_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAA		; Bank 0
_PC_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAD		; Bank 0
_PAT_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAE		; Bank 0
_PBT_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFAF		; Bank 0
_PCT_0	RSEG           	0X1		; Bank 0
	ORG            	0XFFBC		; Bank 0
_ANSL_0	RSEG           	0X1		; Bank 0
	ORG            	0X60A9		; Bank 0
_T21OC_0	RSEG           	0X1		; Bank 0
	ORG            	0X60AC		; Bank 0
_T21PL_0	RSEG           	0X1		; Bank 0
	ORG            	0X60AD		; Bank 0
_T21PH_0	RSEG           	0X1		; Bank 0
	ORG            	0X60AE		; Bank 0
_T21R0L_0	RSEG           	0X1		; Bank 0
	ORG            	0X60AF		; Bank 0
_T21R0H_0	RSEG           	0X1		; Bank 0
	ORG            	0X60B0		; Bank 0
_T21CL_0	RSEG           	0X1		; Bank 0
	ORG            	0X60B1		; Bank 0
_T21CM_0	RSEG           	0X1		; Bank 0
	ORG            	0X60B3		; Bank 0
_T21R1L_0	RSEG           	0X1		; Bank 0
	ORG            	0X60B4		; Bank 0
_T21R1H_0	RSEG           	0X1		; Bank 0
	ORG            	0X60B5		; Bank 0
_T21R2L_0	RSEG           	0X1		; Bank 0
	ORG            	0X60B6		; Bank 0
_T21R2H_0	RSEG           	0X1		; Bank 0
	END
