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INTEN0.4
		FTC0IE	EQU	INTEN0.5
		FT2IE	EQU	INTEN0.6
		FPBIE	EQU	INTEN0.7
	INTEN1	EQU	0x9a
		FTM1IE	EQU	INTEN1.0
		FTM2IE	EQU	INTEN1.1
		FTM3IE	EQU	INTEN1.3
		FCMPIE	EQU	INTEN1.4
		FI2CIE	EQU	INTEN1.6
		FSPIIE	EQU	INTEN1.7
	P0W	EQU	0x9b
		FP00W	EQU	P0W.0
		FP01W	EQU	P0W.1
		FP02W	EQU	P0W.2
		FP03W	EQU	P0W.3
		FP04W	EQU	P0W.4
		FP05W	EQU	P0W.5
		FP06W	EQU	P0W.6
		FP07W	EQU	P0W.7
	P1W	EQU	0x9c
		FP10W	EQU	P1W.0
		FP11W	EQU	P1W.1
		FP12W	EQU	P1W.2
		FP13W	EQU	P1W.3
		FP14W	EQU	P1W.4
		FP15W	EQU	P1W.5
		FP16W	EQU	P1W.6
	P2W	EQU	0x9d
		FP20W	EQU	P2W.0
		FP21W	EQU	P2W.1
		FP22W	EQU	P2W.2
		FP23W	EQU	P2W.3
		FP24W	EQU	P2W.4
		FP25W	EQU	P2W.5
		FP26W	EQU	P2W.6
	P4W	EQU	0x9e
		FP40W	EQU	P4W.0
		FP41W	EQU	P4W.1
		FP42W	EQU	P4W.2
		FP43W	EQU	P4W.3
		FP44W	EQU	P4W.4
		FP45W	EQU	P4W.5
		FP46W	EQU	P4W.6
		FP47W	EQU	P4W.7
	PEDGE	EQU	0x9f
		FPG0	EQU	PEDGE.0
		FPG1	EQU	PEDGE.1
	P0M	EQU	0xa0
		FP00M	EQU	P0M.0
		FP01M	EQU	P0M.1
		FP02M	EQU	P0M.2
		FP03M	EQU	P0M.3
		FP04M	EQU	P0M.4
		FP05M	EQU	P0M.5
		FP06M	EQU	P0M.6
		FP07M	EQU	P0M.7
	P1M	EQU	0xa1
		FP10M	EQU	P1M.0
		FP11M	EQU	P1M.1
		FP12M	EQU	P1M.2
		FP13M	EQU	P1M.3
		FP14M	EQU	P1M.4
		FP15M	EQU	P1M.5
		FP16M	EQU	P1M.6
	P2M	EQU	0xa2
		FP20M	EQU	P2M.0
		FP21M	EQU	P2M.1
		FP22M	EQU	P2M.2
		FP23M	EQU	P2M.3
		FP24M	EQU	P2M.4
		FP25M	EQU	P2M.5
		FP26M	EQU	P2M.6
	P4M	EQU	0xa3
		FP40M	EQU	P4M.0
		FP41M	EQU	P4M.1
		FP42M	EQU	P4M.2
		FP43M	EQU	P4M.3
		FP44M	EQU	P4M.4
		FP45M	EQU	P4M.5
		FP46M	EQU	P4M.6
		FP47M	EQU	P4M.7
	P0	EQU	0xa5
		FP00	EQU	P0.0
		FP01	EQU	P0.1
		FP02	EQU	P0.2
		FP03	EQU	P0.3
		FP04	EQU	P0.4
		FP05	EQU	P0.5
		FP06	EQU	P0.6
		FP07	EQU	P0.7
	P1	EQU	0xa6
		FP10	EQU	P1.0
		FP11	EQU	P1.1
		FP12	EQU	P1.2
		FP13	EQU	P1.3
		FP14	EQU	P1.4
		FP15	EQU	P1.5
		FP16	EQU	P1.6
	P2	EQU	0xa7
		FP20	EQU	P2.0
		FP21	EQU	P2.1
		FP22	EQU	P2.2
		FP23	EQU	P2.3
		FP24	EQU	P2.4
		FP25	EQU	P2.5
		FP26	EQU	P2.6
	P4	EQU	0xa8
		FP40	EQU	P4.0
		FP41	EQU	P4.1
		FP42	EQU	P4.2
		FP43	EQU	P4.3
		FP44	EQU	P4.4
		FP45	EQU	P4.5
		FP46	EQU	P4.6
		FP47	EQU	P4.7
	P0UR	EQU	0xaa
		FP00UR	EQU	P0UR.0
		FP01UR	EQU	P0UR.1
		FP02UR	EQU	P0UR.2
		FP03UR	EQU	P0UR.3
		FP04UR	EQU	P0UR.4
		FP05UR	EQU	P0UR.5
		FP06UR	EQU	P0UR.6
		FP07UR	EQU	P0UR.7
	P1UR	EQU	0xab
		FP10UR	EQU	P1UR.0
		FP11UR	EQU	P1UR.1
		FP12UR	EQU	P1UR.2
		FP13UR	EQU	P1UR.3
		FP14U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0	EQU	CMPM.5
		FCPINS1	EQU	CMPM.6
		FCOMSEL	EQU	CMPM.7
	OPAM	EQU	0xe5
		FOPAM0	EQU	OPAM.0
		FOPAM1	EQU	OPAM.1
		FOPAM2	EQU	OPAM.2
		FOPAM3	EQU	OPAM.3
		FOPAM4	EQU	OPAM.4
		FOPAM5	EQU	OPAM.5
		FOPAM6	EQU	OPAM.6
		FOPAM7	EQU	OPAM.7
	OPAM1	EQU	0xe6
		FOPAM10	EQU	OPAM1.0
		FOPAM11	EQU	OPAM1.1
		FOPAM12	EQU	OPAM1.2
		FOPAM13	EQU	OPAM1.3
		FOPAM17	EQU	OPAM1.7
	OPAMC	EQU	0xe7
		FAP1NS	EQU	OPAMC.0
		FAP1NS0	EQU	OPAMC.1
		FAP1OS	EQU	OPAMC.2
		FAP1OSP	EQU	OPAMC.3
		FAP1PS0	EQU	OPAMC.4
		FAP1PS	EQU	OPAMC.5
		FLVHSEN	EQU	OPAMC.6
		FOPAMC7	EQU	OPAMC.7
	OPAMC1	EQU	0xe8
		FAP2NS	EQU	OPAMC1.0
		FAP2NS0	EQU	OPAMC1.1
		FAP2OS	EQU	OPAMC1.2
		FAP2OSP	EQU	OPAMC1.3
		FAP2PS0	EQU	OPAMC1.4
		FAP2PS	EQU	OPAMC1.5
		FLVHSEN1	EQU	OPAMC1.6
		FOPAMC17	EQU	OPAMC1.7
	FLER	EQU	0xe9
		FFOV	EQU	FLER.0
	FADRH	EQU	0xea
	FADRL	EQU	0xeb
	FCON1	EQU	0xec
		FREADL	EQU	FCON1.0
		FPROGL	EQU	FCON1.1
		FERASEL	EQU	FCON1.2
		FTIMEL0	EQU	FCON1.5
		FTIMEL1	EQU	FCON1.6
		FCEFL	EQU	FCON1.7
	FCON2	EQU	0xed
	FDATH	EQU	0xee
@RST_WDT	macro
		   MOV  A, #0x5A
		   B0MOV  WDTR, A
	endm

SleepMode	macro	
		B0BSET	FCPUM0
	endm

GreenMode	macro	
		B0BSET	FCPUM1
		NOP
		NOP
	endm

SlowMode	macro	
		B0BSET	FCLKMD
		B0BSET	FSTPHX
	endm

Slow2Normal	macro	
		B0BCLR	FSTPHX
		NOP
		NOP
		NOP
		B0BCLR	FCLKMD
	endm

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

endif
