
#ifndef	_HTC_H_
#warning Header file ds80c400.h included directly. Use #include <htc.h> instead.
#endif


 /* header file for the Dallas microcontrollers
	DS80C400
 */

#ifndef	__DS80C400_H

#define	__DS80C400_H

typedef struct {
	unsigned B7:1; //This is the most signifigant bit
	unsigned B6:1;
	unsigned B5:1;
	unsigned B4:1;
	unsigned B3:1;
	unsigned B2:1;
	unsigned B1:1;
	unsigned B0:1;
}	SFR_BITS;

//Special Function Registers
static volatile unsigned char P4	@ 0x80;
static volatile unsigned char SP	@ 0x81;
static volatile unsigned char DPL	@ 0x82;
static volatile unsigned char DPH	@ 0x83;
// 16-Bit definition
static volatile unsigned char DPL1	@ 0x84;
static volatile unsigned char DPH1	@ 0x85;
// 16-Bit definition
static          unsigned char DPS	@ 0x86;
static volatile unsigned char PCON	@ 0x87;
static volatile unsigned char TCON	@ 0x88;
static          unsigned char TMOD	@ 0x89;
static volatile unsigned char TL0	@ 0x8A;
static volatile unsigned char TL1	@ 0x8B;
static volatile unsigned char TH0	@ 0x8C;
static volatile unsigned char TH1	@ 0x8D;
static          unsigned char CKCON	@ 0x8E;
static volatile unsigned char P1	@ 0x90;
static volatile unsigned char EXIF	@ 0x91;
static		unsigned char P4CNT	@ 0x92;
static volatile unsigned char DPX	@ 0x93;
static volatile unsigned char DPX1	@ 0x95;
static volatile unsigned char C0RMS0	@ 0x96;
static volatile unsigned char C0RMS1	@ 0x97;
static volatile unsigned char SCON0	@ 0x98;
static volatile unsigned char SBUF0	@ 0x99;
static volatile unsigned char ESP	@ 0x9B;
static		unsigned char AP	@ 0x9C;
static		unsigned char ACON	@ 0x9D;
static volatile unsigned char C0TMA0	@ 0x9E;
static volatile unsigned char C0TMA1	@ 0x9F;
static volatile unsigned char P2	@ 0xA0;
static volatile unsigned char P5	@ 0xA1;
static		unsigned char P5CNT	@ 0xA2;
static volatile unsigned char C0C	@ 0xA3;
static volatile unsigned char C0S	@ 0xA4;
static volatile unsigned char C0IR	@ 0xA5;
static volatile unsigned char C0TE	@ 0xA6;
static volatile unsigned char C0RE	@ 0xA7;
static          unsigned char IE	@ 0xA8;
static          unsigned char SADDR0	@ 0xA9;
static          unsigned char SADDR1	@ 0xAA;
static volatile unsigned char C0M1C	@ 0xAB;
static volatile unsigned char C0M2C	@ 0xAC;
static volatile unsigned char C0M3C	@ 0xAD;
static volatile unsigned char C0M4C	@ 0xAE;
static volatile unsigned char C0M5C	@ 0xAF;
static volatile unsigned char P3	@ 0xB0;
static volatile unsigned char P6	@ 0xB1;
static		unsigned char P6CNT	@ 0xB2;
static volatile unsigned char C0M6C	@ 0xB3;
static volatile unsigned char C0M7C	@ 0xB4;
static volatile unsigned char C0M8C	@ 0xB5;
static volatile unsigned char C0M9C	@ 0xB6;
static volatile unsigned char C0M10C	@ 0xB7;
static          unsigned char IP	@ 0xB8;
static          unsigned char SADEN0	@ 0xB9;
static          unsigned char SADEN1	@ 0xBA;
static volatile unsigned char C0M11C	@ 0xBB;
static volatile unsigned char C0M12C	@ 0xBC;
static volatile unsigned char C0M13C	@ 0xBD;
static volatile unsigned char C0M14C	@ 0xBE;
static volatile unsigned char C0M15C	@ 0xBF;
static volatile unsigned char SCON1	@ 0xC0;
static volatile unsigned char SBUF1	@ 0xC1;
static          unsigned char PMR	@ 0xC4;
static volatile unsigned char STATUS	@ 0xC5;
static		unsigned char MCON	@ 0xC6;
static volatile unsigned char TA	@ 0xC7;
static volatile unsigned char T2CON	@ 0xC8;
static          unsigned char T2MOD	@ 0xC9;
static volatile unsigned char RCAP2L	@ 0xCA;
static volatile unsigned char RCAP2H	@ 0xCB;
static volatile unsigned char TL2	@ 0xCC;
static volatile unsigned char TH2	@ 0xCD;
static		unsigned char COR	@ 0xCE;
static volatile unsigned char PSW	@ 0xD0;
static volatile unsigned char MCNT0	@ 0xD1;
static volatile unsigned char MCNT1	@ 0xD2;
static volatile unsigned char MA	@ 0xD3;
static volatile unsigned char MB	@ 0xD4;
static volatile unsigned char MC	@ 0xD5;
static		unsigned char MCON1	@ 0xD6;
static volatile unsigned char MCON2	@ 0xD7;
static volatile unsigned char WDCON	@ 0xD8;
static		unsigned char SADDR2	@ 0xD9;
static volatile unsigned char BPA1	@ 0xDA;
static volatile unsigned char BPA2	@ 0xDB;
static volatile unsigned char BPA3	@ 0xDC;
static volatile unsigned char ACC	@ 0xE0;
static volatile unsigned char OCAD	@ 0xE1;
static volatile unsigned char CSRD	@ 0xE3;
static		unsigned char CSRA	@ 0xE4;
static volatile unsigned char EBS	@ 0xE5;
static volatile unsigned char BCUD	@ 0xE6;
static		unsigned char BCUC	@ 0xE7;
static          unsigned char EIE	@ 0xE8;
static		unsigned char MXAX	@ 0xEA;
static volatile unsigned char DPX2	@ 0xEB;
static volatile unsigned char DPX3	@ 0xED;
static		unsigned char OWMAD	@ 0xEE;
static volatile unsigned char OWMDR	@ 0xEF;
static volatile unsigned char B		@ 0xF0;
static		unsigned char SADEN2	@ 0xF1;
static volatile unsigned char DPL2	@ 0xF2;
static volatile unsigned char DPH2	@ 0xF3;
static volatile unsigned char DPL3	@ 0xF4;
static volatile unsigned char DPH3	@ 0xF5;
static		unsigned char DPS1	@ 0xF6;
static volatile unsigned char STATUS1	@ 0xF7;
static          unsigned char EIP	@ 0xF8;
static volatile unsigned char P7	@ 0xF9;
static volatile unsigned char TL3	@ 0xFB;
static volatile unsigned char TH3	@ 0xFC;
static volatile unsigned char T3CM	@ 0xFD;
static volatile unsigned char SCON2	@ 0xFE;
static volatile unsigned char SBUF2	@ 0xFF;

static volatile SFR_BITS	 P4_BITS	@ 0x80;
static          SFR_BITS	 DPS_BITS	@ 0x86;
static volatile SFR_BITS	 PCON_BITS	@ 0x87;
static volatile SFR_BITS	 TCON_BITS	@ 0x88;
static          SFR_BITS	 TMOD_BITS	@ 0x89;
static          SFR_BITS	 CKCON_BITS	@ 0x8E;
static volatile SFR_BITS	 P1_BITS	@ 0x90;
static volatile SFR_BITS	 EXIF_BITS	@ 0x91;
static		SFR_BITS	 P4CNT_BITS	@ 0x92;
static volatile SFR_BITS	 C0RMS0_BITS	@ 0x96;
static volatile SFR_BITS	 C0RMS1_BITS	@ 0x97;
static volatile SFR_BITS	 SCON0_BITS	@ 0x98;
static		SFR_BITS	 ACON_BITS	@ 0x9D;
static volatile SFR_BITS	 C0TMA0_BITS	@ 0x9E;
static volatile SFR_BITS	 C0TMA1_BITS	@ 0x9F;
static volatile SFR_BITS	 P2_BITS	@ 0xA0;
static volatile SFR_BITS	 P5_BITS	@ 0xA1;
static		SFR_BITS	 P5CNT_BITS	@ 0xA2;
static volatile SFR_BITS	 C0C_BITS	@ 0xA3;
static volatile SFR_BITS	 C0S_BITS	@ 0xA4;
static volatile SFR_BITS	 C0IR_BITS	@ 0xA5;
static volatile SFR_BITS	 C0TE_BITS	@ 0xA6;
static volatile SFR_BITS	 C0RE_BITS	@ 0xA7;
static          SFR_BITS	 IE_BITS	@ 0xA8;
static volatile SFR_BITS	 C0M1C_BITS	@ 0xAB;
static volatile SFR_BITS	 C0M2C_BITS	@ 0xAC;
static volatile SFR_BITS	 C0M3C_BITS	@ 0xAD;
static volatile SFR_BITS	 C0M4C_BITS	@ 0xAE;
static volatile SFR_BITS	 C0M5C_BITS	@ 0xAF;
static volatile SFR_BITS	 P3_BITS	@ 0xB0;
static volatile SFR_BITS	 P6_BITS	@ 0xB1;
static		SFR_BITS	 P6CNT_BITS	@ 0xB2;
static volatile SFR_BITS	 C0M6C_BITS	@ 0xB3;
static volatile SFR_BITS	 C0M7C_BITS	@ 0xB4;
static volatile SFR_BITS	 C0M8C_BITS	@ 0xB5;
static volatile SFR_BITS	 C0M9C_BITS	@ 0xB6;
static volatile SFR_BITS	 C0M10C_BITS	@ 0xB7;
static          SFR_BITS	 IP_BITS	@ 0xB8;
static volatile SFR_BITS	 C0M11C_BITS	@ 0xBB;
static volatile SFR_BITS	 C0M12C_BITS	@ 0xBC;
static volatile SFR_BITS	 C0M13C_BITS	@ 0xBD;
static volatile SFR_BITS	 C0M14C_BITS	@ 0xBE;
static volatile SFR_BITS	 C0M15C_BITS	@ 0xBF;
static volatile SFR_BITS	 SCON1_BITS	@ 0xC0;
static          SFR_BITS	 PMR_BITS	@ 0xC4;
static volatile SFR_BITS	 STATUS_BITS	@ 0xC5;
static		SFR_BITS	 MCON_BITS	@ 0xC6;
static volatile SFR_BITS	 TA_BITS	@ 0xC7;
static volatile SFR_BITS	 T2CON_BITS	@ 0xC8;
static          SFR_BITS	 T2MOD_BITS	@ 0xC9;
static		SFR_BITS	 COR_BITS	@ 0xCE;
static volatile SFR_BITS	 PSW_BITS	@ 0xD0;
static		SFR_BITS	 MCON1_BITS	@ 0xD6;
static volatile SFR_BITS	 MCON2_BITS	@ 0xD7;
static volatile SFR_BITS	 WDCON_BITS	@ 0xD8;
static volatile SFR_BITS	 ACC_BITS	@ 0xE0;
static volatile SFR_BITS	 EBS_BITS	@ 0xE5;
static volatile SFR_BITS	 BCUD_BITS	@ 0xE6;
static		SFR_BITS	 BCUC_BITS	@ 0xE7;
static          SFR_BITS	 EIE_BITS	@ 0xE8;
static volatile SFR_BITS	 B_BITS		@ 0xF0;
static		SFR_BITS	 DPS1_BITS	@ 0xF6;
static volatile SFR_BITS	 STATUS1_BITS	@ 0xF7;
static          SFR_BITS	 EIP_BITS	@ 0xF8;
static volatile SFR_BITS	 P7_BITS	@ 0xF9;
static volatile SFR_BITS	 T3CM_BITS	@ 0xFD;
static volatile SFR_BITS	 SCON2_BITS	@ 0xFE;
static volatile SFR_BITS	 SBUF2_BITS	@ 0xFF;

// CAN rtegisters
// CAN control/status/mask registers
static volatile xdata unsigned char	C0MID0		@ 0xDB00;
static volatile xdata unsigned char	C0MA0		@ 0xDB01;
static volatile xdata unsigned char	C0MID1		@ 0xDB02;
static volatile xdata unsigned char	C0MA1		@ 0xDB03;
static volatile xdata unsigned char	C0BT0		@ 0xDB04;
static volatile xdata unsigned char	C0BT1		@ 0xDB05;
static		xdata unsigned char	C0SGM0		@ 0xDB06;
static		xdata unsigned char	C0SGM1		@ 0xDB07;
static		xdata unsigned char	C0EGM0		@ 0xDB08;
static		xdata unsigned char	C0EGM1		@ 0xDB09;
static		xdata unsigned char	C0EGM2		@ 0xDB0A;
static		xdata unsigned char	C0EGM3		@ 0xDB0B;
static		xdata unsigned char	C0M15M0		@ 0xDB0C;
static		xdata unsigned char	C0M15M1		@ 0xDB0D;
static		xdata unsigned char	C0M15M2		@ 0xDB0E;
static		xdata unsigned char	C0M15M3		@ 0xDB0F;
// CAN 0 message center 1
static		xdata unsigned char	C0M1AR0		@ 0xDB12;
static		xdata unsigned char	C0M1AR1		@ 0xDB13;
static		xdata unsigned char	C0M1AR2		@ 0xDB14;
static		xdata unsigned char	C0M1AR3		@ 0xDB15;
static		xdata unsigned char	C0M1F		@ 0xDB16;
static volatile xdata unsigned char	C0M1D0		@ 0xDB17;
static volatile xdata unsigned char	C0M1D1		@ 0xDB18;
static volatile xdata unsigned char	C0M1D2		@ 0xDB19;
static volatile xdata unsigned char	C0M1D3		@ 0xDB1A;
static volatile xdata unsigned char	C0M1D4		@ 0xDB1B;
static volatile xdata unsigned char	C0M1D5		@ 0xDB1C;
static volatile xdata unsigned char	C0M1D6		@ 0xDB1D;
static volatile xdata unsigned char	C0M1D7		@ 0xDB1E;
// CAN 0 message center 1
static		xdata unsigned char	C0M2AR0		@ 0xDB22;
static		xdata unsigned char	C0M2AR1		@ 0xDB23;
static		xdata unsigned char	C0M2AR2		@ 0xDB24;
static		xdata unsigned char	C0M2AR3		@ 0xDB25;
static		xdata unsigned char	C0M2F		@ 0xDB26;
static volatile xdata unsigned char	C0M2D0		@ 0xDB27;
static volatile xdata unsigned char	C0M2D1		@ 0xDB28;
static volatile xdata unsigned char	C0M2D2		@ 0xDB29;
static volatile xdata unsigned char	C0M2D3		@ 0xDB2A;
static volatile xdata unsigned char	C0M2D4		@ 0xDB2B;
static volatile xdata unsigned char	C0M2D5		@ 0xDB2C;
static volatile xdata unsigned char	C0M2D6		@ 0xDB2D;
static volatile xdata unsigned char	C0M2D7		@ 0xDB2E;
// CAN 0 message center 1
static		xdata unsigned char	C0M3AR0		@ 0xDB32;
static		xdata unsigned char	C0M3AR1		@ 0xDB33;
static		xdata unsigned char	C0M3AR2		@ 0xDB34;
static		xdata unsigned char	C0M3AR3		@ 0xDB35;
static		xdata unsigned char	C0M3F		@ 0xDB36;
static volatile xdata unsigned char	C0M3D0		@ 0xDB37;
static volatile xdata unsigned char	C0M3D1		@ 0xDB38;
static volatile xdata unsigned char	C0M3D2		@ 0xDB39;
static volatile xdata unsigned char	C0M3D3		@ 0xDB3A;
static volatile xdata unsigned char	C0M3D4		@ 0xDB3B;
static volatile xdata unsigned char	C0M3D5		@ 0xDB3C;
static volatile xdata unsigned char	C0M3D6		@ 0xDB3D;
static volatile xdata unsigned char	C0M3D7		@ 0xDB3E;
// CAN 0 message center 1
static		xdata unsigned char	C0M4AR0		@ 0xDB42;
static		xdata unsigned char	C0M4AR1		@ 0xDB43;
static		xdata unsigned char	C0M4AR2		@ 0xDB44;
static		xdata unsigned char	C0M4AR3		@ 0xDB45;
static		xdata unsigned char	C0M4F		@ 0xDB46;
static volatile xdata unsigned char	C0M4D0		@ 0xDB47;
static volatile xdata unsigned char	C0M4D1		@ 0xDB48;
static volatile xdata unsigned char	C0M4D2		@ 0xDB49;
static volatile xdata unsigned char	C0M4D3		@ 0xDB4A;
static volatile xdata unsigned char	C0M4D4		@ 0xDB4B;
static volatile xdata unsigned char	C0M4D5		@ 0xDB4C;
static volatile xdata unsigned char	C0M4D6		@ 0xDB4D;
static volatile xdata unsigned char	C0M4D7		@ 0xDB4E;
// CAN 0 message center 1
static		xdata unsigned char	C0M5AR0		@ 0xDB52;
static		xdata unsigned char	C0M5AR1		@ 0xDB53;
static		xdata unsigned char	C0M5AR2		@ 0xDB54;
static		xdata unsigned char	C0M5AR3		@ 0xDB55;
static		xdata unsigned char	C0M5F		@ 0xDB56;
static volatile xdata unsigned char	C0M5D0		@ 0xDB57;
static volatile xdata unsigned char	C0M5D1		@ 0xDB58;
static volatile xdata unsigned char	C0M5D2		@ 0xDB59;
static volatile xdata unsigned char	C0M5D3		@ 0xDB5A;
static volatile xdata unsigned char	C0M5D4		@ 0xDB5B;
static volatile xdata unsigned char	C0M5D5		@ 0xDB5C;
static volatile xdata unsigned char	C0M5D6		@ 0xDB5D;
static volatile xdata unsigned char	C0M5D7		@ 0xDB5E;
// CAN 0 message center 1
static		xdata unsigned char	C0M6AR0		@ 0xDB62;
static		xdata unsigned char	C0M6AR1		@ 0xDB63;
static		xdata unsigned char	C0M6AR2		@ 0xDB64;
static		xdata unsigned char	C0M6AR3		@ 0xDB65;
static		xdata unsigned char	C0M6F		@ 0xDB66;
static volatile xdata unsigned char	C0M6D0		@ 0xDB67;
static volatile xdata unsigned char	C0M6D1		@ 0xDB68;
static volatile xdata unsigned char	C0M6D2		@ 0xDB69;
static volatile xdata unsigned char	C0M6D3		@ 0xDB6A;
static volatile xdata unsigned char	C0M6D4		@ 0xDB6B;
static volatile xdata unsigned char	C0M6D5		@ 0xDB6C;
static volatile xdata unsigned char	C0M6D6		@ 0xDB6D;
static volatile xdata unsigned char	C0M6D7		@ 0xDB6E;
// CAN 0 message center 1
static		xdata unsigned char	C0M7AR0		@ 0xDB72;
static		xdata unsigned char	C0M7AR1		@ 0xDB73;
static		xdata unsigned char	C0M7AR2		@ 0xDB74;
static		xdata unsigned char	C0M7AR3		@ 0xDB75;
static		xdata unsigned char	C0M7F		@ 0xDB76;
static volatile xdata unsigned char	C0M7D0		@ 0xDB77;
static volatile xdata unsigned char	C0M7D1		@ 0xDB78;
static volatile xdata unsigned char	C0M7D2		@ 0xDB79;
static volatile xdata unsigned char	C0M7D3		@ 0xDB7A;
static volatile xdata unsigned char	C0M7D4		@ 0xDB7B;
static volatile xdata unsigned char	C0M7D5		@ 0xDB7C;
static volatile xdata unsigned char	C0M7D6		@ 0xDB7D;
static volatile xdata unsigned char	C0M7D7		@ 0xDB7E;
// CAN 0 message center 1
static		xdata unsigned char	C0M8AR0		@ 0xDB82;
static		xdata unsigned char	C0M8AR1		@ 0xDB83;
static		xdata unsigned char	C0M8AR2		@ 0xDB84;
static		xdata unsigned char	C0M8AR3		@ 0xDB85;
static		xdata unsigned char	C0M8F		@ 0xDB86;
static volatile xdata unsigned char	C0M8D0		@ 0xDB87;
static volatile xdata unsigned char	C0M8D1		@ 0xDB88;
static volatile xdata unsigned char	C0M8D2		@ 0xDB89;
static volatile xdata unsigned char	C0M8D3		@ 0xDB8A;
static volatile xdata unsigned char	C0M8D4		@ 0xDB8B;
static volatile xdata unsigned char	C0M8D5		@ 0xDB8C;
static volatile xdata unsigned char	C0M8D6		@ 0xDB8D;
static volatile xdata unsigned char	C0M8D7		@ 0xDB8E;
// CAN 0 message center 1
static		xdata unsigned char	C0M9AR0		@ 0xDB92;
static		xdata unsigned char	C0M9AR1		@ 0xDB93;
static		xdata unsigned char	C0M9AR2		@ 0xDB94;
static		xdata unsigned char	C0M9AR3		@ 0xDB95;
static		xdata unsigned char	C0M9F		@ 0xDB96;
static volatile xdata unsigned char	C0M9D0		@ 0xDB97;
static volatile xdata unsigned char	C0M9D1		@ 0xDB98;
static volatile xdata unsigned char	C0M9D2		@ 0xDB99;
static volatile xdata unsigned char	C0M9D3		@ 0xDB9A;
static volatile xdata unsigned char	C0M9D4		@ 0xDB9B;
static volatile xdata unsigned char	C0M9D5		@ 0xDB9C;
static volatile xdata unsigned char	C0M9D6		@ 0xDB9D;
static volatile xdata unsigned char	C0M9D7		@ 0xDB9E;
// CAN 0 message center 1
static		xdata unsigned char	C0M10AR0	@ 0xDBA2;
static		xdata unsigned char	C0M10AR1	@ 0xDBA3;
static		xdata unsigned char	C0M10AR2	@ 0xDBA4;
static		xdata unsigned char	C0M10AR3	@ 0xDBA5;
static		xdata unsigned char	C0M10F		@ 0xDBA6;
static volatile xdata unsigned char	C0M10D0		@ 0xDBA7;
static volatile xdata unsigned char	C0M10D1		@ 0xDBA8;
static volatile xdata unsigned char	C0M10D2		@ 0xDBA9;
static volatile xdata unsigned char	C0M10D3		@ 0xDBAA;
static volatile xdata unsigned char	C0M10D4		@ 0xDBAB;
static volatile xdata unsigned char	C0M10D5		@ 0xDBAC;
static volatile xdata unsigned char	C0M10D6		@ 0xDBAD;
static volatile xdata unsigned char	C0M10D7		@ 0xDBAE;
// CAN 0 message center 1
static		xdata unsigned char	C0M11AR0	@ 0xDBB2;
static		xdata unsigned char	C0M11AR1	@ 0xDBB3;
static		xdata unsigned char	C0M11AR2	@ 0xDBB4;
static		xdata unsigned char	C0M11AR3	@ 0xDBB5;
static		xdata unsigned char	C0M11F		@ 0xDBB6;
static volatile xdata unsigned char	C0M11D0		@ 0xDBB7;
static volatile xdata unsigned char	C0M11D1		@ 0xDBB8;
static volatile xdata unsigned char	C0M11D2		@ 0xDBB9;
static volatile xdata unsigned char	C0M11D3		@ 0xDBBA;
static volatile xdata unsigned char	C0M11D4		@ 0xDBBB;
static volatile xdata unsigned char	C0M11D5		@ 0xDBBC;
static volatile xdata unsigned char	C0M11D6		@ 0xDBBD;
static volatile xdata unsigned char	C0M11D7		@ 0xDBBE;
// CAN 0 message center 1
static		xdata unsigned char	C0M12AR0	@ 0xDBC2;
static		xdata unsigned char	C0M12AR1	@ 0xDBC3;
static		xdata unsigned char	C0M12AR2	@ 0xDBC4;
static		xdata unsigned char	C0M12AR3	@ 0xDBC5;
static		xdata unsigned char	C0M12F		@ 0xDBC6;
static volatile xdata unsigned char	C0M12D0		@ 0xDBC7;
static volatile xdata unsigned char	C0M12D1		@ 0xDBC8;
static volatile xdata unsigned char	C0M12D2		@ 0xDBC9;
static volatile xdata unsigned char	C0M12D3		@ 0xDBCA;
static volatile xdata unsigned char	C0M12D4		@ 0xDBCB;
static volatile xdata unsigned char	C0M12D5		@ 0xDBCC;
static volatile xdata unsigned char	C0M12D6		@ 0xDBCD;
static volatile xdata unsigned char	C0M12D7		@ 0xDBCE;
// CAN 0 message center 1
static		xdata unsigned char	C0M13AR0	@ 0xDBD2;
static		xdata unsigned char	C0M13AR1	@ 0xDBD3;
static		xdata unsigned char	C0M13AR2	@ 0xDBD4;
static		xdata unsigned char	C0M13AR3	@ 0xDBD5;
static		xdata unsigned char	C0M13F		@ 0xDBD6;
static volatile xdata unsigned char	C0M13D0		@ 0xDBD7;
static volatile xdata unsigned char	C0M13D1		@ 0xDBD8;
static volatile xdata unsigned char	C0M13D2		@ 0xDBD9;
static volatile xdata unsigned char	C0M13D3		@ 0xDBDA;
static volatile xdata unsigned char	C0M13D4		@ 0xDBDB;
static volatile xdata unsigned char	C0M13D5		@ 0xDBDC;
static volatile xdata unsigned char	C0M13D6		@ 0xDBDD;
static volatile xdata unsigned char	C0M13D7		@ 0xDBDE;
// CAN 0 message center 1
static		xdata unsigned char	C0M14AR0	@ 0xDBE2;
static		xdata unsigned char	C0M14AR1	@ 0xDBE3;
static		xdata unsigned char	C0M14AR2	@ 0xDBE4;
static		xdata unsigned char	C0M14AR3	@ 0xDBE5;
static		xdata unsigned char	C0M14F		@ 0xDBE6;
static volatile xdata unsigned char	C0M14D0		@ 0xDBE7;
static volatile xdata unsigned char	C0M14D1		@ 0xDBE8;
static volatile xdata unsigned char	C0M14D2		@ 0xDBE9;
static volatile xdata unsigned char	C0M14D3		@ 0xDBEA;
static volatile xdata unsigned char	C0M14D4		@ 0xDBEB;
static volatile xdata unsigned char	C0M14D5		@ 0xDBEC;
static volatile xdata unsigned char	C0M14D6		@ 0xDBED;
static volatile xdata unsigned char	C0M14D7		@ 0xDBEE;
// CAN 0 message center 1
static		xdata unsigned char	C0M15AR0	@ 0xDBF2;
static		xdata unsigned char	C0M15AR1	@ 0xDBF3;
static		xdata unsigned char	C0M15AR2	@ 0xDBF4;
static		xdata unsigned char	C0M15AR3	@ 0xDBF5;
static		xdata unsigned char	C0M15F		@ 0xDBF6;
static volatile xdata unsigned char	C0M15D0		@ 0xDBF7;
static volatile xdata unsigned char	C0M15D1		@ 0xDBF8;
static volatile xdata unsigned char	C0M15D2		@ 0xDBF9;
static volatile xdata unsigned char	C0M15D3		@ 0xDBFA;
static volatile xdata unsigned char	C0M15D4		@ 0xDBFB;
static volatile xdata unsigned char	C0M15D5		@ 0xDBFC;
static volatile xdata unsigned char	C0M15D6		@ 0xDBFD;
static volatile xdata unsigned char	C0M15D7		@ 0xDBFE;


// Bit Addressable Locations
// Port 4
static volatile bit	P40	@ 0x80;
static volatile bit	P41	@ 0x81;
static volatile bit	P42	@ 0x82;
static volatile bit	P43	@ 0x83;
static volatile bit	P44	@ 0x84;
static volatile bit	P45	@ 0x85;
static volatile bit	P46	@ 0x86;
static volatile bit	P47	@ 0x87;
// alternate functions
static volatile bit	CE0	@ 0x80;
static volatile bit	CE1	@ 0x81;
static volatile bit	CE2	@ 0x82;
static volatile bit	CE3	@ 0x83;
static volatile bit	AD16	@ 0x84;
static volatile bit	AD17	@ 0x85;
static volatile bit	AD18	@ 0x86;
static volatile bit	AD19	@ 0x87;

// Timer Control TCON
static 		bit	IT0	@ 0x88;
static volatile bit	IE0	@ 0x89;
static 		bit	IT1	@ 0x8A;
static volatile bit	IE1	@ 0x8B;
static 		bit	TR0	@ 0x8C;
static volatile bit	TF0	@ 0x8D;
static 		bit	TR1	@ 0x8E;
static volatile bit	TF1	@ 0x8F;

// Port 1 P1
static volatile bit	P10	@ 0x90;
static volatile bit	P11	@ 0x91;
static volatile bit	P12	@ 0x92;
static volatile bit	P13	@ 0x93;
static volatile bit	P14	@ 0x94;
static volatile bit	P15	@ 0x95;
static volatile bit	P16	@ 0x96;
static volatile bit	P17	@ 0x97;
// alternate functions
static volatile bit	T2	@ 0x90;
static volatile bit	T2EX	@ 0x91;
static volatile bit	RXD1	@ 0x92;
static volatile bit	TXD1	@ 0x93;
static volatile bit	INT2	@ 0x94;
static volatile bit	INT3	@ 0x95;
static volatile bit	INT4	@ 0x96;
static volatile bit	INT5	@ 0x97;

// Serial Control Register 0 SCON0
static volatile bit	RI_0	@ 0x98;
static volatile bit	TI_0	@ 0x99;
static volatile bit	RB8_0	@ 0x9A;
static 		bit	TB8_0	@ 0x9B;
static 		bit	REN_0	@ 0x9C;
static 		bit	SM2_0	@ 0x9D;
static 		bit	SM1_0	@ 0x9E;
static 		bit	SM0_0	@ 0x9F;
// alternate function
static 		bit	FE_0	@ 0x9F;

// Port 2 P2
static volatile bit	P20	@ 0xA0;
static volatile bit	P21	@ 0xA1;
static volatile bit	P22	@ 0xA2;
static volatile bit	P23	@ 0xA3;
static volatile bit	P24	@ 0xA4;
static volatile bit	P25	@ 0xA5;
static volatile bit	P26	@ 0xA6;
static volatile bit	P27	@ 0xA7;
// Alternate Functions
static volatile bit	A8	@ 0xA0;
static volatile bit	A9	@ 0xA1;
static volatile bit	A10	@ 0xA2;
static volatile bit	A11	@ 0xA3;
static volatile bit	A12	@ 0xA4;
static volatile bit	A13	@ 0xA5;
static volatile bit	A14	@ 0xA6;
static volatile bit	A15	@ 0xA7;

// Interrupt Enable IE
static		bit	EX0	@ 0xA8;
static		bit	ET0	@ 0xA9;
static		bit	EX1	@ 0xAA;
static		bit	ET1	@ 0xAB;
static 		bit	ES0	@ 0xAC;
static 		bit	ET2	@ 0xAD;
static 		bit	ES1	@ 0xAE;
static 		bit	EA	@ 0xAF;

// Port 3 P3
static volatile bit	P30	@ 0xB0;
static volatile bit	P31	@ 0xB1;
static volatile bit	P32	@ 0xB2;
static volatile bit	P33	@ 0xB3;
static volatile bit	P34	@ 0xB4;
static volatile bit	P35	@ 0xB5;
static volatile bit	P36	@ 0xB6;
static volatile bit	P37	@ 0xB7;
// Alternate Functions
static volatile bit	RXD0	@ 0xB0;
static volatile bit	TXD0	@ 0xB1;
static volatile bit	INT0	@ 0xB2;
static volatile bit	INT1	@ 0xB3;
static volatile bit	T0	@ 0xB4;
static volatile bit	T1	@ 0xB5;
static volatile bit	WR	@ 0xB6;
static volatile bit	RD	@ 0xB7;

// Interrupt Priority
static 		bit	PX0	@ 0xB8;
static 		bit	PT0	@ 0xB9;
static 		bit	PX1	@ 0xBA;
static 		bit	PT1	@ 0xBB;
static 		bit	PS0	@ 0xBC;
static 		bit	PT2	@ 0xBD;
static 		bit	PS1	@ 0xBE;

// Serial Control 1 SCON1
static volatile	bit	RI_1	@ 0xC0;
static volatile	bit	TI_1	@ 0xC1;
static volatile	bit	RB8_1	@ 0xC2;
static 		bit	TB8_1	@ 0xC3;
static 		bit	REN_1	@ 0xC4;
static 		bit	SM2_1	@ 0xC5;
static 		bit	SM1_1	@ 0xC6;
static volatile	bit	SM0_1	@ 0xC7;
// Alternate function
static volatile	bit	FE_1	@ 0xC7;

// Timer 2 Control T2CON
static 		bit	CPRL2	@ 0xC8;
static 		bit	CT2	@ 0xC9;
static 		bit	TR2	@ 0xCA;
static 		bit	EXEN2	@ 0xCB;
static		bit	TCLK	@ 0xCC;
static		bit	RCLK	@ 0xCD;
static volatile	bit	EXF2	@ 0xCE;
static volatile	bit	TF2	@ 0xCF;

// Program Status Word PSW
static volatile bit	P	@ 0xD0;
static volatile bit	F1	@ 0xD1;
static volatile bit	OV	@ 0xD2;
static 		bit	RS0	@ 0xD3;
static 		bit	RS1	@ 0xD4;
static volatile bit	F0	@ 0xD5;
static volatile bit	AC	@ 0xD6;
static volatile bit	CY	@ 0xD7;

// Watchdog Control WDCON
static volatile bit	RWT	@ 0xD8;
static		bit	EWT	@ 0xD9;
static volatile bit	WTRF	@ 0xDA;
static volatile bit	WDIF	@ 0xDB;
static volatile bit	PFI	@ 0xDC;
static		bit	EPFI	@ 0xDD;
static volatile bit	POR	@ 0xDE;
static volatile bit	SMOD_1	@ 0xDF;

// Accumulator ACC
static volatile bit	ACC0	@ 0xE0;
static volatile bit	ACC1	@ 0xE1;
static volatile bit	ACC2	@ 0xE2;
static volatile bit	ACC3	@ 0xE3;
static volatile bit	ACC4	@ 0xE4;
static volatile bit	ACC5	@ 0xE5;
static volatile bit	ACC6	@ 0xE6;
static volatile bit	ACC7	@ 0xE7;

// Extended Interrupt Enable EIE
static		bit	EX25	@ 0xE8;
static		bit	ET3	@ 0xE9;
static		bit	ES2	@ 0xEA;
static		bit	EWPI	@ 0xEB;
static		bit	EWDI	@ 0xEC;
static		bit	EAIE	@ 0xED;
static		bit	C0IE	@ 0xEE;
static		bit	EPMIE	@ 0xEF;

// B register
static volatile bit	B0	@ 0xF0;
static volatile bit	B1	@ 0xF1;
static volatile bit	B2	@ 0xF2;
static volatile bit	B3	@ 0xF3;
static volatile bit	B4	@ 0xF4;
static volatile bit	B5	@ 0xF5;
static volatile bit	B6	@ 0xF6;
static volatile bit	B7	@ 0xF7;

// Extended Interrupt Priority EIP
static		bit	PX25	@ 0xF8;
static		bit	PT3	@ 0xF9;
static		bit	PS2	@ 0xFA;
static		bit	PWPI	@ 0xFB;
static		bit	PWDI	@ 0xFC;
static		bit	EAIP	@ 0xFD;
static		bit	C0IP	@ 0xFE;
static		bit	EPMIP	@ 0xFF;


// Interrupt Vectors
#define	RESET	0
#define	EXTINT0	0x03
#define TIMER0	0x0B
#define	EXTINT1	0x13
#define	TIMER1	0x1B
#define	SERIAL	0x23
#define	TIMER2	0x2B
#define	PWRFAIL	0x33
#define	SERIAL1	0x3B
#define	EXT2_5	0x43
#define	TIMER3	0x4B
#define	SERIAL2	0x53
#define	WPROT	0x5B
#define	WDT	0x63
#define	CAN0	0x6B
#define	ETHER	0x73
#define	ETHERPM	0x7B

#endif
