	;PUT THIS ROUTINE IN YOUR BIOS, AFTER LABEL CONOT 

	IF NOT SOLOS AND NOT VIDEO
	MOV  A,C		;GET CHARACTER.
	OUT  CDATA		;PRINT IT.
        LDA  CPFLAG             ;GET FLAG
        ORA  A
        RZ			;RETURN IF NOT ENABLED
        PUSH H			;SAVE HL
        LHLD CBUFP		;GET BUFFER POINTER
        MOV  M,C		;PUT CHAR IN BUFFER
        INX  H			;ADVANCE POINTER
        LDA  MTOP		;TOP OF MEMORY
	CMP  H			;CHECK FOR OUT OF MEMORY
	JZ   OUTMEM		;	
	SHLD CBUFP		;SAVE POINTER
	LHLD CPCNT		;GET CHAR COUNT
	INX  H			;INCREMENT IT
	SHLD CPCNT		;STORE IT
	POP  H
	RET			;RETURN.
	ENDIF

OUTMEM: 
	LXI  H,PERR
	CALL PMSG
        XRA  A	
        STA  CPFLAG		;DISABLE CAPTURE MODE
        POP  H
        RET


PERR:   DB   'CAPTURE BUFFER FULL',0DH,0AH


CPFLAG  DS   1
MTOP    DS   2
CBUFP   DS   2
CPCNT   DS   2
CKSUM   DS   1

