	title	Module from library C_4 : FPUTS
	name	('FPUTS')

; Put string to file

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

;		Version 1.0 July 1994

; ENTRY	Reg pair HL points to string closed by zero
;	Reg pair DE points to file control block

; EXIT	Reg HL holds result
;	If HL holds -1, a write error was detected

	maclib	c.lib

	entry	fputs

	extrn	fputc

fputs:
	ld	a,(hl)		; Get character
	or	a		; Test end
	ret	z		; .. yeap
	inc	hl
	push	de
	push	hl
	ld	l,a
	call	fputc		; .. put to file
	pop	hl
	pop	de
	jr	fputs

	end

