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  	T2M.7
T2CL 	EQU 	0EBH
TC3M1 	EQU 	0EEH
	FPWMX1EN 	EQU  	TC3M1.0
	FPWMX2EN 	EQU  	TC3M1.1
	FPWMX0S0 	EQU  	TC3M1.2
	FPWMX1S0 	EQU  	TC3M1.3
	FPWMX2S0 	EQU  	TC3M1.4
	FPWMX1S1 	EQU  	TC3M1.5
	FPWMX1S1 	EQU  	TC3M1.6
	FPWMX1S1 	EQU  	TC3M1.7
STKP 	EQU 	0EFH
	FSTKPB0 	EQU  	STKP.0
	FSTKPB1 	EQU  	STKP.1
	FSTKPB2 	EQU  	STKP.2
	FGIE 	EQU  	STKP.7
STK7L 	EQU 	0F0H
STK7H 	EQU 	0F1H
STK6L 	EQU 	0F2H
STK6H 	EQU 	0F3H
STK5L 	EQU 	0F4H
STK5H 	EQU 	0F5H
STK4L 	EQU 	0F6H
STK4H 	EQU 	0F7H
STK3L 	EQU 	0F8H
STK3H 	EQU 	0F9H
STK2L 	EQU 	0FAH
STK2H 	EQU 	0FBH
STK1L 	EQU 	0FCH
STK1H 	EQU 	0FDH
STK0L 	EQU 	0FEH
STK0H 	EQU 	0FFH
; -----------------------------------------------------
; Clear watchdog macro. 
;  
; Total Cycle: 2

	@RST_WDT	macro
		   MOV  A, #0x5A
		   B0MOV  WDTR, A
	endm
; -----------------------------------------------------
; Sleep Mode control macro for compatibility in S8KD-2 ICE
;  
; Total Cycle: 1

	SleepMode	macro	
		B0BSET	FCPUM0
	endm
; -----------------------------------------------------
; Green Mode control macro for compatibility in S8KD-2 ICE
;  
; Total Cycle: 3

	GreenMode	macro	
		B0BSET	FCPUM1
		NOP
		NOP
	endm
; -----------------------------------------------------
; Slow Mode control macro for compatibility in S8KD-2 ICE
;  
; Total Cycle: 2

	SlowMode	macro	
		B0BSET	FCLKMD
		B0BSET	FSTPHX
	endm
; -----------------------------------------------------
;  Slow mode to Normal Mode control macro for compatibility in S8KD-2 ICE
;  
; Total Cycle: 5

	Slow2Normal	macro	
		B0BCLR	FSTPHX
		NOP
		NOP
		NOP
		B0BCLR	FCLKMD
	endm
; -----------------------------------------------------
;  Slow mode to Normal Mode control macro for compatibility in S8KD-2 ICE
;  
; Total Cycle: 5

	Set_P3_Input_Pullup	macro	
    DW	0x2D00 		;mov	a, #0x00	; Port 3: Input pull-up high
    DW 	0x2FC3 		;b0mov	P3M,a
    DW	0x2DFF 		;mov	a, #0xFF
    DW	0x2FD3 		;b0mov	P3,a
    DW	0x2FE3 		;b0mov	P3UR,a
	endm
; -----------------------------------------------------
