	.386
	.model use32 small
	public _strspn
	.code
_strspn:
	push	ebp
	mov	ebp,esp
	push	esi
	push	edi
	mov	esi,[12+ebp]
	mov	edx,[8+ebp]
	sub	eax,eax
lp:
	inc	eax
	test	byte ptr [esi],0ffh
	je	short exit
	mov	edi,edx
	mov	cl,[esi]
	inc	esi
lp1:
	test	byte ptr [edi],0ffh
	je	short exit
	cmp	cl,[edi]
	je	short lp
	inc	edi
	jmp	short lp1
exit:
	dec	eax
	pop	 edi
	pop	esi
	pop	ebp
	ret
	end