include	clib.inc

_TEXT	SEGMENT

strfn proc dist pascal public uses di s1:dword
	cld
	les di,s1
	sub al,al
	mov dx,cx
	mov cx,-1
	repne scasb
	not cx
	dec di
	std
	mov al,'\'
	repne scasb
	mov cx,dx
	mov ax,word ptr s1
	mov dx,word ptr s1+2
	jne @F
	add di,2
	cmp byte ptr es:[di],0
	je @F
	mov ax,di
      @@:
	ret
strfn endp

_TEXT	ENDS

	END
