include	clib.inc
include	dos.inc

PPROC	setfattr, fname:DPTR, attrib:word
	MPUSH	ds
 ifdef __LFN__
	cmp	_ifsmgr,0
 endif
	MLDS	dx,fname
	mov	cx,attrib
	mov	ax,4301h
 ifdef __LFN__
	jz	setfattr_21
	stc
	mov	ax,7143h
	mov	bl,1
 endif
    setfattr_21:
	int	21h
	MPOP	ds
	jc	setfattr_err
	xor	ax,ax
    setfattr_end:
	ret
    setfattr_err:
	call	@dosmaper
	mov	ax,-1
	jmp	setfattr_end
PEND	setfattr

	END
