include	clib.inc
include	dos.inc

PPROC	remove, file_name:DPTR
  ifdef __LFN__
	push	si
	mov	al,_ifsmgr
	test	al,al
  endif
	MPUSH	ds
	MLDS	dx,file_name
	mov	ah,41h
  ifdef __LFN__
	jz	remove_int
	xor	si,si
	stc
	mov	ax,7141h
    remove_int:
  endif
	int	21h
	MPOP	ds
	jc	remove_err
	xor     ax,ax
    remove_end:
  ifdef __LFN__
	pop	si
  endif
	ret
    remove_err:
	call	@dosmaper
	mov	ax,-1
	jmp	remove_end
PEND	remove

	END
