OPEN(II)                     8/5/73                      OPEN(II)


     open - open for reading or writing


     (open = 5.)

     sys open; name; mode

     (file descriptor in r0)

     open(name, mode)

     char *name;


     Open opens the file name for reading (if mode is 0), writing

     (if  mode  is 1) or for both reading and writing (if mode is

     2).  Name is the address of a  string  of  ASCII  characters

     representing a path name, terminated by a null character.

     The returned file descriptor should be saved for  subsequent

     calls to read, write, and close.


     creat (II), read (II), write (II), close (II)


     The error bit (c-bit) is set if the file does not exist,  if

     one  of  the  necessary  directories  does  not  exist or is

     unreadable, if the file is not readable (resp. writable), or

     if  too many files are open.  From C, a -1 value is returned

     on an error.