#ifndef _INC_PALMTYPE
#define _INC_PALMTYPE

#ifndef _WIN32
#define _MCS51
#endif

#ifdef _MCS51

#define BOOLEAN		bit
#define UCHAR		unsigned char
#define DCHAR		unsigned char data
#define ICHAR		unsigned char idata
#define XCHAR		unsigned char xdata
#define CCHAR		unsigned char code
#define USHORT		unsigned short
#define DSHORT		unsigned short data
#define XSHORT		unsigned short xdata
#define CSHORT		unsigned short code
#define ULONG		unsigned long
#define DLONG		unsigned long data
#define XLONG		unsigned long xdata		
#define CLONG		unsigned long code
#define PUCHAR		unsigned char *
#define PDCHAR		unsigned char data *
#define PICHAR		unsigned char idata *
#define PXCHAR		unsigned char xdata *
#define PXCHAR_D	unsigned char xdata * data	
#define PCCHAR		unsigned char code *
#define PCCHAR_D	unsigned char code * data
#define PCLONG		unsigned long code *
#define PXSHORT		unsigned short xdata *
#define PXSHORT_D	unsigned short xdata * data
#define PXLONG		unsigned long xdata *

#define XBYTE ((unsigned char volatile xdata *) 0)
#define X_VAL(Array, Offset)	((unsigned char volatile xdata *) 0)[Array+Offset]

#else

#define BOOLEAN		unsigned char
#define UCHAR		unsigned char
#define DCHAR		unsigned char
#define ICHAR		unsigned char
#define XCHAR		unsigned char
#define CCHAR		unsigned char
#define USHORT		unsigned short
#define DSHORT		unsigned short
#define XSHORT		unsigned short
#define CSHORT		unsigned short
#define ULONG		unsigned long
#define DLONG		unsigned long
#define XLONG		unsigned long		
#define CLONG		unsigned long
#define PUCHAR		UCHAR *
#define PDCHAR		DCHAR *
#define PICHAR		ICHAR *
#define PXCHAR		XCHAR *
#define PXCHAR_D	XCHAR *
#define PCCHAR		CCHAR *
#define PCCHAR_D	CCHAR *
#define PCLONG		CLONG *
#define PXSHORT		XSHORT *
#define PXSHORT_D	XSHORT *
#define PXLONG		XLONG *

#endif

#define TRUE	1
#define FALSE	0

#ifndef NULL
#define NULL    ((void *)0)
#endif

#endif
