		LIST
;mc32p8141.inc    Standard Header File, Version 1.00 by Sinomcu
		NOLIST

;==========================================================================
;
;	Verify Processor
;
;==========================================================================

;	IFNDEF __32P8141
;		MESSG "Processor-header file mismatch.  Verify selected processor."
;	ENDIF

;==========================================================================
;
;	Register Definitions
;
;==========================================================================

;----- Register Files ---------------------------------------------------

INDF0     		EQU		H'0180'
INDF1     		EQU		H'0181'
INDF2     		EQU		H'0182'
HIBYTE    		EQU		H'0183'
FSR0      		EQU		H'0184'
FSR1      		EQU		H'0185'
PCL       		EQU		H'0186'
PFLAG     		EQU		H'0187'
MCR       		EQU		H'0188'
INDF3     		EQU		H'0189'
INTE      		EQU		H'018A'
INTF      		EQU		H'018B'
OSCMR     		EQU		H'018C'
LVDCR     		EQU		H'018D'
DRVCR     		EQU		H'018E'
IOP0      		EQU		H'0190'
OEP0      		EQU		H'0191'
PUP0      		EQU		H'0192'
PDP0      		EQU		H'0193'
IOP1      		EQU		H'0194'
OEP1      		EQU		H'0195'
PUP1      		EQU		H'0196'
PDP1      		EQU		H'0197'
T0CR      		EQU		H'0198'
T0CNTH    		EQU		H'0199'
T0CNTL    		EQU		H'019A'
T0LOADH   		EQU		H'019B'
T0LOADL   		EQU		H'019C'
PFRCCR    		EQU		H'019E'
PFRCCAL   		EQU		H'019F'
T1CR      		EQU		H'01A0'
T1CNT     		EQU		H'01A1'
T1LOAD    		EQU		H'01A2'
T1DATA    		EQU		H'01A3'
PWM1CR0   		EQU		H'01A4'
PWM1CR1   		EQU		H'01A5'
PWM1CR2   		EQU		H'01A6'
T2CR      		EQU		H'01A8'
T2CNT     		EQU		H'01A9'
T2LOAD    		EQU		H'01AA'
T2DATA    		EQU		H'01AB'
T2DATB    		EQU		H'01AC'
PWM2CR    		EQU		H'01AD'
ADCR0     		EQU		H'01B0'
ADCR1     		EQU		H'01B1'
ADRH      		EQU		H'01B2'
ADRL      		EQU		H'01B3'
OSADJCR   		EQU		H'01B4'
P0ADCR    		EQU		H'01B5'
P1ADCR    		EQU		H'01B6'
P0KBCR    		EQU		H'01B7'
TKCR0     		EQU		H'01B8'
TKCR1     		EQU		H'01B9'
TKCNTH    		EQU		H'01BA'
TKCNTL    		EQU		H'01BB'

;----- INDF0 Bits ---------------------------------------------------

#define 	INDF00    	INDF0,0
#define 	INDF01    	INDF0,1
#define 	INDF02    	INDF0,2
#define 	INDF03    	INDF0,3
#define 	INDF04    	INDF0,4
#define 	INDF05    	INDF0,5
#define 	INDF06    	INDF0,6
#define 	INDF07    	INDF0,7

;----- INDF1 Bits ---------------------------------------------------

#define 	INDF10    	INDF1,0
#define 	INDF11    	INDF1,1
#define 	INDF12    	INDF1,2
#define 	INDF13    	INDF1,3
#define 	INDF14    	INDF1,4
#define 	INDF15    	INDF1,5
#define 	INDF16    	INDF1,6
#define 	INDF17    	INDF1,7

;----- INDF2 Bits ---------------------------------------------------

#define 	INDF20    	INDF2,0
#define 	INDF21    	INDF2,1
#define 	INDF22    	INDF2,2
#define 	INDF23    	INDF2,3
#define 	INDF24    	INDF2,4
#define 	INDF25    	INDF2,5
#define 	INDF26    	INDF2,6
#define 	INDF27    	INDF2,7

;----- HIBYTE Bits ---------------------------------------------------

#define 	HIBYTE0   	HIBYTE,0
#define 	HIBYTE1   	HIBYTE,1
#define 	HIBYTE2   	HIBYTE,2
#define 	HIBYTE3   	HIBYTE,3
#define 	HIBYTE4   	HIBYTE,4
#define 	HIBYTE5   	HIBYTE,5
#define 	HIBYTE6   	HIBYTE,6
#define 	HIBYTE7   	HIBYTE,7

;----- FSR0 Bits ---------------------------------------------------

#define 	FSR00     	FSR0,0
#define 	FSR01     	FSR0,1
#define 	FSR02     	FSR0,2
#define 	FSR03     	FSR0,3
#define 	FSR04     	FSR0,4
#define 	FSR05     	FSR0,5
#define 	FSR06     	FSR0,6
#define 	FSR07     	FSR0,7

;----- FSR1 Bits ---------------------------------------------------

#define 	FSR10     	FSR1,0
#define 	FSR11     	FSR1,1
#define 	FSR12     	FSR1,2
#define 	FSR13     	FSR1,3
#define 	FSR14     	FSR1,4
#define 	FSR15     	FSR1,5
#define 	FSR16     	FSR1,6
#define 	FSR17     	FSR1,7

;----- PCL Bits ---------------------------------------------------

#define 	PC0       	PCL,0
#define 	PC1       	PCL,1
#define 	PC2       	PCL,2
#define 	PC3       	PCL,3
#define 	PC4       	PCL,4
#define 	PC5       	PCL,5
#define 	PC6       	PCL,6
#define 	PC7       	PCL,7

;----- PFLAG Bits ---------------------------------------------------

#define 	C         	PFLAG,0
#define 	DC        	PFLAG,1
#define 	Z         	PFLAG,2

;----- MCR Bits ---------------------------------------------------

#define 	INT0M0    	MCR,0
#define 	INT0M1    	MCR,1
#define 	INT1M0    	MCR,2
#define 	INT1M1    	MCR,3
#define 	PD        	MCR,4
#define 	TO        	MCR,5
#define 	GIE       	MCR,7

;----- INDF3 Bits ---------------------------------------------------

#define 	INDF30    	INDF3,0
#define 	INDF31    	INDF3,1
#define 	INDF32    	INDF3,2
#define 	INDF33    	INDF3,3
#define 	INDF34    	INDF3,4
#define 	INDF35    	INDF3,5
#define 	INDF36    	INDF3,6
#define 	INDF37    	INDF3,7

;----- INTE Bits ---------------------------------------------------

#define 	T0IE      	INTE,0
#define 	T1IE      	INTE,1
#define 	INT0IE    	INTE,2
#define 	INT1IE    	INTE,3
#define 	KBIE      	INTE,4
#define 	ADIE      	INTE,5
#define 	LVDIE     	INTE,6
#define 	T2IE      	INTE,7

;----- INTF Bits ---------------------------------------------------

#define 	T0IF      	INTF,0
#define 	T1IF      	INTF,1
#define 	INT0IF    	INTF,2
#define 	INT1IF    	INTF,3
#define 	KBIF      	INTF,4
#define 	ADIF      	INTF,5
#define 	LVDIF     	INTF,6
#define 	T2IF      	INTF,7

;----- OSCMR Bits ---------------------------------------------------

#define 	HFEN      	OSCMR,0
#define 	LFEN      	OSCMR,1
#define 	CLKS      	OSCMR,2
#define 	STBH      	OSCMR,4
#define 	STBL      	OSCMR,5

;----- LVDCR Bits ---------------------------------------------------

#define 	LVDF      	LVDCR,0
#define 	LVDVS0    	LVDCR,3
#define 	LVDVS1    	LVDCR,4
#define 	LVDVS2    	LVDCR,5
#define 	LVDEN     	LVDCR,7

;----- DRVCR Bits ---------------------------------------------------

#define 	NMOS0ON   	DRVCR,0
#define 	NMOS1ON   	DRVCR,1
#define 	P00PDR    	DRVCR,2
#define 	P03PDR    	DRVCR,3

;----- IOP0 Bits ---------------------------------------------------

#define 	P00D      	IOP0,0
#define 	P01D      	IOP0,1
#define 	P02D      	IOP0,2
#define 	P03D      	IOP0,3
#define 	P04D      	IOP0,4
#define 	P05D      	IOP0,5
#define 	P06D      	IOP0,6
#define 	P07D      	IOP0,7

;----- OEP0 Bits ---------------------------------------------------

#define 	P00OE     	OEP0,0
#define 	P01OE     	OEP0,1
#define 	P02OE     	OEP0,2
#define 	P03OE     	OEP0,3
#define 	P04OE     	OEP0,4
#define 	P05OE     	OEP0,5
#define 	P06OE     	OEP0,6
#define 	P07OE     	OEP0,7

;----- PUP0 Bits ---------------------------------------------------

#define 	P00PU     	PUP0,0
#define 	P01PU     	PUP0,1
#define 	P02PU     	PUP0,2
#define 	P03PU     	PUP0,3
#define 	P04PU     	PUP0,4
#define 	P05PU     	PUP0,5
#define 	P06PU     	PUP0,6
#define 	P07PU     	PUP0,7

;----- PDP0 Bits ---------------------------------------------------

#define 	P00PD     	PDP0,0
#define 	P01PD     	PDP0,1
#define 	P02PD     	PDP0,2
#define 	P03PD     	PDP0,3
#define 	P04PD     	PDP0,4
#define 	P05PD     	PDP0,5
#define 	P06PD     	PDP0,6
#define 	P07PD     	PDP0,7

;----- IOP1 Bits ---------------------------------------------------

#define 	P10D      	IOP1,0
#define 	P11D      	IOP1,1
#define 	P12D      	IOP1,2
#define 	P13D      	IOP1,3
#define 	P14D      	IOP1,4
#define 	P15D      	IOP1,5
#define 	P16D      	IOP1,6
#define 	P17D      	IOP1,7

;----- OEP1 Bits ---------------------------------------------------

#define 	P10OE     	OEP1,0
#define 	P11OE     	OEP1,1
#define 	P12OE     	OEP1,2
#define 	P13OE     	OEP1,3
#define 	P14OE     	OEP1,4
#define 	P15OE     	OEP1,5
#define 	P16OE     	OEP1,6
#define 	P17OE     	OEP1,7

;----- PUP1 Bits ---------------------------------------------------

#define 	P10PU     	PUP1,0
#define 	P11PU     	PUP1,1
#define 	P12PU     	PUP1,2
#define 	P13PU     	PUP1,3
#define 	P14PU     	PUP1,4
#define 	P15PU     	PUP1,5
#define 	P16PU     	PUP1,6
#define 	P17PU     	PUP1,7

;----- PDP1 Bits ---------------------------------------------------

#define 	P10PD     	PDP1,0
#define 	P11PD     	PDP1,1
#define 	P12PD     	PDP1,2
#define 	P13PD     	PDP1,3
#define 	P14PD     	PDP1,4
#define 	P15PD     	PDP1,5
#define 	P16PD     	PDP1,6
#define 	P17PD     	PDP1,7

;----- T0CR Bits ---------------------------------------------------

#define 	T0PRS0    	T0CR,0
#define 	T0PRS1    	T0CR,1
#define 	T0PRS2    	T0CR,2
#define 	T0CKS0    	T0CR,3
#define 	T0CKS1    	T0CR,4
#define 	T0MOD     	T0CR,6
#define 	T0EN      	T0CR,7

;----- T0CNTH Bits ---------------------------------------------------

#define 	T0CNT8    	T0CNTH,0
#define 	T0CNT9    	T0CNTH,1
#define 	T0CNT10   	T0CNTH,2
#define 	T0CNT11   	T0CNTH,3
#define 	T0CNT12   	T0CNTH,4
#define 	T0CNT13   	T0CNTH,5
#define 	T0CNT14   	T0CNTH,6
#define 	T0CNT15   	T0CNTH,7

;----- T0CNTL Bits ---------------------------------------------------

#define 	T0CNT0    	T0CNTL,0
#define 	T0CNT1    	T0CNTL,1
#define 	T0CNT2    	T0CNTL,2
#define 	T0CNT3    	T0CNTL,3
#define 	T0CNT4    	T0CNTL,4
#define 	T0CNT5    	T0CNTL,5
#define 	T0CNT6    	T0CNTL,6
#define 	T0CNT7    	T0CNTL,7

;----- T0LOADH Bits ---------------------------------------------------

#define 	T0LOAD8   	T0LOADH,0
#define 	T0LOAD9   	T0LOADH,1
#define 	T0LOAD10  	T0LOADH,2
#define 	T0LOAD11  	T0LOADH,3
#define 	T0LOAD12  	T0LOADH,4
#define 	T0LOAD13  	T0LOADH,5
#define 	T0LOAD14  	T0LOADH,6
#define 	T0LOAD15  	T0LOADH,7

;----- T0LOADL Bits ---------------------------------------------------

#define 	T0LOAD0   	T0LOADL,0
#define 	T0LOAD1   	T0LOADL,1
#define 	T0LOAD2   	T0LOADL,2
#define 	T0LOAD3   	T0LOADL,3
#define 	T0LOAD4   	T0LOADL,4
#define 	T0LOAD5   	T0LOADL,5
#define 	T0LOAD6   	T0LOADL,6
#define 	T0LOAD7   	T0LOADL,7

;----- PFRCCR Bits ---------------------------------------------------

#define 	PFRCEN    	PFRCCR,7

;----- PFRCCAL Bits ---------------------------------------------------

#define 	PFRCCAL0  	PFRCCAL,0
#define 	PFRCCAL1  	PFRCCAL,1
#define 	PFRCCAL2  	PFRCCAL,2
#define 	PFRCCAL3  	PFRCCAL,3
#define 	PFRCCAL4  	PFRCCAL,4
#define 	PFRCCAL5  	PFRCCAL,5
#define 	PFRCCAL6  	PFRCCAL,6
#define 	PFRCCAL7  	PFRCCAL,7

;----- T1CR Bits ---------------------------------------------------

#define 	T1PRS0    	T1CR,0
#define 	T1PRS1    	T1CR,1
#define 	T1PRS2    	T1CR,2
#define 	T1CKS0    	T1CR,3
#define 	T1CKS1    	T1CR,4
#define 	FPWM1EN   	T1CR,5
#define 	PWM1EN    	T1CR,6
#define 	T1EN      	T1CR,7

;----- T1CNT Bits ---------------------------------------------------

#define 	T1CNT0    	T1CNT,0
#define 	T1CNT1    	T1CNT,1
#define 	T1CNT2    	T1CNT,2
#define 	T1CNT3    	T1CNT,3
#define 	T1CNT4    	T1CNT,4
#define 	T1CNT5    	T1CNT,5
#define 	T1CNT6    	T1CNT,6
#define 	T1CNT7    	T1CNT,7

;----- T1LOAD Bits ---------------------------------------------------

#define 	T1LOAD0   	T1LOAD,0
#define 	T1LOAD1   	T1LOAD,1
#define 	T1LOAD2   	T1LOAD,2
#define 	T1LOAD3   	T1LOAD,3
#define 	T1LOAD4   	T1LOAD,4
#define 	T1LOAD5   	T1LOAD,5
#define 	T1LOAD6   	T1LOAD,6
#define 	T1LOAD7   	T1LOAD,7

;----- T1DATA Bits ---------------------------------------------------

#define 	T1DATA0   	T1DATA,0
#define 	T1DATA1   	T1DATA,1
#define 	T1DATA2   	T1DATA,2
#define 	T1DATA3   	T1DATA,3
#define 	T1DATA4   	T1DATA,4
#define 	T1DATA5   	T1DATA,5
#define 	T1DATA6   	T1DATA,6
#define 	T1DATA7   	T1DATA,7

;----- PWM1CR0 Bits ---------------------------------------------------

#define 	PWM1OE    	PWM1CR0,0
#define 	PWM1NV    	PWM1CR0,1
#define 	FPWM1OE   	PWM1CR0,2
#define 	FPWM1NV   	PWM1CR0,3

;----- PWM1CR1 Bits ---------------------------------------------------

#define 	FPWM1E0   	PWM1CR1,0
#define 	FPWM1E1   	PWM1CR1,1
#define 	FPWM1E2   	PWM1CR1,2
#define 	FPWM1E3   	PWM1CR1,3
#define 	FPWM1E4   	PWM1CR1,4
#define 	FPWM1E5   	PWM1CR1,5

;----- PWM1CR2 Bits ---------------------------------------------------

#define 	PWM1D0    	PWM1CR2,0
#define 	PWM1D1    	PWM1CR2,1
#define 	PWM1D2    	PWM1CR2,2
#define 	PWM1DB    	PWM1CR2,3

;----- T2CR Bits ---------------------------------------------------

#define 	T2PRS0    	T2CR,0
#define 	T2PRS1    	T2CR,1
#define 	T2PRS2    	T2CR,2
#define 	T2CKS0    	T2CR,3
#define 	T2CKS1    	T2CR,4
#define 	T2EN      	T2CR,7

;----- T2CNT Bits ---------------------------------------------------

#define 	T2CNT0    	T2CNT,0
#define 	T2CNT1    	T2CNT,1
#define 	T2CNT2    	T2CNT,2
#define 	T2CNT3    	T2CNT,3
#define 	T2CNT4    	T2CNT,4
#define 	T2CNT5    	T2CNT,5
#define 	T2CNT6    	T2CNT,6
#define 	T2CNT7    	T2CNT,7

;----- T2LOAD Bits ---------------------------------------------------

#define 	T2LOAD0   	T2LOAD,0
#define 	T2LOAD1   	T2LOAD,1
#define 	T2LOAD2   	T2LOAD,2
#define 	T2LOAD3   	T2LOAD,3
#define 	T2LOAD4   	T2LOAD,4
#define 	T2LOAD5   	T2LOAD,5
#define 	T2LOAD6   	T2LOAD,6
#define 	T2LOAD7   	T2LOAD,7

;----- T2DATA Bits ---------------------------------------------------

#define 	T2DATA0   	T2DATA,0
#define 	T2DATA1   	T2DATA,1
#define 	T2DATA2   	T2DATA,2
#define 	T2DATA3   	T2DATA,3
#define 	T2DATA4   	T2DATA,4
#define 	T2DATA5   	T2DATA,5
#define 	T2DATA6   	T2DATA,6
#define 	T2DATA7   	T2DATA,7

;----- T2DATB Bits ---------------------------------------------------

#define 	T2DATB0   	T2DATB,0
#define 	T2DATB1   	T2DATB,1
#define 	T2DATB2   	T2DATB,2
#define 	T2DATB3   	T2DATB,3
#define 	T2DATB4   	T2DATB,4
#define 	T2DATB5   	T2DATB,5
#define 	T2DATB6   	T2DATB,6
#define 	T2DATB7   	T2DATB,7

;----- PWM2CR Bits ---------------------------------------------------

#define 	PWM2BNV   	PWM2CR,4
#define 	PWM2ANV   	PWM2CR,5
#define 	PWM2BEC   	PWM2CR,6
#define 	PWM2AEC   	PWM2CR,7

;----- ADCR0 Bits ---------------------------------------------------

#define 	ADCHS0    	ADCR0,0
#define 	ADCHS1    	ADCR0,1
#define 	ADCHS2    	ADCR0,2
#define 	ADCHS3    	ADCR0,3
#define 	ADCKS0    	ADCR0,4
#define 	ADCKS1    	ADCR0,5
#define 	ADEOC     	ADCR0,6
#define 	ADEN      	ADCR0,7

;----- ADCR1 Bits ---------------------------------------------------

#define 	ADSPS0    	ADCR1,0
#define 	ADSPS1    	ADCR1,1
#define 	ADVRS0    	ADCR1,4
#define 	ADVRS1    	ADCR1,5
#define 	ADVRS2    	ADCR1,6
#define 	ADRSEL    	ADCR1,7

;----- ADRH Bits ---------------------------------------------------

#define 	ADR4      	ADRH,0
#define 	ADR5      	ADRH,1
#define 	ADR6      	ADRH,2
#define 	ADR7      	ADRH,3
#define 	ADR8      	ADRH,4
#define 	ADR9      	ADRH,5
#define 	ADR10     	ADRH,6
#define 	ADR11     	ADRH,7

;----- ADRL Bits ---------------------------------------------------

#define 	ADR0      	ADRL,0
#define 	ADR1      	ADRL,1
#define 	ADR2      	ADRL,2
#define 	ADR3      	ADRL,3

;----- OSADJCR Bits ---------------------------------------------------

#define 	OSADJT0   	OSADJCR,0
#define 	OSADJT1   	OSADJCR,1
#define 	OSADJT2   	OSADJCR,2
#define 	OSADJT3   	OSADJCR,3
#define 	OSADJTD   	OSADJCR,4
#define 	OSADJEN   	OSADJCR,7

;----- P0ADCR Bits ---------------------------------------------------

#define 	P00DC     	P0ADCR,0
#define 	P01DC     	P0ADCR,1
#define 	P02DC     	P0ADCR,2
#define 	P03DC     	P0ADCR,3
#define 	P04DC     	P0ADCR,4
#define 	P05DC     	P0ADCR,5

;----- P1ADCR Bits ---------------------------------------------------

#define 	P10DC     	P1ADCR,0
#define 	P11DC     	P1ADCR,1
#define 	P12DC     	P1ADCR,2
#define 	P13DC     	P1ADCR,3
#define 	P14DC     	P1ADCR,4
#define 	P15DC     	P1ADCR,5
#define 	P16DC     	P1ADCR,6
#define 	P17DC     	P1ADCR,7

;----- P0KBCR Bits ---------------------------------------------------

#define 	P00KE     	P0KBCR,0
#define 	P01KE     	P0KBCR,1
#define 	P02KE     	P0KBCR,2
#define 	P03KE     	P0KBCR,3
#define 	P04KE     	P0KBCR,4
#define 	P05KE     	P0KBCR,5
#define 	P06KE     	P0KBCR,6
#define 	P07KE     	P0KBCR,7

;----- TKCR0 Bits ---------------------------------------------------

#define 	TKFS0     	TKCR0,0
#define 	TKFS1     	TKCR0,1
#define 	TKFS2     	TKCR0,2
#define 	TKFJE     	TKCR0,3
#define 	TKCFL0    	TKCR0,4
#define 	TKCFL1    	TKCR0,5
#define 	TKCON     	TKCR0,6
#define 	TKEN      	TKCR0,7

;----- TKCR1 Bits ---------------------------------------------------

#define 	TKCHS0    	TKCR1,0
#define 	TKCHS1    	TKCR1,1
#define 	TKCHS2    	TKCR1,2
#define 	TKIF      	TKCR1,6
#define 	TKIE      	TKCR1,7

;----- TKCNTH Bits ---------------------------------------------------

#define 	TKCNT8    	TKCNTH,0
#define 	TKCNT9    	TKCNTH,1
#define 	TKCNT10   	TKCNTH,2
#define 	TKCNT11   	TKCNTH,3
#define 	TKCNT12   	TKCNTH,4
#define 	TKCNT13   	TKCNTH,5
#define 	TKCNT14   	TKCNTH,6
#define 	TKCNT15   	TKCNTH,7

;----- TKCNTL Bits ---------------------------------------------------

#define 	TKCNT0    	TKCNTL,0
#define 	TKCNT1    	TKCNTL,1
#define 	TKCNT2    	TKCNTL,2
#define 	TKCNT3    	TKCNTL,3
#define 	TKCNT4    	TKCNTL,4
#define 	TKCNT5    	TKCNTL,5
#define 	TKCNT6    	TKCNTL,6
#define 	TKCNT7    	TKCNTL,7

;==========================================================================
;
;	RAM Definition
;
;==========================================================================

	__MAXRAM H'FF'
	__BADRAM H'80'-H'81'
	__BADRAM H'85'


;==========================================================================
;
;	Configuration Bits
;
;==========================================================================

_CONFIG1  		EQU		H'8001'
_CONFIG0  		EQU		H'8000'

;OPBIT1

;OPBIT0

		LIST
