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

    NAME
         open - open for reading or writing

    SYNOPSIS
         (open = 5.)
         sys open; name; mode
         (file descriptor in r0)

         open(name, mode)
         char *name;

    DESCRIPTION
         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.

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

    DIAGNOSTICS
         The  error bit (c-bit) is set if the file does not exist, if
         one of the necessary directories does not exist  or  is  un-
         readable,  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.

                                  - 1 -