.he 'READ (II)'3/15/72'READ (II)'
NAME read -- read from file
SYNOPSIS (file descriptor in r0)
sys read; buffer; nbytes / read = 3.
DESCRIPTION A file descriptor is a word
returned from a successful open
\b\b\b\b____ or creat
\b\b\b\b\b_____ call.
Buffer
\b\b\b\b\b\b______ is the location of nbytes
\b\b\b\b\b\b______ contiguous
bytes into which the input will be placed. It is not guaranteed
that all nbytes
\b\b\b\b\b\b______ bytes will be read; for example
if the file refers to a typewriter at most one line
In any event the number of characters read is returned
If r0 returns with value 0, then
end-of-file has been reached.
SEE ALSO open(II), creat(II)
DIAGNOSTICS As mentioned,
r0 is 0 on return when the end of the file has been reached.
If the read was other
\ 6wise unsuccessful
the error bit (c-bit) is set. Many conditions,
physical I/O errors, bad buffer address,
preposterous nbytes
\b\b\b\b\b\b______, file descriptor not that of