#ifndef __SN8P2267C__H
#define __SN8P2267C__H
struct specialRegister{
	unsigned bit0:1;
	unsigned bit1:1;
	unsigned bit2:1;
	unsigned bit3:1;
	unsigned bit4:1;
	unsigned bit5:1;
	unsigned bit6:1;
	unsigned bit7:1;
};


void _ClearWatchDogTimer(void);
void _ClrRAM(void);

#define NOP(X)  	__asm{	_NOP X }
#define LOG(X)  	__asm{	LOG CNameToAsmLabel(X) }
#define	L	(*((__RAM unsigned int*)0x80))
#define	H	(*((__RAM unsigned int*)0x81))
#define	R	(*((__RAM unsigned int*)0x82))
#define	Z	(*((__RAM unsigned int*)0x83))
#define	Y	(*((__RAM unsigned int*)0x84))
#define	PFLAG	(*((__RAM unsigned int*)0x86))
#define	FZ	((*((__RAM struct specialRegister *)0x86)).bit0)
#define	FDC	((*((__RAM struct specialRegister *)0x86)).bit1)
#define	FC	((*((__RAM struct specialRegister *)0x86)).bit2)
#define	FLVD36	((*((__RAM struct specialRegister *)0x86)).bit5)
#define	FNPD	((*((__RAM struct specialRegister *)0x86)).bit6)
#define	FNT0	((*((__RAM struct specialRegister *)0x86)).bit7)
#define	RBANK	(*((__RAM unsigned int*)0x87))
#define	FRBNKS0	((*((__RAM struct specialRegister *)0x87)).bit0)
#define	TC0M	(*((__RAM unsigned int*)0x88))
#define	FTC0ENB	((*((__RAM struct specialRegister *)0x88)).bit7)
#define	FTC0RATE2	((*((__RAM struct specialRegister *)0x88)).bit6)
#define	FTC0RATE1	((*((__RAM struct specialRegister *)0x88)).bit5)
#define	FTC0RATE0	((*((__RAM struct specialRegister *)0x88)).bit4)
#define	FALOAD0	((*((__RAM struct specialRegister *)0x88)).bit2)
#define	TC0C	(*((__RAM unsigned int*)0x89))
#define	TC0R	(*((__RAM unsigned int*)0x8a))
#define	UDA	(*((__RAM unsigned int*)0x90))
#define	FUDE	((*((__RAM struct specialRegister *)0x90)).bit7)
#define	FUDA6	((*((__RAM struct specialRegister *)0x90)).bit6)
#define	FUDA5	((*((__RAM struct specialRegister *)0x90)).bit5)
#define	FUDA4	((*((__RAM struct specialRegister *)0x90)).bit4)
#define	FUDA3	((*((__RAM struct specialRegister *)0x90)).bit3)
#define	FUDA2	((*((__RAM struct specialRegister *)0x90)).bit2)
#define	FUDA1	((*((__RAM struct specialRegister *)0x90)).bit1)
#define	FUDA0	((*((__RAM struct specialRegister *)0x90)).bit0)
#define	USTATUS	(*((__RAM unsigned int*)0x91))
#define	FBUS_RST	((*((__RAM struct specialRegister *)0x91)).bit4)
#define	FSUSPEND	((*((__RAM struct specialRegister *)0x91)).bit3)
#define	FEP0SETUP	((*((__RAM struct specialRegister *)0x91)).bit2)
#define	FEP0IN	((*((__RAM struct specialRegister *)0x91)).bit1)
#define	FEP0OUT	((*((__RAM struct specialRegister *)0x91)).bit0)
#define	EP0OUT_CNT	(*((__RAM unsigned int*)0x92))
#define	FUEP0OC4	((*((__RAM struct specialRegister *)0x92)).bit4)
#define	FUEP0OC3	((*((__RAM struct specialRegister *)0x92)).bit3)
#define	FUEP0OC2	((*((__RAM struct specialRegister *)0x92)).bit2)
#define	FUEP0OC1	((*((__RAM struct specialRegister *)0x92)).bit1)
#define	FUEP0OC0	((*((__RAM struct specialRegister *)0x92)).bit0)
#define	USB_INT_EN	(*((__RAM unsigned int*)0x93))
#define	FREG_EN	((*((__RAM struct specialRegister *)0x93)).bit7)
#define	FDP_PU_EN	((*((__RAM struct specialRegister *)0x93)).bit6)
#define	FEP2_NAK_EN	((*((__RAM struct specialRegister *)0x93)).bit4)
#define	FEP1_NAK_EN	((*((__RAM struct specialRegister *)0x93)).bit3)
#define	FUE2D	((*((__RAM struct specialRegister *)0x93)).bit1)
#define	FUE1D	((*((__RAM struct specialRegister *)0x93)).bit0)
#define	EP_ACK	(*((__RAM unsigned int*)0x94))
#define	FEP2_NAK	((*((__RAM struct specialRegister *)0x94)).bit3)
#define	FEP1_NAK	((*((__RAM struct specialRegister *)0x94)).bit2)
#define	FEP2_ACK	((*((__RAM struct specialRegister *)0x94)).bit1)
#define	FEP1_ACK	((*((__RAM struct specialRegister *)0x94)).bit0)
#define	UE0R	(*((__RAM unsigned int*)0x96))
#define	FUE0E	((*((__RAM struct specialRegister *)0x96)).bit7)
#define	FUE0M1	((*((__RAM struct specialRegister *)0x96)).bit6)
#define	FUE0M0	((*((__RAM struct specialRegister *)0x96)).bit5)
#define	FUE0C3	((*((__RAM struct specialRegister *)0x96)).bit3)
#define	FUE0C2	((*((__RAM struct specialRegister *)0x96)).bit2)
#define	FUE0C1	((*((__RAM struct specialRegister *)0x96)).bit1)
#define	FUE0C0	((*((__RAM struct specialRegister *)0x96)).bit0)
#define	UE1R	(*((__RAM unsigned int*)0x97))
#define	FUE1E	((*((__RAM struct specialRegister *)0x97)).bit7)
#define	FUE1M1	((*((__RAM struct specialRegister *)0x97)).bit6)
#define	FUE1M0	((*((__RAM struct specialRegister *)0x97)).bit5)
#define	FUE1C3	((*((__RAM struct specialRegister *)0x97)).bit3)
#define	FUE1C2	((*((__RAM struct specialRegister *)0x97)).bit2)
#define	FUE1C1	((*((__RAM struct specialRegister *)0x97)).bit1)
#define	FUE1C0	((*((__RAM struct specialRegister *)0x97)).bit0)
#define	UE2R	(*((__RAM unsigned int*)0x98))
#define	FUE2E	((*((__RAM struct specialRegister *)0x98)).bit7)
#define	FUE2M1	((*((__RAM struct specialRegister *)0x98)).bit6)
#define	FUE2M0	((*((__RAM struct specialRegister *)0x98)).bit5)
#define	FUE2C3	((*((__RAM struct specialRegister *)0x98)).bit3)
#define	FUE2C2	((*((__RAM struct specialRegister *)0x98)).bit2)
#define	FUE2C1	((*((__RAM struct specialRegister *)0x98)).bit1)
#define	FUE2C0	((*((__RAM struct specialRegister *)0x98)).bit0)
#define	UPID	(*((__RAM unsigned int*)0xab))
#define	FEP0OUT_EN	((*((__RAM struct specialRegister *)0xab)).bit7)
#define	FUBDE	((*((__RAM struct specialRegister *)0xab)).bit2)
#define	FDDP	((*((__RAM struct specialRegister *)0xab)).bit1)
#define	FDDN	((*((__RAM struct specialRegister *)0xab)).bit0)
#define	UTOGGLE	(*((__RAM unsigned int*)0xac))
#define	FEP2_DATA01	((*((__RAM struct specialRegister *)0xac)).bit1)
#define	FEP1_DATA01	((*((__RAM struct specialRegister *)0xac)).bit0)
#define	UNDT_EN	(*((__RAM unsigned int*)0xad))
#define	UNDT	(*((__RAM unsigned int*)0xae))
#define	FNDT	((*((__RAM struct specialRegister *)0xae)).bit0)
#define	EP0_STALL	(*((__RAM unsigned int*)0xb0))
#define	FEP0_OUT_STALL	((*((__RAM struct specialRegister *)0xb0)).bit1)
#define	FEP0_IN_STALL	((*((__RAM struct specialRegister *)0xb0)).bit0)
#define	P0M	(*((__RAM unsigned int*)0xb8))
#define	FP07M	((*((__RAM struct specialRegister *)0xb8)).bit7)
#define	FP06M	((*((__RAM struct specialRegister *)0xb8)).bit6)
#define	FP05M	((*((__RAM struct specialRegister *)0xb8)).bit5)
#define	FP04M	((*((__RAM struct specialRegister *)0xb8)).bit4)
#define	FP03M	((*((__RAM struct specialRegister *)0xb8)).bit3)
#define	FP02M	((*((__RAM struct specialRegister *)0xb8)).bit2)
#define	FP01M	((*((__RAM struct specialRegister *)0xb8)).bit1)
#define	FP00M	((*((__RAM struct specialRegister *)0xb8)).bit0)
#define	PEDGE	(*((__RAM unsigned int*)0xbf))
#define	FP00G1	((*((__RAM struct specialRegister *)0xbf)).bit1)
#define	FP00G0	((*((__RAM struct specialRegister *)0xbf)).bit0)
#define	P1M	(*((__RAM unsigned int*)0xc1))
#define	FP17M	((*((__RAM struct specialRegister *)0xc1)).bit7)
#define	FP16M	((*((__RAM struct specialRegister *)0xc1)).bit6)
#define	FP15M	((*((__RAM struct specialRegister *)0xc1)).bit5)
#define	FP14M	((*((__RAM struct specialRegister *)0xc1)).bit4)
#define	FP13M	((*((__RAM struct specialRegister *)0xc1)).bit3)
#define	FP12M	((*((__RAM struct specialRegister *)0xc1)).bit2)
#define	FP11M	((*((__RAM struct specialRegister *)0xc1)).bit1)
#define	FP10M	((*((__RAM struct specialRegister *)0xc1)).bit0)
#define	P2M	(*((__RAM unsigned int*)0xc2))
#define	FP27M	((*((__RAM struct specialRegister *)0xc2)).bit7)
#define	FP26M	((*((__RAM struct specialRegister *)0xc2)).bit6)
#define	FP25M	((*((__RAM struct specialRegister *)0xc2)).bit5)
#define	FP24M	((*((__RAM struct specialRegister *)0xc2)).bit4)
#define	FP23M	((*((__RAM struct specialRegister *)0xc2)).bit3)
#define	FP22M	((*((__RAM struct specialRegister *)0xc2)).bit2)
#define	FP21M	((*((__RAM struct specialRegister *)0xc2)).bit1)
#define	FP20M	((*((__RAM struct specialRegister *)0xc2)).bit0)
#define	P3M	(*((__RAM unsigned int*)0xc3))
#define	FP36M	((*((__RAM struct specialRegister *)0xc3)).bit6)
#define	FP35M	((*((__RAM struct specialRegister *)0xc3)).bit5)
#define	FP34M	((*((__RAM struct specialRegister *)0xc3)).bit4)
#define	FP33M	((*((__RAM struct specialRegister *)0xc3)).bit3)
#define	FP32M	((*((__RAM struct specialRegister *)0xc3)).bit2)
#define	FP31M	((*((__RAM struct specialRegister *)0xc3)).bit1)
#define	FP30M	((*((__RAM struct specialRegister *)0xc3)).bit0)
#define	P5M	(*((__RAM unsigned int*)0xc5))
#define	FP55M	((*((__RAM struct specialRegister *)0xc5)).bit5)
#define	FP54M	((*((__RAM struct specialRegister *)0xc5)).bit4)
#define	FP53M	((*((__RAM struct specialRegister *)0xc5)).bit3)
#define	FP52M	((*((__RAM struct specialRegister *)0xc5)).bit2)
#define	FP51M	((*((__RAM struct specialRegister *)0xc5)).bit1)
#define	FP50M	((*((__RAM struct specialRegister *)0xc5)).bit0)
#define	INTRQ	(*((__RAM unsigned int*)0xc8))
#define	FNDTIRQ	((*((__RAM struct specialRegister *)0xc8)).bit7)
#define	FUSBIRQ	((*((__RAM struct specialRegister *)0xc8)).bit6)
#define	FTC0IRQ	((*((__RAM struct specialRegister *)0xc8)).bit5)
#define	FWAKEIRQ	((*((__RAM struct specialRegister *)0xc8)).bit2)
#define	FP00IRQ	((*((__RAM struct specialRegister *)0xc8)).bit0)
#define	INTEN	(*((__RAM unsigned int*)0xc9))
#define	FNDTIEN	((*((__RAM struct specialRegister *)0xc9)).bit7)
#define	FUSBIEN	((*((__RAM struct specialRegister *)0xc9)).bit6)
#define	FTC0IEN	((*((__RAM struct specialRegister *)0xc9)).bit5)
#define	FWAKEIEN	((*((__RAM struct specialRegister *)0xc9)).bit2)
#define	FP00IEN	((*((__RAM struct specialRegister *)0xc9)).bit0)
#define	OSCM	(*((__RAM unsigned int*)0xca))
#define	FCPUM1	((*((__RAM struct specialRegister *)0xca)).bit4)
#define	FCPUM0	((*((__RAM struct specialRegister *)0xca)).bit3)
#define	FCLKMD	((*((__RAM struct specialRegister *)0xca)).bit2)
#define	FSTPHX	((*((__RAM struct specialRegister *)0xca)).bit1)
#define	WDTR	(*((__RAM unsigned int*)0xcc))
#define	PCL	(*((__RAM unsigned int*)0xce))
#define	PCH	(*((__RAM unsigned int*)0xcf))
#define	P0	(*((__RAM unsigned int*)0xd0))
#define	FP07	((*((__RAM struct specialRegister *)0xd0)).bit7)
#define	FP06	((*((__RAM struct specialRegister *)0xd0)).bit6)
#define	FP05	((*((__RAM struct specialRegister *)0xd0)).bit5)
#define	FP04	((*((__RAM struct specialRegister *)0xd0)).bit4)
#define	FP03	((*((__RAM struct specialRegister *)0xd0)).bit3)
#define	FP02	((*((__RAM struct specialRegister *)0xd0)).bit2)
#define	FP01	((*((__RAM struct specialRegister *)0xd0)).bit1)
#define	FP00	((*((__RAM struct specialRegister *)0xd0)).bit0)
#define	P1	(*((__RAM unsigned int*)0xd1))
#define	FP17	((*((__RAM struct specialRegister *)0xd1)).bit7)
#define	FP16	((*((__RAM struct specialRegister *)0xd1)).bit6)
#define	FP15	((*((__RAM struct specialRegister *)0xd1)).bit5)
#define	FP14	((*((__RAM struct specialRegister *)0xd1)).bit4)
#define	FP13	((*((__RAM struct specialRegister *)0xd1)).bit3)
#define	FP12	((*((__RAM struct specialRegister *)0xd1)).bit2)
#define	FP11	((*((__RAM struct specialRegister *)0xd1)).bit1)
#define	FP10	((*((__RAM struct specialRegister *)0xd1)).bit0)
#define	P2	(*((__RAM unsigned int*)0xd2))
#define	FP27	((*((__RAM struct specialRegister *)0xd2)).bit7)
#define	FP26	((*((__RAM struct specialRegister *)0xd2)).bit6)
#define	FP25	((*((__RAM struct specialRegister *)0xd2)).bit5)
#define	FP24	((*((__RAM struct specialRegister *)0xd2)).bit4)
#define	FP23	((*((__RAM struct specialRegister *)0xd2)).bit3)
#define	FP22	((*((__RAM struct specialRegister *)0xd2)).bit2)
#define	FP21	((*((__RAM struct specialRegister *)0xd2)).bit1)
#define	FP20	((*((__RAM struct specialRegister *)0xd2)).bit0)
#define	P3	(*((__RAM unsigned int*)0xd3))
#define	FP37	((*((__RAM struct specialRegister *)0xd3)).bit7)
#define	FP36	((*((__RAM struct specialRegister *)0xd3)).bit6)
#define	FP35	((*((__RAM struct specialRegister *)0xd3)).bit5)
#define	FP34	((*((__RAM struct specialRegister *)0xd3)).bit4)
#define	FP33	((*((__RAM struct specialRegister *)0xd3)).bit3)
#define	FP32	((*((__RAM struct specialRegister *)0xd3)).bit2)
#define	FP31	((*((__RAM struct specialRegister *)0xd3)).bit1)
#define	FP30	((*((__RAM struct specialRegister *)0xd3)).bit0)
#define	P5	(*((__RAM unsigned int*)0xd5))
#define	FP55	((*((__RAM struct specialRegister *)0xd5)).bit5)
#define	FP54	((*((__RAM struct specialRegister *)0xd5)).bit4)
#define	FP53	((*((__RAM struct specialRegister *)0xd5)).bit3)
#define	FP52	((*((__RAM struct specialRegister *)0xd5)).bit2)
#define	FP51	((*((__RAM struct specialRegister *)0xd5)).bit1)
#define	FP50	((*((__RAM struct specialRegister *)0xd5)).bit0)
#define	STKP	(*((__RAM unsigned int*)0xdf))
#define	FGIE	((*((__RAM struct specialRegister *)0xdf)).bit7)
#define	FSTKPB2	((*((__RAM struct specialRegister *)0xdf)).bit2)
#define	FSTKPB1	((*((__RAM struct specialRegister *)0xdf)).bit1)
#define	FSTKPB0	((*((__RAM struct specialRegister *)0xdf)).bit0)
#define	P0UR	(*((__RAM unsigned int*)0xe0))
#define	P1UR	(*((__RAM unsigned int*)0xe1))
#define	P2UR	(*((__RAM unsigned int*)0xe2))
#define	P3UR	(*((__RAM unsigned int*)0xe3))
#define	P5UR	(*((__RAM unsigned int*)0xe5))
#define	_HL	(*((__RAM unsigned int*)0xe6))
#define	_YZ	(*((__RAM unsigned int*)0xe7))
#define	NDT_HW	(*((__RAM unsigned int*)0xe8))
#define	EFT_FLAG	((*((__RAM struct specialRegister *)0xe8)).bit0)
#define	NDT_ENB	((*((__RAM struct specialRegister *)0xe8)).bit1)
#define	STK7L	(*((__RAM unsigned int*)0xf0))
#define	STK7H	(*((__RAM unsigned int*)0xf1))
#define	STK6L	(*((__RAM unsigned int*)0xf2))
#define	STK6H	(*((__RAM unsigned int*)0xf3))
#define	STK5L	(*((__RAM unsigned int*)0xf4))
#define	STK5H	(*((__RAM unsigned int*)0xf5))
#define	STK4L	(*((__RAM unsigned int*)0xf6))
#define	STK4H	(*((__RAM unsigned int*)0xf7))
#define	STK3L	(*((__RAM unsigned int*)0xf8))
#define	STK3H	(*((__RAM unsigned int*)0xf9))
#define	STK2L	(*((__RAM unsigned int*)0xfa))
#define	STK2H	(*((__RAM unsigned int*)0xfb))
#define	STK1L	(*((__RAM unsigned int*)0xfc))
#define	STK1H	(*((__RAM unsigned int*)0xfd))
#define	STK0L	(*((__RAM unsigned int*)0xfe))
#define	STK0H	(*((__RAM unsigned int*)0xff))
#endif
