include	clib.inc

	extrn	@scputf: DIST

	public	_scputf

_TEXT	SEGMENT

_scputf	PROC DIST 	; int x, int y, BYTE at, BYTE max, char *, ...
ifdef LPROG
	popm	cs:CSIP	; return adress
else
	pop	cs:CSIP
endif
	pop	bx	; x
	pop	ax	; y
	mov	bh,al
	pop	ax	; at
	pop	cx	; max
	mov	ch,al
	pop	ax	; format string
	pop	dx	; DS
	call	@scputf	; ...
	sub	sp,12	; push args
ifdef LPROG
	pushm	cs:CSIP	; return adress
else
	push	cs:CSIP
endif
	ret		; "C" return
_scputf	ENDP

CSIP	PF	?

_TEXT	ENDS

	END
