Openopen a file for read/write accessopenchar *fnameint modeAssembler Equivalent
os9 I$OPEN
Description
This call opens an existing file for reading if "mode" is 1,
writing if "mode" is 2, or reading and writing if "mode" is 3.
NOTE that these values are OS-9 specific and not compatible
with other systems. "Fname" should point to a string
representing the pathname of the file.
Open returns an integer as "path number" which should be used
by i/o system calls referring to the file.
The position where reads or writes start is at the beginning of
the file.
Diagnostics
-1 is returned if the file does not exist, if the pathname
cannot be searched, if too many files are already open, or if
the file permissions deny the requested mode.
See Also
creat(),
read(),
write(),
dup(),
close()