include	clib.inc
include	dos.inc

PPROC	mkdir,  path:DPTR
  ifdef __LFN__
	mov	al,_ifsmgr
	test	al,al
  endif
	MPUSH	ds
	MLDS	dx,path
	mov	ah,39h
  ifdef __LFN__
	jz	mkdir_21
	stc
	xchg	al,ah
    mkdir_21:
  endif
	int	21h
	MPOP	ds
	jc	mkdir_err
	xor	ax,ax
    mkdir_end:
	ret
    mkdir_err:
	call	@dosmaper
	mov	ax,-1
	jmp	mkdir_end
PEND	mkdir

	END
