blob: e06998f427d7f99602738d5e6e58c73191cc9bc2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
.pa 1
.he 'READ (II)'3/15/72'READ (II)'
.ti 0
NAME read -- read from file
.sp
.ti 0
SYNOPSIS (file descriptor in r0)
.br
sys read; buffer; nbytes / read = 3.
.br
(nread in r0)
.sp
.ti 0
DESCRIPTION A file descriptor is a word
returned from a successful open____ or creat_____ call.
.sp
Buffer______ is the location of nbytes______ contiguous
bytes into which the input will be placed. It is not guaranteed
that all nbytes______ bytes will be read; for example
if the file refers to a typewriter at most one line
will be returned.
In any event the number of characters read is returned
in r0.
.sp
If r0 returns with value 0, then
end-of-file has been reached.
.sp
.ti 0
SEE ALSO open(II), creat(II)
.sp
.ti 0
DIAGNOSTICS As mentioned,
r0 is 0 on return when the end of the file has been reached.
If the read was otherwise unsuccessful
the error bit (c-bit) is set. Many conditions,
can generate an error:
physical I/O errors, bad buffer address,
preposterous nbytes______, file descriptor not that of
an input file.
.sp
.ti 0
BUGS --
|