
*	WriteChar.asm (of PCQ Pascal runtime library)
*	Copyright (c) 1989 Patrick Quaid

*	This routine writes a single character to a text file

	SECTION	ONE

	XREF	_p%DOSBase
	XREF	_LVOWrite
	XREF	outbuffer
	XREF	_p%padout

	XDEF	_p%writechar
_p%writechar:

	move.b	d0,outbuffer
	move.l	#outbuffer,d2
	move.l	6(sp),d1
	move.w	4(sp),d0
	ext.l	d0
	subq.l	#1,d0
	ble.s	1$
	jsr	_p%padout
1$	moveq	#1,d3
	move.l	_p%DOSBase,a6
	jsr	_LVOWrite(a6)
	rts

	END
