include	clib.inc
include	string.inc

_TEXT	SEGMENT

strchr proc dist pascal public uses di S1:dword, char:word
	xor ax,ax
	cwd
	les di,S1
      @@:
	mov al,es:[di]
	test al,al
	jz  @F
	inc di
	cmp al,byte ptr char
	jne @B
	mov dx,word ptr S1+2
	mov ax,di
	dec ax
      @@:
	ret
strchr endp

_TEXT	ENDS

	END