;******************************************************************************
; Filename: MKDIR.ASM
; Author: Peter Andersson
; Version: 0.0
; Created: 1995.03.10
; Updated:
;******************************************************************************
; Copyright Peter Andersson, 1994-1995.
; All rights reserved.
;******************************************************************************
; Function: LONG @mkdir(PSZ path)
; Comment: Creates a directory
; Input: Eax, path - file path
; Returns: -1 if an error occured or 0 if alright
;******************************************************************************
Include STDDEF.INC
Codeseg
Proc mkdir ,1
Mov Edx,Eax
Mov Ah,39h
Int 21h
Jc @@Error
Clear Eax
Ret
Align 4
@@Error: Mov [Word errno],Ax
Ifdef DEBUG
Call printf,Offset ErrMkdirMsg,Edx,Ax
Endif
Mov Eax,-1
Ret
Endp
Dataseg
IfDef DEBUG
ErrMkdirMsg Db "Error creating directory '%s'! Error: %h",LF,0
Endif
End