/* version.c by Michael Hanson */
/* you may use this, but not for profit, and give me credit */ 
/* file procedure for dos 2.0 */
/* allows redirection of STDIN to work (dosn't hang on EOF) */
static int inchar,filn;

getc(filno)
FILE filno;
{
	filn=filno;
#asm
		DSEG
INCHAR	DW 0000H
		CSEG
		MOV BX,WORD filn_
		MOV CX,01H
		MOV DX,OFFSET INCHAR
		MOV AH,3FH
		INT 21H
		JB	ERR
		CMP AX,0
		JE	ERR
		MOV AX,INCHAR
		JMP DONE
ERR:	MOV AX,-1H
DONE:	
#
}
