.nlist
;****************************************************************************
;
; Include This File To Define The COP Registers
;
;	!!! NOTE !!!
;		Only Registers And
;		Register Bit Numbers Are Defined
;
;****************************************************************************
;
	; Set UPPER_CASE_REG Non Zero To Define Upper Case Registers
	; Set LOWER_CASE_REG Non Zero To Define Lower Case Registerss
	; Else Both Upper And Lower Case Registers Will Be Defined

	.ifeq	UPPER_CASE_REG + LOWER_CASE_REG
		UPPER_CASE_REG =: 1
		LOWER_CASE_REG =: 1
	.endif

.ifne	UPPER_CASE_REG + LOWER_CASE_REG
	.list	(!,src)
;	Supports Chips:
;		COP684BC, COP884BC
	.nlist
.endif
;
;****************************************************************************
;
	.include "regdef.mac"
	.xtnd	0		; Basic Instruction Set
;
;****************************************************************************
;

.ifne	UPPER_CASE_REG
	.list	(!,src)
;	Upper Case Register Definitions         Defined
	.nlist

	;	Name	Addr	Bit7	Bit6	Bit5	Bit4	Bit3	Bit2	Bit1	Bit0
	;	----	----	----	----	----	----	----	----	----	----
	.reg	PORTED,	0x90,	,	,	,	,	CT4,	CT3,	CT2,	CT1
	.reg	PORTED,	0x90,	,	,	,	,	,	,	,
	.reg	PORTEC,	0x91,	,	,	,	,	,	,	,
	.reg	PORTEP,	0x92,	,	,	,	,	,	,	,
	;		0x93
	.reg	PORTFD,	0x94,	,	,	,	,	,	,	,
	.reg	PORTFC,	0x95,	,	,	,	,	,	,	,
	.reg	PORTFP,	0x96,	,	,	,	,	,	,	,
	;		0x97
	.reg	MDR1,	0x98,	,	,	,	,	,	,	,
	.reg	MDR2,	0x99,	,	,	,	,	,	,	,
	.reg	MDR3,	0x9A,	,	,	,	,	,	,	,
	.reg	MDR4,	0x9B,	,	,	,	,	,	,	,
	.reg	MDR5,	0x9C,	,	,	,	,	,	,	,
	.reg	MDCR,	0x9D,	,	,	,	,	,	DIVOVF,	DIV,	MULT
	;
	.reg	CCR1,	0x9E,	C2TM,	C2IPND,	C2IEN,	C2RUN,	C1TM,	C1IPND,	C1IEN,	C1RUN
	.reg	CCR2,	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,	uWPND,	uWEN,	T1PNDB,	T1ENB
	;
	.reg	ICNTRL,	0xE8,	,	LPEN,	T0PND,	T0EN,	WPND,	WEN,	T1PNDB,	T1ENB
	;
	.reg	SIOR,	0xE9,	,	,	,	,	,	,	,
	.reg	TMR1LO,	0xEA,	,	,	,	,	,	,	,
	.reg	TMR1HI,	0xEB,	,	,	,	,	,	,	,
	.reg	T1RALO,	0xEC,	,	,	,	,	,	,	,
	.reg	T1RAHI,	0xED,	,	,	,	,	,	,	,
	;
	.reg	CNTRL,	0xEE,	T1C3,	T1C2,	T1C1,	T1C0,	MSEL,	IEDG,	SL1,	SL0
	.reg	PSW,	0xEF,	HC,	C,	T1PNDA,	T1ENA,	EXPND,	BUSY,	EXEN,	GIE
	;
	.reg	CNTRL1,	0xEE,	TC1,	TC2,	TC3,	TRUN,	MSEL,	IEDG,	SL1,	SL0
	;
	.reg	CNTRL,	0xEE,	TC1,	TC2,	TC3,	TRUN,	MSEL,	IEDG,	SL1,	SL0
	.reg	PSW,	0xEF,	HC,	C,	TPND,	ENTI,	IPND,	BUSY,	ENI,	GIE
.endif
;
;****************************************************************************
;
.ifne	LOWER_CASE_REG
	.list	(!,src)
;	Lower Case Register Definitions         Defined
	.nlist

	;	Name	Addr	Bit0	Bit1	Bit2	Bit3	Bit4	Bit5	Bit6	Bit7
	;	----	----	----	----	----	----	----	----	----	----
.endif

