bbc $fWRITE,FUNIT(r7),ewriteit
pushl $1 #number of items
pushl FSIZE(r7) #item size
movl FBUF(r7),r5 #ptr to FILE
bbs $ioERR,FLAG(r5),ewrite
cmpl r7,$stdout #check for output to stdout
tstw _bufopt #check for buffering on stdout
pushl r5 #if unbuffered then flush
cvtbl (r10)+,r6 #r6 has length of format string
cvtwl (r10)+,r5 #r5 has number of longword arguements
bbc $fWRITE,FUNIT(r7),ewriteit
pushal (sp)[r5] #addr of format string
addl2 $2,r5 #r5 has total number of arguements
calls r5,_fprintf #output formatted data
addl2 r6,sp #pop format string
aobleq LLIMIT(r7),LCOUNT(r7),l3105
movw $linefeed,-(sp) #push a linefeed
cmpl r7,$stdout #check for flushing
cmpw $1,_bufopt #check for eoln flushing
incl r6 #set flush request
movw $formfeed,-(sp) #push a formfeed
jbc $fWRITE,FUNIT(r7),ewriteit
cvtwl (sp)+,r2 #hold data
jlbc r6,cleanup #if no flush request, normal exit
jbs $ioERR,FLAG(r5),ewrite #check for I/O error
cvtbl (r10)+,r5 #r5 has length of format string
cvtwl (r10)+,r6 #r6 has length of data
jbc $fWRITE,FUNIT(r7),ewriteit
addl2 sp,r6 #r6 pts to format string
pushl r6 #ptr to format string
addl2 r5,r6 #r6 points to cleared top of stack
calls $3,_fprintf #output string
movl r6,sp #pop data and format string
cvtbl (r10)+,r6 #r6 has length of format string
jbc $fWRITE,FUNIT(r7),ewriteit
movw (sp)+,r0 #push addr of appropriate string
pushal 4(sp) #addr of format string
calls $3,_fprintf #print boolean
addl2 r6,sp #pop format string
s_true: .byte 't,'r,'u,'e,linefeed,0
s_false:.byte 'f,'a,'l,'s,'e,linefeed,0