projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43c9926
)
Research V2 development
author
Dennis Ritchie
<dmr@research.uucp>
Mon, 5 Jun 1972 22:39:23 +0000
(17:39 -0500)
committer
Dennis Ritchie
<dmr@research.uucp>
Mon, 5 Jun 1972 22:39:23 +0000
(17:39 -0500)
Work on file lib/read.s
Synthesized-from: v2
lib/read.s
[new file with mode: 0644]
patch
|
blob
diff --git a/lib/read.s
b/lib/read.s
new file mode 100644
(file)
index 0000000..
d19129f
--- /dev/null
+++ b/
lib/read.s
@@ -0,0
+1,22
@@
+/ C library -- read
+
+/ nread = read(file, buffer, count);
+/
+/ nread ==0 means eof; nread == -1 means error
+
+ .globl _read
+
+.data
+_read:
+ 1f
+.text
+1:
+ mov 2(sp),r0
+ mov 4(sp),0f
+ mov 6(sp),0f+2
+ sys read; 0:..; ..
+ bec 1f
+ mov $-1,r0
+1:
+ rts pc
+