	file	"mtstr.c"
	global	mtstr
	set	S%2,-16
	set	T%1,0
	set	F%1,-4
	set	P%1,-4
	set	M%1,0x0000
mtstr:
	tst.b	((P%1-256).w,%sp)
	link	%fp,&-20

	movm.l	&0x0302,(S%2.w,%fp)


	mov.l	([8.w,%fp]),	%a0	
	mov.l	(12,%fp),	%a1	

looplbl:
	mov.b	(%a0)+,	%d0
	beq	hundred
	mov.b	%d0,	%d1
	and.b	&64,	%d1
	beq	two

	and.b	&(255-32), %d0
two:
	mov.b	(%a1)+,	%d1
	beq	sixh
	cmp.b	%d1,	%d0
	beq	looplbl

seven:
	mov.b	&0,	%d0
	jmp	outlbl

hundred:
	tst.b	(%a1)
	bne	seven
sixh:
	subq.l	&1,	%a0		
	mov.l	%a0,	([8.w,%fp])
	movq.l	&1,	%d0

outlbl:
	movm.l	(S%2.w,%fp),&0x0302
	unlk	%fp
	rts
