include	clib.inc
include	dos.inc

PPROC	wsetwrdate, path:DPTR, wrdate:word, wrtime:word
	push	di
	MPUSH	ds
	MLDS	dx,path
	mov	cx,wrtime
	mov	di,wrdate
	stc
	mov	ax,7143h
	mov	bl,3
	int	21h
	MPOP	ds
	jc	wsetwrdate_error
	xor	ax,ax
    wsetwrdate_end:
	pop	di
	ret
    wsetwrdate_error:
	call	@dosmaper
	mov	ax,-1
	jmp	wsetwrdate_end
PEND	wsetwrdate

	END
