IO	SEGMENT COMMON 'IO'
	PUBLIC	PIOCS,OUT_PORT,MONTRCS,TIM2CNT_REG,TIM2CNTL_REG
	PUBLIC	SCCAC_R,SCCAC_W,SCCAD,SCCBC_R,SCCBC_W,SCCBD
	PUBLIC	TPRLDH,TPRLDL
	PUBLIC	HS2A,HS3A,HS4A,HCNTL,HS1A,HMOSD
	PUBLIC	HSPNAH,HSPNAL,HMIOCS0,HMIOCS1,HMIOCS2,HMIOCS3
	PUBLIC	S2AP,S3AP,S4AP,MIOCS0,MIOCS1,WRPRTP,S1AP,ENEMMP
	PUBLIC	MIOCS2,MIOCS3,AMHP,AHHP,ALLP,AMLP,TALP,TAHP
	PUBLIC	IOCS0,IOCS1,TMLP,TMHP,ATB1P,ATB3P,ATB2P,TMMP
	PUBLIC	IOCS2,IOCS3,DMHP,DHHP,TRIGP,SAP,DLLP,DMLP
	PUBLIC	IOCS4,IOCS5,PENP,STBP,NENP1,SPAP,NENP2,DTBP
	PUBLIC	IOCS6,IOCS7,IOCS8,TC0,TC1,TC2,IOCS10,SPAFG
	PUBLIC	CP82550,CP82551,CNTRL0A,CNTRL1A,CNTRL0B,CNTRL1B
	PUBLIC	CNTRL0C,CNTRL1C,CP82552,CP82553,SPOONDL,SPOONDH
	PUBLIC	SPOONAL,SPOONAH,MONITOR,MONITOR1,TRCNTL,BPCNTL
	ORG	0000H
OUT_PORT DW	?	;CPM OUTPUT PORT ADDRESS 0F000H
	ORG	0020H	;CPM SERIAL I/O
SCCBC_R DB	0H		;
	ORG	0020H
SCCBC_W DB	0H			;SCC channel B	 DATA  port: 0F020H
		DB	0H
SCCBD	DB	0H			;SCC channel B COMMAND port: 0F022H
;
	ORG	0030H
SCCAC_R DB	0H
	ORG	0030H
SCCAC_W DB	0H			;SCC channel A	 DATA  port: 0F030H
		DB	0H
SCCAD	DB	0H			;SCC channel A COMMAND port: 0F032H
	ORG	0040H
PIOCS	DB	?	;CPM PARALLEL I/O
	ORG	0060H
MONTRCS DB	?	;0F060H
;--------------------------------------------------------------
; EPM CP82550 & CP82551 CONTROL CODE
;--------------------------------------------------------------
	ORG	0106H
CP82550 DB	?	;CP82550 CONTROL PORT ADDRESS 0F106H
CP82551 DB	?	;CP82551 CONTROL PORT ADDRESS 0F107H
	;
$LIST
	ORG	0100H
CNTRL0A DB	?	;CP82550 PORT A ADDRESS 0F100H
CNTRL1A DB	?	;CP82551 PORT A ADDRESS 0F101H
CNTRL0B DB	?	;CP82550 PORT B ADDRESS 0F102H
CNTRL1B DB	?	;CP82551 PORT B ADDRESS 0F103H
CNTRL0C DB	?	;CP82550 PORT C ADDRESS 0F104H
CNTRL1C DB	?	;CP82551 PORT C ADDRESS 0F105H
;********************************************************************************
;*	-------- EPM CP82552 --> CP82553 PORT DEFINITION --------		*
;*		CP82552: 0F10EH ----> CP82552 CONTROL PORT ADDRESS		*
;*		SPOONDL: 0F108H ----> CP82552 PORT A ADDRESS			*
;*		SPOONAL: 0F10AH ----> CP82552 PORT B ADDRESS			*
;*		MONITOR: 0F10CH ----> CP82552 PORT C ADDRESS			*
;*		CP82553: 0F10FH ----> CP82553 CONTROL PORT ADDRESS		*
;*		SPOONDH: 0F109H ----> CP82553 PORT A ADDRESS			*
;*		SPOONAH: 0F10BH ----> CP82553 PORT B ADDRESS			*
;*		MONITOR1: 0F10DH ----> CP82553 PORT C ADDRESS			*
;********************************************************************************
	ORG	010EH
;-------------------------------------------------
; CP82552 & CP82553 CONTROL CODE
;-------------------------------------------------
CP82552 	DB	?	;CP82552 CONTROL PORT ADDRESS 0F10EH
CP82553 	DB	?	;CP82553 CONTROL PORT ADDRESS 0F10FH
	;
	ORG	0108H
SPOONDL 	DB	?	;CP82552 PORT A ADDRESS 0F108H
SPOONDH 	DB	?	;CP82553 PORT A ADDRESS 0F109H
;
MONITOR 	DB	?	;CP82552 PORT B ADDRESS 0F10AH
;
MONITOR1	DB	?	;CP82553 PORT B ADDRESS 0F10BH
	;
;
SPOONAL 	DB	?	;CP82552 PORT C ADDRESS 0F10CH
;
SPOONAH 	DB	?	;CP82553 PORT C ADDRESS 0F10DH
;------------------------------------------------------
$NOLIST
	ORG	0180H	;EMM I/O PORT
S2AP	DW	?	;F180H - [S2A31-S2A16]
S3AP	DW	?	;F182H - [S3A31-S3A16]
S4AP	DW	?	;F184H - [S4A31-S4A16]
MIOCS0	DB	?	;F186H
MIOCS1	DB	?	;F187H
WRPRTP	DW	?	;F188H
S1AP	DW	?	;F18AH
ENEMMP	DW	?	;F18CH
MIOCS2	DB	?	;F18EH
MIOCS3	DB	?	;F18FH
;------------------------------------------------------
	ORG	0180H	;HEMM I/O PORT
HS2A	DW	?	;F180H - [S2A31_S2A18]
HS3A	DW	?	;F182H - [S3A31-S3A18]
HS4A	DW	?	;F184H - [S4A31-S4A18]
HMIOCS0  DB	 ?	 ;F186H
HMIOCS1  DB	 ?	 ;F187H
HS1A	DW	?	;F188H
HSPNAH	DB	?	;F18AH
HSPNAL	DB	?	;F18BH
HCNTL	DB	?	;F18CH
HMOSD	DB	?	;F18DH
HMIOCS2  DB	 ?	 ;F18EH
HMIOCS3  DB	 ?	 ;F18FH
    ORG 0200H	;LAM I/O PORT
AMHP	 DB	 ?	 ;F200H - [A23A-A16A].
AHHP	 DB	 ?	 ;F201H - [A31A-A24A]
ALLP	 DB	 ?	 ;F202H - [ A7A -A0A]
AMLP	 DB	 ?	 ;F203H - [A15A -A8A]
TALP	 DB	 ?	 ;F204H - [ TA7 -TA0]
TAHP	 DB	 ?	 ;F204H - [TA10 -TA8,OVER,TMOVER.]
IOCS0	 DB	 ?	 ;F206H
IOCS1	 DB	 ?	 ;F207H
;
TMLP	DB	?	;F208H - [ TM7 -TM0]
TPRLDH	EQU	TMMP	;PRELOAD HIGH
TMMP	DB	?	;F209H - [TM15 -TM8]
ATB1P	DB	?	;F20AH - [NATB1D0:7]
ATB3P	DB	?	;F20BH - [NATB3D0:7]
ATB2P	DB	?	;F20CH - [NATB2D0:7]
TPRLDL	EQU	TMHP	;PRELOAD LOW
TMHP	DB	?	;F20DH - [TM23-TM16]
IOCS2	DB	?	;F20EH
IOCS3	DB	?	;F20FH
;
DMHP	DB	?	;F210H - [D23A-D16A]
DHHP	DB	?	;F211H - [D31A-D24A]
TRIGP	DB	?	;F212H - [TRIG1:3,TRACEND,NEBP]
SAP	DB	?	;F213H - [ S7A -S0A]
DLLP	DB	?	;F214H - [ D7A -D0A]
DMLP	DB	?	;F215H - [D15A -D8A]
IOCS4	DB	?	;F216H
IOCS5	DB	?	;F217H
;
PENP	DB	?	;F218H - COMTROL PINS.
STBP	DB	?	;F219H - [NSTBD0:7]
NENP1	DB	?	;F21AH - CONTROL PINS.
SPAP	DB	?	;F21BH - [SP7A-SP0A]
NENP2	DB	?	;F21CH - CONTROL PINS.
DTBP	DB	?	;F21DH - [NDTB3:1, D1:0]
IOCS6	DB	?	;F21EH
IOCS7	DB	?	;F21FH
;
SPAFG	DB	?	;F220H - ADDR MATCH FLAG.
		DB		?
BPCNTL	DB		?		;F222H - BREAK POINT CNTL.
		DB		?
TRCNTL	DB		?		;F224H - TRIGGER CNTL.
		DB		?
IOCS8	DB		?		;F226H - 8255 MODE CONTROL.
		DB		?
TC0	DB	?		;F228H,8253 T/C 0.
		DB		?
TC1		DB		?		;F22AH,8253 T/C 1.
		DB		?
TC2		DB		?		;F22CH,8253 T/C 2.
		DB		?
IOCS10	DB		?		;8253 MODE CNTL.
IO	ENDS
