include	clib.inc
include	string.inc

	extrn	_argv:dword

PPROC	argvext, buf:dword, ext:dword
	les	bx,_argv
	invoke	strcpy, buf, es:[bx]
	push	ax
	invoke	strrchr, dx::ax, '.'
	inc	ax
	invoke	strcpy, dx::ax, ext
	pop	ax
	ret
PEND	argvext

	END
