.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:
;		COP888GW
	.nlist
.endif
;
;****************************************************************************
;
	.include "regdef.mac"
	.xtnd	1		; Extended Instruction Set
	.__.CPU. =: 11		; Processor Code
;
;****************************************************************************
;

.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	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,	0x9F,	C4TM,	C4IP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		0xDB
	.reg	PORTD,	0xDC,	,	,	,	,	,	,	,
	;
	.reg	T1RBLO,	0xE6,	,	,	,	,	,	,	,
	.reg	T1RBHI,	0xE7,	,	,	,	,	,	,	,
	.reg	ICNTRL,	0xE8,	,	LPEN,	T0PND,	T0EN,	uWPND,	uWEN,	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
.endif
;
;****************************************************************************
;
.ifne	LOWER_CASE_REG
	.list	(!,src)
;	Lower Case Register Definitions         Defined
	.nlist

	;	Name	Addr	Bit0	Bit1	Bit2	Bit3	Bit4	Bit5	Bit6	Bit7
	;	----	----	----	----	----	----	----	----	----	----
	.reg	ported,	0x90,	,	,	,	,	ct4,	ct3,	ct2,	ct1
	.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,	c2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l,	tbmt
	.reg	enu,	0xba,	,	,	xbit9,	,	,	,	,
	.reg	enur,	0xbb,	doe,	fe,	pe,	spare,	rbit9,	attn,	xmtg,	rcvg
	.reg	enui,	0xbc,	stp2,	stp78,	etdx,	ssel,	xrclk,	xtclk,	eri,	eti
	.reg	baud,	0xbd,	,	,	,	,	,	,	,
	.reg	psr,	0xbe,	,	,	,	,	,	,	,
	;
	.reg	t2lo,	0xc0,	,	,	,	,	,	,	,
	.reg	t2hi,	0xc1,	,	,	,	,	,	,	,
	.reg	t2ralo,	0xc2,	,	,	,	,	,	,	,
	.reg	t2rahi,	0xc3,	,	,	,	,	,	,	,
	.reg	t2rblo,	0xc4,	,	,	,	,	,	,	,
	.reg	t2rbhi,	0xc5,	,	,	,	,	,	,	,
	.reg	t2cntrl,0xc6,	t2c3,	t2c2,	t2c1,	t2c0,	t2pnda,	t2ena,	t2pndb,	t2enb
	;
	.reg	wkedg,	0xc8,	,	,	,	,	,	,	,
	.reg	wken,	0xc9,	,	,	,	,	,	,	,
	.reg	wkpnd,	0xca,	,	,	,	,	,	,	,
	;
	.reg	miwu,	0xd0	,	,	,	,	,	,	,
	.reg	portld,	0xd0,	cap2,	cap1,	t2b,	t2a,	rdx,	tdx,	ckx,
	.reg	portlc,	0xd1,	,	,	,	,	,	,	,
	.reg	portlp,	0xd2,	,	,	,	,	,	,	,
	;		0xd3
	.reg	portgd,	0xd4,	cko,	si,	sk,	so,	t1a,	t1b,	wdout,	int
	.reg	portgd,	0xd4,	halt,	idle,	,	,	,	,	,
	;
	.reg	portgc,	0xd5,	,	,	,	,	,	,	,
	.reg	portgp,	0xd6,	,	,	,	,	,	,	,
	.reg	porti,	0xd7,	,	,	,	,	,	,	,
	.reg	portcd,	0xd8,	,	,	,	,	,	,	,
	.reg	portcc,	0xd9,	,	,	,	,	,	,	,
	.reg	portcp,	0xda,	,	,	,	,	,	,	,
	;		0xdb
	.reg	portd,	0xdc,	,	,	,	,	,	,	,
	;
	.reg	t1rblo,	0xe6,	,	,	,	,	,	,	,
	.reg	t1rbhi,	0xe7,	,	,	,	,	,	,	,
	.reg	icntrl,	0xe8,	,	lpen,	t0pnd,	t0en,	uwpnd,	uwen,	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
.endif

