	title	Module from library BASE_6 : CLOSEF
	name	('CLOSEF')
	maclib	baselib.lib

; Write end of file and close file

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

;		Version 1.0 March 1989

; ENTRY	As described in module DSKPUT, some locations
;	must be set up properly

; EXIT	On normal return carry is reset
;	On error carry will be set

	entry	closef

	extrn	close,puteof,wrfcb

closef:
	call	puteof		; Write EOF
	ld	de,(wrfcb)	; Get FCB
	call	nc,close	; .. close if possible
	ret

	end

