/
/ PDP-11 C.
/ Stdio.
/
/ Fput.
/

	.globl	fput

/
/ fput(buf, nbytes, ioptr);
/ char *buf;
/ int nbytes;
/ FILE *ioptr;
/
/ The specified record is written to the file.
/ The file must have been opened with "u".
/ Nbytes is always returned; a call to ferr
/ after the call to fput is advised.
/

fput:	jsr	r0,_save	/Get new frame

	mov	16(r5),r4	/Get IOV pointer
	call	_ckiov
	bit	$VF_UBF,(r4)	/"u"
	bne	0f		/Yes
	bis	$VF_ERR,(r4)	/Set error flag
	br	1f		/

0:	mov	12(r5),r0	/Buffer
	mov	14(r5),r1	/Nbytes
	call	_put		/Do the actual put

1:	mov	14(r5),r0	/Return nbytes
	jmp	_ret		/
