; a0 - estring
; d0 - char
; d1 - length=-1

	xdef	_FillEStr

_FillEStr	move.l	a0,a1
	tst.w	d1
	bgt.s	.skip
.step	move.w	(-4,a0),d1
.skip	cmp.w	(-4,a0),d1
	bgt.s	.loop
	bra.s	.step
.loop	move.b	d0,(a0)+
	dbra.s	d1,.loop
	clr.b	(a0)
	move.l	a1,d0		; store string
	sub.l	a0,d0		; get new length
	move.w	d0,(-2,a1)	; set new length
	rts
