include	clib.inc
include	string.inc

PPROC	setfext, path:DPTR, ext:DPTR
	invoke	strfn, path
	invoke	strrchr, dx::ax, '.'
	jz	setfext_cat
	xchg	bx,ax
	mov	byte ptr es:[bx],0
        mov	bx,ax
    setfext_cat:
	invoke	strcat, path, ext
	ret
PEND	setfext

	END
