
.write	equ	4

	entry	syswrite
r0	equ	0
rf	equ	15
sp	equ	7
*
	impur
writesvc	equ	*
	svc	0,.write
buffer	dc	a(*-*)
nbytes	dc	a(*-*)
*
	pure
syswrite	equ	*
	l	r0,adc(sp)	buffer
	st	r0,buffer
	l	r0,2*adc(sp)	nbytes
	st	r0,nbytes
	l	r0,0(sp)	file descriptor
	svc	0,0
	dc	a(writesvc)
	bc	error
	br	rf
error	equ	*
	st	r0,errno
	lcs	r0,1		error return
	br	rf

errno	comn
	das	1
	ends
	end
