	title	Module from library BASE_7 : CHNEOF
	name	('CHNEOF')
	maclib	baselib.lib

; Get character from channel, indicate end of file
; (Should only be used in ASCII transfer because CTRL-Z
;  will be used as end of file indicator)

; Copyright (C)	Werner Cirsovius
;		Hohe Weide 44
;		D-20253 Hamburg
;		Tel.: +49-40-4223247

;		Version 1.0 February 1987

; ENTRY	Register C holds channel number 0 .. max

; EXIT	Accu holds byte from file read
;	Carry set indicates end of file found or error - 
;	channel out of range.

	entry	chneof

	extrn	chnin

chneof:
	call	chnin		; Get a character
	ret	c		; Test physical end
	cp	eof		; Test logical end
	scf
	ret	z
	ccf			; Set ok
	ret

	end

