include	clib.inc

_TEXT	SEGMENT

strcpy proc dist pascal public uses ds si di s1:dword, s2:dword
	cld
	sub al,al
	mov cx,-1
	les di,s2
	repne scasb
	les di,s1
	lds si,s2
	not cx
	shr cx,1
	rep movsw
	jc strcpy_mov
    strcpy_end:
	mov dx,word ptr s1+2
	mov ax,word ptr s1
	ret
    strcpy_mov:
	movsb
	jmp strcpy_end
strcpy endp

_TEXT	ENDS

	END
