Initial revision
authorceriel <none@none>
Wed, 7 Jan 1987 17:13:41 +0000 (17:13 +0000)
committerceriel <none@none>
Wed, 7 Jan 1987 17:13:41 +0000 (17:13 +0000)
84 files changed:
mach/pdp/libsys/LIST [new file with mode: 0644]
mach/pdp/libsys/Makefile [new file with mode: 0644]
mach/pdp/libsys/_exit.s [new file with mode: 0644]
mach/pdp/libsys/access.s [new file with mode: 0644]
mach/pdp/libsys/acct.s [new file with mode: 0644]
mach/pdp/libsys/alarm.s [new file with mode: 0644]
mach/pdp/libsys/chdir.s [new file with mode: 0644]
mach/pdp/libsys/chmod.s [new file with mode: 0644]
mach/pdp/libsys/chown.s [new file with mode: 0644]
mach/pdp/libsys/chroot.s [new file with mode: 0644]
mach/pdp/libsys/cleanup.c [new file with mode: 0644]
mach/pdp/libsys/close.s [new file with mode: 0644]
mach/pdp/libsys/compmodule [new file with mode: 0755]
mach/pdp/libsys/creat.s [new file with mode: 0644]
mach/pdp/libsys/dup.s [new file with mode: 0644]
mach/pdp/libsys/errno.s [new file with mode: 0644]
mach/pdp/libsys/execl.s [new file with mode: 0644]
mach/pdp/libsys/execle.s [new file with mode: 0644]
mach/pdp/libsys/execv.s [new file with mode: 0644]
mach/pdp/libsys/execve.s [new file with mode: 0644]
mach/pdp/libsys/exit.c [new file with mode: 0644]
mach/pdp/libsys/fetchi.s [new file with mode: 0644]
mach/pdp/libsys/fork.s [new file with mode: 0644]
mach/pdp/libsys/fperr.s [new file with mode: 0644]
mach/pdp/libsys/fstat.s [new file with mode: 0644]
mach/pdp/libsys/ftime.s [new file with mode: 0644]
mach/pdp/libsys/getgid.s [new file with mode: 0644]
mach/pdp/libsys/getgrp.s [new file with mode: 0644]
mach/pdp/libsys/getpid.s [new file with mode: 0644]
mach/pdp/libsys/getppid.s [new file with mode: 0644]
mach/pdp/libsys/getuid.s [new file with mode: 0644]
mach/pdp/libsys/gldav.s [new file with mode: 0644]
mach/pdp/libsys/gtty.c [new file with mode: 0644]
mach/pdp/libsys/ioctl.s [new file with mode: 0644]
mach/pdp/libsys/kill.s [new file with mode: 0644]
mach/pdp/libsys/killbkg.s [new file with mode: 0644]
mach/pdp/libsys/killpg.s [new file with mode: 0644]
mach/pdp/libsys/link.s [new file with mode: 0644]
mach/pdp/libsys/lock.s [new file with mode: 0644]
mach/pdp/libsys/login.s [new file with mode: 0644]
mach/pdp/libsys/lseek.s [new file with mode: 0644]
mach/pdp/libsys/lstat.s [new file with mode: 0644]
mach/pdp/libsys/mknod.s [new file with mode: 0644]
mach/pdp/libsys/mount.s [new file with mode: 0644]
mach/pdp/libsys/mpxcall.s [new file with mode: 0644]
mach/pdp/libsys/nice.s [new file with mode: 0644]
mach/pdp/libsys/nostk.s [new file with mode: 0644]
mach/pdp/libsys/open.s [new file with mode: 0644]
mach/pdp/libsys/pause.s [new file with mode: 0644]
mach/pdp/libsys/phys.s [new file with mode: 0644]
mach/pdp/libsys/pipe.s [new file with mode: 0644]
mach/pdp/libsys/profil.s [new file with mode: 0644]
mach/pdp/libsys/ptrace.s [new file with mode: 0644]
mach/pdp/libsys/qfstat.s [new file with mode: 0644]
mach/pdp/libsys/qstat.s [new file with mode: 0644]
mach/pdp/libsys/quota.s [new file with mode: 0644]
mach/pdp/libsys/read.s [new file with mode: 0644]
mach/pdp/libsys/readlink.s [new file with mode: 0644]
mach/pdp/libsys/reboot.s [new file with mode: 0644]
mach/pdp/libsys/renice.s [new file with mode: 0644]
mach/pdp/libsys/rtp.s [new file with mode: 0644]
mach/pdp/libsys/sbrk.s [new file with mode: 0644]
mach/pdp/libsys/setgid.s [new file with mode: 0644]
mach/pdp/libsys/setgrp.s [new file with mode: 0644]
mach/pdp/libsys/setuid.s [new file with mode: 0644]
mach/pdp/libsys/signal.s [new file with mode: 0644]
mach/pdp/libsys/stat.s [new file with mode: 0644]
mach/pdp/libsys/stime.s [new file with mode: 0644]
mach/pdp/libsys/stty.c [new file with mode: 0644]
mach/pdp/libsys/submit.s [new file with mode: 0644]
mach/pdp/libsys/symlink.s [new file with mode: 0644]
mach/pdp/libsys/sync.s [new file with mode: 0644]
mach/pdp/libsys/sys.h [new file with mode: 0644]
mach/pdp/libsys/time.s [new file with mode: 0644]
mach/pdp/libsys/times.s [new file with mode: 0644]
mach/pdp/libsys/ucall.s [new file with mode: 0644]
mach/pdp/libsys/umask.s [new file with mode: 0644]
mach/pdp/libsys/umount.s [new file with mode: 0644]
mach/pdp/libsys/unlink.s [new file with mode: 0644]
mach/pdp/libsys/utime.s [new file with mode: 0644]
mach/pdp/libsys/vfork.s [new file with mode: 0644]
mach/pdp/libsys/vhangup.s [new file with mode: 0644]
mach/pdp/libsys/wait.s [new file with mode: 0644]
mach/pdp/libsys/write.s [new file with mode: 0644]

diff --git a/mach/pdp/libsys/LIST b/mach/pdp/libsys/LIST
new file mode 100644 (file)
index 0000000..0db8f41
--- /dev/null
@@ -0,0 +1,81 @@
+tail_mon.a
+exit.c
+cleanup.c
+stty.c
+gtty.c
+_exit.s
+access.s
+acct.s
+alarm.s
+chdir.s
+chmod.s
+chown.s
+chroot.s
+close.s
+creat.s
+dup.s
+execl.s
+execle.s
+execv.s
+execve.s
+fetchi.s
+fork.s
+fperr.s
+fstat.s
+ftime.s
+getgid.s
+getgrp.s
+getpid.s
+getppid.s
+getuid.s
+gldav.s
+ioctl.s
+kill.s
+killbkg.s
+killpg.s
+link.s
+lock.s
+login.s
+lseek.s
+lstat.s
+mknod.s
+mount.s
+mpxcall.s
+nice.s
+nostk.s
+open.s
+pause.s
+phys.s
+pipe.s
+profil.s
+ptrace.s
+qfstat.s
+qstat.s
+quota.s
+read.s
+readlink.s
+reboot.s
+renice.s
+rtp.s
+sbrk.s
+setgid.s
+setgrp.s
+setuid.s
+signal.s
+stat.s
+stime.s
+submit.s
+symlink.s
+sync.s
+time.s
+times.s
+ucall.s
+umask.s
+umount.s
+unlink.s
+utime.s
+vfork.s
+vhangup.s
+wait.s
+write.s
+errno.s
diff --git a/mach/pdp/libsys/Makefile b/mach/pdp/libsys/Makefile
new file mode 100644 (file)
index 0000000..733850b
--- /dev/null
@@ -0,0 +1,25 @@
+# $Header$
+install:       cp
+
+cp:             all
+               ../../install tail_mon
+               rm -f head_em tail_mon
+
+cmp:            all
+               -../../compare tail_mon
+               rm -f head_em tail_mon
+
+all:           tail_mon
+
+tail_mon:
+               ASAR=ar ; export ASAR ;\
+               RANLIB=ranlib ; export RANLIB ;\
+               march . tail_mon
+
+clean:
+               rm -f *.o
+opr:
+               make pr | opr
+pr:
+               @pr `pwd`/Makefile `pwd`/head_em.s
+               @pr -l33 `tail +1 LIST|sort`
diff --git a/mach/pdp/libsys/_exit.s b/mach/pdp/libsys/_exit.s
new file mode 100644 (file)
index 0000000..c98b188
--- /dev/null
@@ -0,0 +1,6 @@
+#include "sys.h"
+.globl __exit
+
+__exit:
+       mov     2(sp),r0
+       sys     exit
diff --git a/mach/pdp/libsys/access.s b/mach/pdp/libsys/access.s
new file mode 100644 (file)
index 0000000..a355d0a
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _access
+.globl _errno
+
+_access:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       clr     r0
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     access; ..; ..
diff --git a/mach/pdp/libsys/acct.s b/mach/pdp/libsys/acct.s
new file mode 100644 (file)
index 0000000..de948c4
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _acct
+.globl _errno
+
+_acct:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0, _errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     acct; ..
diff --git a/mach/pdp/libsys/alarm.s b/mach/pdp/libsys/alarm.s
new file mode 100644 (file)
index 0000000..ef2de4e
--- /dev/null
@@ -0,0 +1,12 @@
+#include "sys.h"
+.globl _alarm
+.globl _errno
+
+_alarm:
+       mov     2(sp),r0
+       sys     alarm
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
diff --git a/mach/pdp/libsys/chdir.s b/mach/pdp/libsys/chdir.s
new file mode 100644 (file)
index 0000000..a184b79
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _chdir
+.globl _errno
+
+_chdir:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     chdir; ..
diff --git a/mach/pdp/libsys/chmod.s b/mach/pdp/libsys/chmod.s
new file mode 100644 (file)
index 0000000..7cfaed4
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _chmod
+.globl _errno
+
+_chmod:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     chmod; ..; ..
diff --git a/mach/pdp/libsys/chown.s b/mach/pdp/libsys/chown.s
new file mode 100644 (file)
index 0000000..81377ca
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _chown
+.globl _errno
+
+_chown:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     chown; ..; ..; ..
diff --git a/mach/pdp/libsys/chroot.s b/mach/pdp/libsys/chroot.s
new file mode 100644 (file)
index 0000000..7e77a12
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _chroot
+.globl _errno
+
+_chroot:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     chroot; ..
diff --git a/mach/pdp/libsys/cleanup.c b/mach/pdp/libsys/cleanup.c
new file mode 100644 (file)
index 0000000..07d507e
--- /dev/null
@@ -0,0 +1,3 @@
+_cleanup()
+{
+}
diff --git a/mach/pdp/libsys/close.s b/mach/pdp/libsys/close.s
new file mode 100644 (file)
index 0000000..4c8e55f
--- /dev/null
@@ -0,0 +1,14 @@
+#include "sys.h"
+.globl _close
+.globl _errno
+
+_close:
+       mov     2(sp),r0
+       sys     close
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/compmodule b/mach/pdp/libsys/compmodule
new file mode 100755 (executable)
index 0000000..32b0483
--- /dev/null
@@ -0,0 +1,4 @@
+if pdp -O -c -I../../../h -I. $1 1>&2
+then echo `basename $1 $2`.o
+else exit 1
+fi
diff --git a/mach/pdp/libsys/creat.s b/mach/pdp/libsys/creat.s
new file mode 100644 (file)
index 0000000..32a74e5
--- /dev/null
@@ -0,0 +1,16 @@
+#include "sys.h"
+.globl _creat
+.globl _errno
+
+_creat:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     creat; ..; ..
diff --git a/mach/pdp/libsys/dup.s b/mach/pdp/libsys/dup.s
new file mode 100644 (file)
index 0000000..12b9a49
--- /dev/null
@@ -0,0 +1,20 @@
+#include "sys.h"
+.globl _dup
+.globl _dup2
+.globl _errno
+
+_dup2:
+       mov     2(sp),r0
+       bis     $100,r0
+       br      1f
+
+_dup:
+       mov     2(sp),r0
+1:
+       mov     4(sp),r1
+       sys     dup
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
diff --git a/mach/pdp/libsys/errno.s b/mach/pdp/libsys/errno.s
new file mode 100644 (file)
index 0000000..9dbf81d
--- /dev/null
@@ -0,0 +1,3 @@
+.globl _errno
+.bss
+_errno: .=.+2
diff --git a/mach/pdp/libsys/execl.s b/mach/pdp/libsys/execl.s
new file mode 100644 (file)
index 0000000..13607ba
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _execl
+.globl _environ
+.globl _errno
+
+_execl:
+       mov     2(sp),0f+2
+       mov     sp,r0
+       add     $4,r0
+       mov     r0,0f+4
+       mov     _environ,0f+6
+       sys     indir; 0f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+.data
+0:
+       sys     exece; ..; ..; ..
diff --git a/mach/pdp/libsys/execle.s b/mach/pdp/libsys/execle.s
new file mode 100644 (file)
index 0000000..8e7cc1b
--- /dev/null
@@ -0,0 +1,20 @@
+#include "sys.h"
+.globl _execle
+.globl _errno
+
+_execle:
+       mov     2(sp),0f+2
+       mov     sp,r0
+       add     $4,r0
+       mov     r0,0f+4
+1:
+       tst     (r0)+
+       bne     1b
+       mov     (r0),0f+6
+       sys     indir; 0f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+.data
+0:
+       sys     exece; ..; ..; ..
diff --git a/mach/pdp/libsys/execv.s b/mach/pdp/libsys/execv.s
new file mode 100644 (file)
index 0000000..f8de47e
--- /dev/null
@@ -0,0 +1,16 @@
+#include "sys.h"
+.globl _execv,
+.globl _environ
+.globl _errno
+
+_execv:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     _environ,0f+6
+       sys     indir; 0f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+.data
+0:
+       sys     exece; ..; ..; ..
diff --git a/mach/pdp/libsys/execve.s b/mach/pdp/libsys/execve.s
new file mode 100644 (file)
index 0000000..98292c4
--- /dev/null
@@ -0,0 +1,15 @@
+#include "sys.h"
+.globl _execve
+.globl _errno
+
+_execve:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     indir; 0f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+.data
+0:
+       sys     exece; ..; ..; ..
diff --git a/mach/pdp/libsys/exit.c b/mach/pdp/libsys/exit.c
new file mode 100644 (file)
index 0000000..afd54b3
--- /dev/null
@@ -0,0 +1,5 @@
+exit(n)
+{
+       _cleanup();
+       _exit(n);
+}
diff --git a/mach/pdp/libsys/fetchi.s b/mach/pdp/libsys/fetchi.s
new file mode 100644 (file)
index 0000000..c930673
--- /dev/null
@@ -0,0 +1,15 @@
+#include "sys.h"
+.globl _fetchi
+.globl _errno
+
+_fetchi:
+       mov     2(sp),r0
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     fetchi
diff --git a/mach/pdp/libsys/fork.s b/mach/pdp/libsys/fork.s
new file mode 100644 (file)
index 0000000..f549cfe
--- /dev/null
@@ -0,0 +1,15 @@
+#include "sys.h"
+.globl _fork
+.globl _errno
+
+_fork:
+       sys     fork
+       br      1f
+       bec     2f
+       mov     r0,_errno
+       mov     $-1,r0
+2:
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/fperr.s b/mach/pdp/libsys/fperr.s
new file mode 100644 (file)
index 0000000..d0f2042
--- /dev/null
@@ -0,0 +1,20 @@
+#include "sys.h"
+.globl _fperr
+.globl _errno
+
+_fperr:
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       mov     r5,-(sp)
+       mov     4(sp),r5
+       mov     r0,(r5)+
+       mov     r1,(r5)
+       mov     (sp)+,r5
+       rts     pc
+.data
+0:
+       sys     fperr
diff --git a/mach/pdp/libsys/fstat.s b/mach/pdp/libsys/fstat.s
new file mode 100644 (file)
index 0000000..b1bff51
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _fstat
+.globl _errno
+
+_fstat:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     fstat; ..
diff --git a/mach/pdp/libsys/ftime.s b/mach/pdp/libsys/ftime.s
new file mode 100644 (file)
index 0000000..c29924d
--- /dev/null
@@ -0,0 +1,11 @@
+#include "sys.h"
+.globl _ftime
+
+_ftime:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       rts     pc
+
+.data
+0:
+       sys     ftime; ..
diff --git a/mach/pdp/libsys/getgid.s b/mach/pdp/libsys/getgid.s
new file mode 100644 (file)
index 0000000..8faaf9f
--- /dev/null
@@ -0,0 +1,12 @@
+#include "sys.h"
+.globl _getgid
+.globl _getegid
+
+_getgid:
+       sys     getgid
+       rts     pc
+
+_getegid:
+       sys     getgid
+       mov     r1,r0
+       rts     pc
diff --git a/mach/pdp/libsys/getgrp.s b/mach/pdp/libsys/getgrp.s
new file mode 100644 (file)
index 0000000..d4c059e
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _getgrp
+.globl _errno
+
+_getgrp:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     getgrp; ..
diff --git a/mach/pdp/libsys/getpid.s b/mach/pdp/libsys/getpid.s
new file mode 100644 (file)
index 0000000..54aa094
--- /dev/null
@@ -0,0 +1,6 @@
+#include "sys.h"
+.globl _getpid
+
+_getpid:
+       sys     getpid
+       rts     pc
diff --git a/mach/pdp/libsys/getppid.s b/mach/pdp/libsys/getppid.s
new file mode 100644 (file)
index 0000000..8af5c2b
--- /dev/null
@@ -0,0 +1,7 @@
+#include "sys.h"
+.globl _getppid
+
+_getppid:
+       sys     getpid
+       mov     r1,r0
+       rts     pc
diff --git a/mach/pdp/libsys/getuid.s b/mach/pdp/libsys/getuid.s
new file mode 100644 (file)
index 0000000..2b8db79
--- /dev/null
@@ -0,0 +1,12 @@
+#include "sys.h"
+.globl _getuid
+.globl _geteuid
+
+_getuid:
+       sys     getuid
+       rts     pc
+
+_geteuid:
+       sys     getuid
+       mov     r1,r0
+       rts     pc
diff --git a/mach/pdp/libsys/gldav.s b/mach/pdp/libsys/gldav.s
new file mode 100644 (file)
index 0000000..c6db2d1
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _gldav
+.globl _errno
+
+_gldav:
+       mov     2(sp),r0
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     gldav
diff --git a/mach/pdp/libsys/gtty.c b/mach/pdp/libsys/gtty.c
new file mode 100644 (file)
index 0000000..7f42ea1
--- /dev/null
@@ -0,0 +1,7 @@
+#include <sgtty.h>
+int gtty(fildes,argp)
+       int fildes ;
+       struct sgttyb *argp ;
+{
+       return ioctl(fildes,TIOCGETP,argp) ;
+}
diff --git a/mach/pdp/libsys/ioctl.s b/mach/pdp/libsys/ioctl.s
new file mode 100644 (file)
index 0000000..95e2474
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _ioctl
+.globl _errno
+
+_ioctl:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     ioctl; ..; ..; ..
diff --git a/mach/pdp/libsys/kill.s b/mach/pdp/libsys/kill.s
new file mode 100644 (file)
index 0000000..d96fbf6
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _kill
+.globl _errno
+
+_kill:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+
+.data
+0:
+       sys     kill; ..
diff --git a/mach/pdp/libsys/killbkg.s b/mach/pdp/libsys/killbkg.s
new file mode 100644 (file)
index 0000000..edfcae2
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _killbkg
+.globl _errno
+
+_killbkg:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     killbkg; ..; ..
diff --git a/mach/pdp/libsys/killpg.s b/mach/pdp/libsys/killpg.s
new file mode 100644 (file)
index 0000000..9950966
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _killpg
+.globl _errno
+
+_killpg:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+
+.data
+0:
+       sys     killpg; ..; ..
diff --git a/mach/pdp/libsys/link.s b/mach/pdp/libsys/link.s
new file mode 100644 (file)
index 0000000..1a0e348
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _link
+.globl _errno
+
+_link:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     link; ..; ..
diff --git a/mach/pdp/libsys/lock.s b/mach/pdp/libsys/lock.s
new file mode 100644 (file)
index 0000000..fdd63e8
--- /dev/null
@@ -0,0 +1,15 @@
+#include "sys.h"
+.globl _lock
+.globl _errno
+
+_lock:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     lock; ..
diff --git a/mach/pdp/libsys/login.s b/mach/pdp/libsys/login.s
new file mode 100644 (file)
index 0000000..d79d0d9
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _login
+.globl _errno
+
+_login:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     login; ..; ..; ..;
diff --git a/mach/pdp/libsys/lseek.s b/mach/pdp/libsys/lseek.s
new file mode 100644 (file)
index 0000000..c2c36b5
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _lseek
+.globl _errno
+
+_lseek:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       mov     6(sp),0f+4
+       mov     10(sp),0f+6
+       sys     indir; 0f
+       bec     1f
+       mov     $-1,r1
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     lseek; ..; ..; ..
diff --git a/mach/pdp/libsys/lstat.s b/mach/pdp/libsys/lstat.s
new file mode 100644 (file)
index 0000000..7227680
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _lstat
+.globl _errno
+
+_lstat:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     lstat; ..; ..
diff --git a/mach/pdp/libsys/mknod.s b/mach/pdp/libsys/mknod.s
new file mode 100644 (file)
index 0000000..be7dce3
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _mknod
+.globl _errno
+
+_mknod:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     mknod; ..; ..; ..
diff --git a/mach/pdp/libsys/mount.s b/mach/pdp/libsys/mount.s
new file mode 100644 (file)
index 0000000..31338e3
--- /dev/null
@@ -0,0 +1,19 @@
+#include "sys.h"
+.globl _mount
+.globl _errno
+
+_mount:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     mount; ..; ..; ..
diff --git a/mach/pdp/libsys/mpxcall.s b/mach/pdp/libsys/mpxcall.s
new file mode 100644 (file)
index 0000000..ab1a85c
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _mpxcall
+.globl _errno
+
+_mpxcall:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     mpx; ..; ..
+
diff --git a/mach/pdp/libsys/nice.s b/mach/pdp/libsys/nice.s
new file mode 100644 (file)
index 0000000..2a0b033
--- /dev/null
@@ -0,0 +1,14 @@
+#include "sys.h"
+.globl _nice
+.globl _errno
+
+_nice:
+       mov     2(sp),r0
+       sys     nice
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/nostk.s b/mach/pdp/libsys/nostk.s
new file mode 100644 (file)
index 0000000..4421c72
--- /dev/null
@@ -0,0 +1,9 @@
+#include "sys.h"
+.globl _nostk
+
+_nostk:
+       sys     local; 0f
+       rts     pc
+.data:
+0:
+       sys     nostk
diff --git a/mach/pdp/libsys/open.s b/mach/pdp/libsys/open.s
new file mode 100644 (file)
index 0000000..6e7d8c9
--- /dev/null
@@ -0,0 +1,16 @@
+#include "sys.h"
+.globl _open
+.globl _errno
+
+_open:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     open; ..; ..
diff --git a/mach/pdp/libsys/pause.s b/mach/pdp/libsys/pause.s
new file mode 100644 (file)
index 0000000..da11a62
--- /dev/null
@@ -0,0 +1,6 @@
+#include "sys.h"
+.globl _pause
+
+_pause:
+       sys     pause
+       rts     pc
diff --git a/mach/pdp/libsys/phys.s b/mach/pdp/libsys/phys.s
new file mode 100644 (file)
index 0000000..04740cd
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _phys
+.globl _errno
+
+_phys:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+
+.data
+0:
+       sys     phys; ..; ..; ..
diff --git a/mach/pdp/libsys/pipe.s b/mach/pdp/libsys/pipe.s
new file mode 100644 (file)
index 0000000..be017ab
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _pipe
+.globl _errno
+
+_pipe:
+       sys     pipe
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       mov     r5,-(sp)
+       mov     4(sp),r5
+       mov     r0,(r5)+
+       mov     r1,(r5)
+       mov     (sp)+,r5
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/profil.s b/mach/pdp/libsys/profil.s
new file mode 100644 (file)
index 0000000..2886424
--- /dev/null
@@ -0,0 +1,13 @@
+#include "sys.h"
+.globl _profil
+
+_profil:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       mov     10(sp),0f+10
+       sys     indir; 0f
+       rts     pc
+.data
+0:
+       sys     profil; ..; ..; ..; ..
diff --git a/mach/pdp/libsys/ptrace.s b/mach/pdp/libsys/ptrace.s
new file mode 100644 (file)
index 0000000..1dd598a
--- /dev/null
@@ -0,0 +1,20 @@
+#include "sys.h"
+.globl _ptrace
+.globl _errno
+
+_ptrace:
+       mov     2(sp),0f+6
+       mov     4(sp),0f+2
+       mov     6(sp),0f+4
+       mov     10(sp),r0
+       clr     _errno
+       sys     indir; 9f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+
+.data
+0:
+       sys     ptrace; ..; ..; ..
diff --git a/mach/pdp/libsys/qfstat.s b/mach/pdp/libsys/qfstat.s
new file mode 100644 (file)
index 0000000..affcb50
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _qfstat
+.globl _errno
+
+_qfstat:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     qfstat; ..
diff --git a/mach/pdp/libsys/qstat.s b/mach/pdp/libsys/qstat.s
new file mode 100644 (file)
index 0000000..d5143f3
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _qstat
+.globl _errno
+
+_qstat:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     qstat; ..; ..
diff --git a/mach/pdp/libsys/quota.s b/mach/pdp/libsys/quota.s
new file mode 100644 (file)
index 0000000..89ef109
--- /dev/null
@@ -0,0 +1,21 @@
+#include "sys.h"
+.globl _quota
+.globl _errno
+
+_quota:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       mov     10(sp),0f+10
+       mov     12(sp),0f+12
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     quota; ..; ..; ..; ..; ..
diff --git a/mach/pdp/libsys/read.s b/mach/pdp/libsys/read.s
new file mode 100644 (file)
index 0000000..f89a36e
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _read
+.globl _errno
+
+_read:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       mov     6(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     read; ..; ..
diff --git a/mach/pdp/libsys/readlink.s b/mach/pdp/libsys/readlink.s
new file mode 100644 (file)
index 0000000..72c2f9d
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl  _readlink
+.globl _errno
+
+_readlink:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       mov     6(sp),0f+4
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     readlink; ..; ..
diff --git a/mach/pdp/libsys/reboot.s b/mach/pdp/libsys/reboot.s
new file mode 100644 (file)
index 0000000..bef5ab2
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _reboot
+.globl _errno
+
+_reboot:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     reboot; ..; ..
diff --git a/mach/pdp/libsys/renice.s b/mach/pdp/libsys/renice.s
new file mode 100644 (file)
index 0000000..a2e9595
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _renice
+.globl _errno
+
+_renice:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     renice; ..; ..
diff --git a/mach/pdp/libsys/rtp.s b/mach/pdp/libsys/rtp.s
new file mode 100644 (file)
index 0000000..5fe3dc2
--- /dev/null
@@ -0,0 +1,14 @@
+#include "sys.h"
+.globl _rtp
+.globl _errno
+
+_rtp:
+       mov     2(sp),r0
+       sys     rtp
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/sbrk.s b/mach/pdp/libsys/sbrk.s
new file mode 100644 (file)
index 0000000..c4b764f
--- /dev/null
@@ -0,0 +1,38 @@
+#include "sys.h"
+.globl _sbrk
+.globl _brk
+.globl _end
+.globl _errno
+
+_sbrk:
+       mov     2(sp),0f+2
+       beq     1f
+       add     xxx,0f+2
+       bcs     2f
+       sys     indir; 0f
+       bec     1f
+2:
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       mov     xxx,r0
+       add     2(sp),xxx
+       rts     pc
+
+_brk:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       mov     2(sp),xxx
+       clr     r0
+       rts     pc
+
+.data
+0:
+       sys     break; ..
+xxx:   _end
diff --git a/mach/pdp/libsys/setgid.s b/mach/pdp/libsys/setgid.s
new file mode 100644 (file)
index 0000000..5538f1c
--- /dev/null
@@ -0,0 +1,14 @@
+#include "sys.h"
+.globl _setgid
+.globl _errno
+
+_setgid:
+       mov     2(sp),r0
+       sys     setgid
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/setgrp.s b/mach/pdp/libsys/setgrp.s
new file mode 100644 (file)
index 0000000..987ba1a
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _setgrp
+.globl _errno
+
+_setgrp:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     setgrp; ..
diff --git a/mach/pdp/libsys/setuid.s b/mach/pdp/libsys/setuid.s
new file mode 100644 (file)
index 0000000..7c7fb4f
--- /dev/null
@@ -0,0 +1,14 @@
+#include "sys.h"
+.globl _setuid
+.globl _errno
+
+_setuid:
+       mov     2(sp),r0
+       sys     setuid
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/signal.s b/mach/pdp/libsys/signal.s
new file mode 100644 (file)
index 0000000..8663309
--- /dev/null
@@ -0,0 +1,88 @@
+#include <errno.h>
+#include "sys.h"
+rtt    = 6
+.globl _signal
+.globl _errno
+
+NSIGNALS = 0
+tvect:
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+       jsr     r0,1f; NSIGNALS=NSIGNALS+1
+
+1:
+       mov     r1,-(sp)
+       mov     r2,-(sp)
+       mov     r3,-(sp)
+       mov     r4,-(sp)
+       sub     $tvect+4,r0
+       asr     r0
+       mov     r0,-(sp)
+       asr     (sp)
+       jsr     pc,*dvect(r0)
+       tst     (sp)+
+       mov     (sp)+,r4
+       mov     (sp)+,r3
+       mov     (sp)+,r2
+       mov     (sp)+,r1
+       mov     (sp)+,r0
+       rtt
+
+_signal:
+       mov     r5,-(sp)
+       mov     sp,r5
+       mov     4(r5),r1
+       cmp     r1,$NSIGNALS
+       bhis    2f
+       mov     6(r5),r0
+       mov     r1,0f+2
+       asl     r1
+       mov     dvect(r1),-(sp)
+       mov     r0,dvect(r1)
+       mov     r0,0f+4
+       beq     1f
+       bit     $1,r0
+       bne     1f
+       asl     r1
+       add     $tvect,r1
+       mov     r1,0f+4
+1:
+       sys     indir; 0f
+       bes     3f
+       bit     $1,r0
+       beq     1f
+       mov     r0,(sp)
+1:
+       mov     (sp)+,r0
+       mov     (sp)+,r5
+       rts     pc
+2:
+       mov     $EINVAL.,r0
+3:
+       mov     r0,_errno
+       mov     $-1,r0
+       mov     (sp)+,r5
+       rts     pc
+
+.data
+0:
+       sys     signal; ..; ..
+.bss
+dvect: .=.+[NSIGNALS*2]
diff --git a/mach/pdp/libsys/stat.s b/mach/pdp/libsys/stat.s
new file mode 100644 (file)
index 0000000..87cdc05
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _stat
+.globl _errno
+
+_stat:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     stat; ..; ..
diff --git a/mach/pdp/libsys/stime.s b/mach/pdp/libsys/stime.s
new file mode 100644 (file)
index 0000000..3d0172b
--- /dev/null
@@ -0,0 +1,16 @@
+#include "sys.h"
+.globl _stime
+.globl _errno
+
+_stime:
+       mov     2(sp),r1
+       mov     (r1)+,r0
+       mov     (r1),r1
+       sys     stime
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
diff --git a/mach/pdp/libsys/stty.c b/mach/pdp/libsys/stty.c
new file mode 100644 (file)
index 0000000..222310c
--- /dev/null
@@ -0,0 +1,7 @@
+#include <sgtty.h>
+int stty(fildes,argp)
+       int fildes ;
+       struct sgttyb *argp ;
+{
+       return ioctl(fildes,TIOCSETP,argp) ;
+}
diff --git a/mach/pdp/libsys/submit.s b/mach/pdp/libsys/submit.s
new file mode 100644 (file)
index 0000000..089d6e7
--- /dev/null
@@ -0,0 +1,15 @@
+#include "sys.h"
+.globl _submit
+.globl _errno
+
+_submit:
+       mov     2(sp),r0
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     submit
diff --git a/mach/pdp/libsys/symlink.s b/mach/pdp/libsys/symlink.s
new file mode 100644 (file)
index 0000000..0cce298
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl  _symlink
+.globl _errno
+
+_symlink:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     symlink; ..
diff --git a/mach/pdp/libsys/sync.s b/mach/pdp/libsys/sync.s
new file mode 100644 (file)
index 0000000..0ef9ba9
--- /dev/null
@@ -0,0 +1,6 @@
+#include "sys.h"
+.globl _sync
+
+_sync:
+       sys     sync
+       rts     pc
diff --git a/mach/pdp/libsys/sys.h b/mach/pdp/libsys/sys.h
new file mode 100644 (file)
index 0000000..16898d5
--- /dev/null
@@ -0,0 +1,97 @@
+#define        indir    0.
+#define        exit     1.
+#define        fork     2.
+#define        read     3.
+#define        write    4.
+#define        open     5.
+#define        close    6.
+#define        wait     7.
+#define        creat    8.
+#define        link     9.
+#define        unlink   10.
+#define        exec     11.
+#define        chdir    12.
+#define        time     13.
+#define        mknod    14.
+#define        chmod    15.
+#define        chown    16.
+#define        break    17.
+#define        stat     18.
+#define        lseek    19.
+#define        getpid   20.
+#define        mount    21.
+#define        umount   22.
+#define        setuid   23.
+#define        getuid   24.
+#define        stime    25.
+#define        ptrace   26.
+#define        alarm    27.
+#define        fstat    28.
+#define        pause    29.
+#define        utime    30.
+#define        smdate   30.
+#define        stty     31.
+#define        gtty     32.
+#define        access   33.
+#define        nice     34.
+#define        sleep    35.
+#define        ftime    35.
+#define        sync     36.
+#define        kill     37.
+#define        csw      38.
+#define        setpgrp  39.
+#define        dup      41.
+#define        pipe     42.
+#define        times    43.
+#define        profil   44.
+#define        getgrp   45.
+#define        setgid   46.
+#define        getgid   47.
+#define        signal   48.
+#define        rtp      49.
+#define        setgrp   50.
+#define        acct     51.
+#define        phys     52.
+#define        lock     53.
+#define        ioctl    54.
+#define        reboot   55.
+#define        mpx      56.
+#define        vfork    57.
+#define        setinf   59.
+#define        exece    59.
+#define        local    58.
+#define        umask    60.
+#define        getinf   60.
+#define        chroot   61.
+
+#define        login     1.
+#define        lstat     2.
+#define        submit    3.
+#define        nostk     4.
+#define        killbkg   5.
+#define        killpg    6.
+#define        renice    7.
+#define        fetchi    8.
+#define        ucall     9.
+#define        quota    10.
+#define        qfstat   11.
+#define        qstat    12.
+#define        gldav    14.
+#define        fperr    15.
+#define        vhangup  16.
+#define        symlink  29.
+#define        readlink         30.
+
+#define        select   18.
+#define        gethost  19.
+#define        sethost  20.
+#define        socket   21.
+#define        connect  22.
+#define        accept   23.
+#define        send     24.
+#define        receive  25.
+#define        socketa  26.
+#define        setreuid         27.
+#define        setregid         28.
+#define        gethstid         31.
+#define        sethstid         32.
diff --git a/mach/pdp/libsys/time.s b/mach/pdp/libsys/time.s
new file mode 100644 (file)
index 0000000..c545ff8
--- /dev/null
@@ -0,0 +1,13 @@
+#include "sys.h"
+.globl _time
+
+_time:
+       sys     time
+       mov     r5,-(sp)
+       mov     4(sp),r5
+       beq     1f
+       mov     r0,(r5)+
+       mov     r1,(r5)+
+1:
+       mov     (sp)+,r5
+       rts     pc
diff --git a/mach/pdp/libsys/times.s b/mach/pdp/libsys/times.s
new file mode 100644 (file)
index 0000000..4b928d7
--- /dev/null
@@ -0,0 +1,10 @@
+#include "sys.h"
+.globl _times
+
+_times:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       rts     pc
+.data
+0:
+       sys     times; ..
diff --git a/mach/pdp/libsys/ucall.s b/mach/pdp/libsys/ucall.s
new file mode 100644 (file)
index 0000000..0915063
--- /dev/null
@@ -0,0 +1,13 @@
+#include "sys.h"
+.globl _ucall
+
+_ucall:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       mov     6(sp),0f+6
+       mov     10(sp),0f+10
+       sys     local; 0f
+       rts     pc
+.data
+0:
+       sys     ucall; ..; ..; ..; ..
diff --git a/mach/pdp/libsys/umask.s b/mach/pdp/libsys/umask.s
new file mode 100644 (file)
index 0000000..317d02a
--- /dev/null
@@ -0,0 +1,15 @@
+#include "sys.h"
+.globl _umask
+.globl _errno
+
+_umask:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     umask; ..
diff --git a/mach/pdp/libsys/umount.s b/mach/pdp/libsys/umount.s
new file mode 100644 (file)
index 0000000..ed78e08
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _umount
+.globl _errno
+
+_umount:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+
+.data
+0:
+       sys     umount; ..
diff --git a/mach/pdp/libsys/unlink.s b/mach/pdp/libsys/unlink.s
new file mode 100644 (file)
index 0000000..699ca90
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _unlink
+.globl _errno
+
+_unlink:
+       mov     2(sp),0f+2
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     unlink; ..
diff --git a/mach/pdp/libsys/utime.s b/mach/pdp/libsys/utime.s
new file mode 100644 (file)
index 0000000..6f4c6a6
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _utime
+.globl _errno
+
+_utime:
+       mov     2(sp),0f+2
+       mov     4(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       clr     r0
+       rts     pc
+.data
+0:
+       sys     utime; ..; ..
diff --git a/mach/pdp/libsys/vfork.s b/mach/pdp/libsys/vfork.s
new file mode 100644 (file)
index 0000000..dca86e8
--- /dev/null
@@ -0,0 +1,18 @@
+#include "sys.h"
+.globl _vfork
+.globl _errno
+
+_vfork:
+       mov     (sp)+,r1
+       sys     vfork
+       br      1f
+       bec     2f
+3:     mov     r0,_errno
+       mov     $-1,r0
+       jmp     (r1)
+
+1:                     / child, or vfork systemcall does not exist
+       bes     3b
+       clr     r0
+2:
+       jmp     (r1)
diff --git a/mach/pdp/libsys/vhangup.s b/mach/pdp/libsys/vhangup.s
new file mode 100644 (file)
index 0000000..f7cd025
--- /dev/null
@@ -0,0 +1,14 @@
+#include "sys.h"
+.globl _vhangup
+.globl _errno
+
+_vhangup:
+       sys     local; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     vhangup
diff --git a/mach/pdp/libsys/wait.s b/mach/pdp/libsys/wait.s
new file mode 100644 (file)
index 0000000..cc335a3
--- /dev/null
@@ -0,0 +1,16 @@
+#include "sys.h"
+.globl _wait
+.globl _errno
+
+_wait:
+       sys     wait
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+       rts     pc
+1:
+       tst     2(sp)
+       beq     1f
+       mov     r1,*2(sp)
+1:
+       rts     pc
diff --git a/mach/pdp/libsys/write.s b/mach/pdp/libsys/write.s
new file mode 100644 (file)
index 0000000..38c0f5e
--- /dev/null
@@ -0,0 +1,17 @@
+#include "sys.h"
+.globl _write
+.globl _errno
+
+_write:
+       mov     2(sp),r0
+       mov     4(sp),0f+2
+       mov     6(sp),0f+4
+       sys     indir; 0f
+       bec     1f
+       mov     r0,_errno
+       mov     $-1,r0
+1:
+       rts     pc
+.data
+0:
+       sys     write; ..; ..