;COMPUTERLAND	JULY 13,1980
;
;CONFIGURATION PACKAGE FOR CP/M ON MICROPOLIS
;
;COPYRIGHT (C) 1978, LIFEBOAT ASSOCIATES
;
;
;SYSTEM PARAMETERS
;*****************
MSIZE	EQU	46	;SET SYSTEM SIZE HERE
	;NOTE: SIZE IS "NOMINAL" CP/M SIZE WHICH
	;IS 2K LESS THAN AVAILABLE MEMORY FOR MICROPOLIS
;
BIAS	EQU	(MSIZE-16)*1024
;
CPMB	EQU	2900H+BIAS	;CPM ENTRY
BDOSE	EQU	3106H+BIAS	;ENTRY TO BDOS
BIOS	EQU	3E00H+BIAS
IOBYTE	EQU	3
;
;BEGIN USER AREA
USER	ORG	BIOS+600H
;
;JUMP VECTORS
;***********************
CINIT	JMP	CINITR	;COLD INIT
WINIT	JMP	WINITR	;WARM INIT
CONST	JMP	VECSTAT	;STATUS RTN
CONIN	JMP	VECIN
CONOUT	JMP	VECOUT
LIST	JMP	LOUT
PUNCH	JMP	VECOUT
READER	JMP	VECIN
;
CINITR:			;COLD INITIALIZATION ROUTINE
	MVI	A,1	;SET IOBYTE
	STA	IOBYTE
	MVI	A,0A2H
	OUT	LSTAT
	OUT	CSTAT
	MVI 	A,40H
	OUT	LSTAT
	OUT 	CSTAT
	MVI 	A,0CEH
	OUT	LSTAT
	OUT	CSTAT
	MVI	A,37H
	OUT	LSTAT
	OUT	CSTAT
	RET
;
WINITR:			;WARM INITIALIZATION ROUTINE
	RET		;NONE NEEDED
;
;
VECIN:
VECINLP	CALL	VECSTAT	;SEE IF CHAR READY
	ORA	A
	JZ	VECINLP	;LOOP UNTIL CHAR
	IN	CDATA
	ANI	7FH	;STRIP PARITY
	RET		;EXIT
;
VECSTAT:
	IN	CSTAT
	CMA
	ANI	02
	MVI	A,0
	RNZ
	CMA
	RET
	;
VECOUT:
	IN	CSTAT
	ANI	01
	JZ	VECOUT
	MOV	A,C
	OUT	CDATA
	RET		;EXIT
	;
LOUT:
	IN	LSTAT
	ANI	01
	JZ	LOUT
	MOV	A,C
	OUT	LDATA
	RET
	;
CSTAT	EQU 	3
CDATA	EQU 	2
LSTAT	EQU 	5
LDATA 	EQU	4
	;
	END
