Bell 32V development
authorTom London <tbl@research.uucp>
Sat, 9 Dec 1978 03:37:53 +0000 (22:37 -0500)
committerTom London <tbl@research.uucp>
Sat, 9 Dec 1978 03:37:53 +0000 (22:37 -0500)
Work on file usr/man/man2/indir.2

Co-Authored-By: John Reiser <jfr@research.uucp>
Synthesized-from: 32v

usr/man/man2/indir.2 [new file with mode: 0644]

diff --git a/usr/man/man2/indir.2 b/usr/man/man2/indir.2
new file mode 100644 (file)
index 0000000..551b93f
--- /dev/null
@@ -0,0 +1,63 @@
+.TH INDIR 2 
+.SH NAME
+indir, syscall \- indirect system call
+.SH SYNOPSIS
+.BR "syscall(number, r0, r1, arg ...)" \  \  (PDP-11)
+.br
+.BR "syscall(number, arg, ...)" \  \  (VAX-11)
+.SH DESCRIPTION
+.I Syscall
+performs the system call whose assembly language
+interface has the specified
+.I number,
+register arguments
+.I r0
+and
+.I r1
+(on the PDP-11, regardless of whether the entry point really
+uses them) and further arguments
+.IR arg .
+.PP
+The r0 value of the system call is returned.
+.SH DIAGNOSTICS
+When the C-bit is set,
+.I syscall
+returns \-1 and sets the
+external variable 
+.I errno
+(see
+.IR intro (2)).
+.SH BUGS
+There is no way to simulate system calls
+such as
+.IR pipe (2),
+which return values in register r1.
+.SH "ASSEMBLER (PDP-11)"
+(indir = 0.)
+.br
+.B sys indir; call
+.PP
+The system call at the location
+.I call
+is executed.
+Execution resumes after the
+.I indir
+call.
+.PP
+On the PDP-11, the main purpose of
+.I indir
+is to allow a program to
+store arguments in system calls and execute them
+out of line in the data segment.
+This preserves the purity of the text segment.
+.PP
+If
+.I indir
+is executed indirectly,
+it is a no-op.
+If the instruction at the indirect
+location is not a system call,
+.I indir
+returns error code EINVAL;
+see
+.IR intro (2).