	.386
	.model use32 small
	public _strchr
	.code
_strchr:
	push	ebp
	mov	ebp,esp
	push	edi
	mov	edi,[8+ebp]
	sub	al,al
	cld
	mov	ecx,-1
	repne	scasb
	not	ecx
	mov	edi,[8+ebp]
	mov	eax,[12+ebp]
	repne	scasb
	je	short okexit
	sub	edi,edi
	inc 	edi
okexit:
	mov	eax,edi
	dec	eax
	pop	edi
	pop	ebp
	ret
	end