man(1) Manual page archive

sys-open(2) - Unix First Edition Manual Page
11/3/71SYS_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 (ifmode is non--zero), name is the address of a string of ASCII


characters representing a path name, terminated by a null character. The file descriptor should be saved for subsequent calls to read (orwrite) and close.


In both the read and write case the file pointer is set to thebeginning of the file. If the last link to an open file is removed, the file is notdestroyed until it is closed.
FILES
SEE_ALSO creat, read, write, close
DIAGNOSTICS The error bit (c--bit) is set if the file does not exist, if one ofthe necessary directories does not exist or is unreadable, or if the


file is not readable. B UGS
OWNER ken, dmr