Metropoli BBS
VIEWER: creat.asm MODE: TEXT (ASCII)
;****************************************************************************
; Filename: CREAT.ASM
;   Author: Adam Seychell
;  Version: 0.0
;  Created: 1995.May.01
;  Updated: -
;****************************************************************************
; Copyright Peter Andersson, 1994-1995.
; All rights reserved.
;****************************************************************************
; Function: int @creat(char * string, int mode);
;  Comment: create/truncates a file.
;    Input: Eax, pointer to file name
;           Edx, mode.  0 = create for read only, 1 = creat for r/w
;   Output: handle of file or -1 if error occured with 'errno' set to
;           the error number.
;****************************************************************************
Include  STDDEF.INC

    Codeseg

Proc       creat,2
           And       Edx,3
           Or        Edx, O_TRUNC or O_CREAT
           Call  @open
           Ret
Endp 

End
[ RETURN TO DIRECTORY ]