include	clib.inc
include	dos.inc
include	dir.inc

PPROC	wfullpath, buf:dword, drv:word
	push	word ptr buf+2
	mov	ax,word ptr buf
	add	ax,3
	push	ax
	push	drv
	call	wgetcwd
	or	ax,dx
	jz	wfullpath_02
	mov	ax,drv
	test	ax,ax
	jz	wfullpath_00
	add	al,'@'
	jmp	wfullpath_01
    wfullpath_00:
	call	getdrv
	add	al,'A'
    wfullpath_01:
	les	bx,buf
	mov	ah,':'
	mov	es:[bx],ax
	mov	al,'\'
	mov	es:[bx+2],al
	mov	dx,es
	mov	ax,bx
    wfullpath_02:
	ret
PEND	wfullpath

	END
