3/15/72                                                 OPEN (II)





NAME            open  --  open for reading or writing



SYNOPSIS        sys open; name; mode  / open = 5.

                (descriptor in r0)



DESCRIPTION     open opens the file name for reading (if mode is

                0) or writing (if mode is non-zero).  name is the

                address of a string of ASCII characters repre-

                senting a path name, terminated by a null charac-

                ter.



                The file descriptor should be saved for subse-

                quent calls to read (or write) and close.



                In both the read and write case the file pointer

                is set to the beginning of the file.



                If the last link to an open file is removed, the

                file is not destroyed until it is closed.



FILES           --



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 unreadable, or if the file is not

                readable.



BUGS            --



OWNER           ken, dmr