home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / FUNK108A.ZIP / DOS32V30.ZIP / PAL / FILEIO / CREAT.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-05-20  |  970 b   |  29 lines

  1. ;****************************************************************************
  2. ; Filename: CREAT.ASM
  3. ;   Author: Adam Seychell
  4. ;  Version: 0.0
  5. ;  Created: 1995.May.01
  6. ;  Updated: -
  7. ;****************************************************************************
  8. ; Copyright Peter Andersson, 1994-1995.
  9. ; All rights reserved.
  10. ;****************************************************************************
  11. ; Function: int creat(char * string, int mode);
  12. ;  Comment: create/truncates a file.
  13. ;    Input: Eax, pointer to file name
  14. ;           Edx, mode.  0 = create for read only, 1 = creat for r/w
  15. ;   Output: handle of file or -1 if error occured with 'errno' set to
  16. ;           the error number.
  17. ;****************************************************************************
  18. Include  STDDEF.INC
  19.  
  20.     Codeseg
  21.  
  22. Proc       creat,2
  23.            And       Edx,3
  24.            Or        Edx, O_TRUNC or O_CREAT
  25.            Call  @open
  26.            Ret
  27. Endp 
  28.  
  29. End