*** empty log message ***
authorkeie <none@none>
Tue, 1 Jan 1985 22:27:02 +0000 (22:27 +0000)
committerkeie <none@none>
Tue, 1 Jan 1985 22:27:02 +0000 (22:27 +0000)
63 files changed:
lang/cem/libcc/mon/_exit.e [new file with mode: 0644]
lang/cem/libcc/mon/access.e [new file with mode: 0644]
lang/cem/libcc/mon/acct.e [new file with mode: 0644]
lang/cem/libcc/mon/alarm.e [new file with mode: 0644]
lang/cem/libcc/mon/brk.e [new file with mode: 0644]
lang/cem/libcc/mon/chdir.e [new file with mode: 0644]
lang/cem/libcc/mon/chmod.e [new file with mode: 0644]
lang/cem/libcc/mon/chown.e [new file with mode: 0644]
lang/cem/libcc/mon/chroot.e [new file with mode: 0644]
lang/cem/libcc/mon/cleanup.c [new file with mode: 0644]
lang/cem/libcc/mon/close.e [new file with mode: 0644]
lang/cem/libcc/mon/creat.e [new file with mode: 0644]
lang/cem/libcc/mon/dup.e [new file with mode: 0644]
lang/cem/libcc/mon/dup2.e [new file with mode: 0644]
lang/cem/libcc/mon/errno.e [new file with mode: 0644]
lang/cem/libcc/mon/execl.e [new file with mode: 0644]
lang/cem/libcc/mon/execle.e [new file with mode: 0644]
lang/cem/libcc/mon/execv.e [new file with mode: 0644]
lang/cem/libcc/mon/execve.e [new file with mode: 0644]
lang/cem/libcc/mon/exit.c [new file with mode: 0644]
lang/cem/libcc/mon/fork.e [new file with mode: 0644]
lang/cem/libcc/mon/fstat.e [new file with mode: 0644]
lang/cem/libcc/mon/ftime.e [new file with mode: 0644]
lang/cem/libcc/mon/getegid.e [new file with mode: 0644]
lang/cem/libcc/mon/geteuid.e [new file with mode: 0644]
lang/cem/libcc/mon/getgid.e [new file with mode: 0644]
lang/cem/libcc/mon/getpid.e [new file with mode: 0644]
lang/cem/libcc/mon/getuid.e [new file with mode: 0644]
lang/cem/libcc/mon/gtty.c [new file with mode: 0644]
lang/cem/libcc/mon/ioctl.e [new file with mode: 0644]
lang/cem/libcc/mon/kill.e [new file with mode: 0644]
lang/cem/libcc/mon/link.e [new file with mode: 0644]
lang/cem/libcc/mon/lock.e [new file with mode: 0644]
lang/cem/libcc/mon/lseek.e [new file with mode: 0644]
lang/cem/libcc/mon/mknod.e [new file with mode: 0644]
lang/cem/libcc/mon/mount.e [new file with mode: 0644]
lang/cem/libcc/mon/mpxcall.e [new file with mode: 0644]
lang/cem/libcc/mon/nice.e [new file with mode: 0644]
lang/cem/libcc/mon/open.e [new file with mode: 0644]
lang/cem/libcc/mon/pause.e [new file with mode: 0644]
lang/cem/libcc/mon/pipe.e [new file with mode: 0644]
lang/cem/libcc/mon/prof.e [new file with mode: 0644]
lang/cem/libcc/mon/ptrace.e [new file with mode: 0644]
lang/cem/libcc/mon/read.e [new file with mode: 0644]
lang/cem/libcc/mon/sbrk.e [new file with mode: 0644]
lang/cem/libcc/mon/setgid.e [new file with mode: 0644]
lang/cem/libcc/mon/setsig.e [new file with mode: 0644]
lang/cem/libcc/mon/setuid.e [new file with mode: 0644]
lang/cem/libcc/mon/signal.c [new file with mode: 0644]
lang/cem/libcc/mon/sigtrp.e [new file with mode: 0644]
lang/cem/libcc/mon/stat.e [new file with mode: 0644]
lang/cem/libcc/mon/stime.e [new file with mode: 0644]
lang/cem/libcc/mon/stty.c [new file with mode: 0644]
lang/cem/libcc/mon/sync.e [new file with mode: 0644]
lang/cem/libcc/mon/tell.c [new file with mode: 0644]
lang/cem/libcc/mon/time.c [new file with mode: 0644]
lang/cem/libcc/mon/times.e [new file with mode: 0644]
lang/cem/libcc/mon/umask.e [new file with mode: 0644]
lang/cem/libcc/mon/umount.e [new file with mode: 0644]
lang/cem/libcc/mon/unlink.e [new file with mode: 0644]
lang/cem/libcc/mon/utime.e [new file with mode: 0644]
lang/cem/libcc/mon/wait.e [new file with mode: 0644]
lang/cem/libcc/mon/write.e [new file with mode: 0644]

diff --git a/lang/cem/libcc/mon/_exit.e b/lang/cem/libcc/mon/_exit.e
new file mode 100644 (file)
index 0000000..a88f9b5
--- /dev/null
@@ -0,0 +1,8 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_exit
+ pro $_exit,0
+ lol 0
+ loc 1
+ mon
+ end
diff --git a/lang/cem/libcc/mon/access.e b/lang/cem/libcc/mon/access.e
new file mode 100644 (file)
index 0000000..681f597
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $access
+ pro $access,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 33
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/acct.e b/lang/cem/libcc/mon/acct.e
new file mode 100644 (file)
index 0000000..8ac3415
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $acct
+ pro $acct,0
+ lal 0
+ loi EM_PSIZE
+ loc 51
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/alarm.e b/lang/cem/libcc/mon/alarm.e
new file mode 100644 (file)
index 0000000..228147e
--- /dev/null
@@ -0,0 +1,9 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $alarm
+ pro $alarm,0
+ lol 0
+ loc 27
+ mon
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/brk.e b/lang/cem/libcc/mon/brk.e
new file mode 100644 (file)
index 0000000..1c2b130
--- /dev/null
@@ -0,0 +1,10 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $brk
+ pro $brk,0
+ lal 0
+ loi EM_PSIZE
+ str 2          ; The - possibly - occurring traps should be caught
+ loc 0
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/chdir.e b/lang/cem/libcc/mon/chdir.e
new file mode 100644 (file)
index 0000000..089da81
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $chdir
+ pro $chdir,0
+ lal 0
+ loi EM_PSIZE
+ loc 12
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/chmod.e b/lang/cem/libcc/mon/chmod.e
new file mode 100644 (file)
index 0000000..fa278b7
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $chmod
+ pro $chmod,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 15
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/chown.e b/lang/cem/libcc/mon/chown.e
new file mode 100644 (file)
index 0000000..f6f0ffb
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $chown
+ pro $chown,0
+ lal 0
+ loi EM_PSIZE+2*EM_WSIZE
+ loc 16
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/chroot.e b/lang/cem/libcc/mon/chroot.e
new file mode 100644 (file)
index 0000000..f448be0
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $chroot
+ pro $chroot,0
+ lal 0
+ loi EM_PSIZE
+ loc 61
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/cleanup.c b/lang/cem/libcc/mon/cleanup.c
new file mode 100644 (file)
index 0000000..88849f1
--- /dev/null
@@ -0,0 +1 @@
+_cleanup(){}
diff --git a/lang/cem/libcc/mon/close.e b/lang/cem/libcc/mon/close.e
new file mode 100644 (file)
index 0000000..77c3dd5
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $close
+ pro $close,0
+ lol 0
+ loc 6
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/creat.e b/lang/cem/libcc/mon/creat.e
new file mode 100644 (file)
index 0000000..6832be0
--- /dev/null
@@ -0,0 +1,14 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $creat
+ pro $creat,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 8
+ mon
+ zeq *1
+ ste errno              ; since e==r0
+ loc -1
+1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/dup.e b/lang/cem/libcc/mon/dup.e
new file mode 100644 (file)
index 0000000..e9c77d8
--- /dev/null
@@ -0,0 +1,14 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $dup
+ pro $dup,0
+ lol 0
+ dup EM_WSIZE
+ loc 41
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/dup2.e b/lang/cem/libcc/mon/dup2.e
new file mode 100644 (file)
index 0000000..67bda6f
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $dup2
+ pro $dup2,0
+ lal 0
+ loi 2*EM_WSIZE
+ loc 64
+ ior EM_WSIZE
+ loc 41
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/errno.e b/lang/cem/libcc/mon/errno.e
new file mode 100644 (file)
index 0000000..18df901
--- /dev/null
@@ -0,0 +1,6 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+
+ exa errno
+errno
+ bss EM_WSIZE,0,0
diff --git a/lang/cem/libcc/mon/execl.e b/lang/cem/libcc/mon/execl.e
new file mode 100644 (file)
index 0000000..e958d65
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $execl
+ pro $execl,0
+ lae _penvp
+ loi EM_PSIZE
+ lal EM_PSIZE
+ lal 0
+ loi EM_PSIZE
+ loc 59
+ mon
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/execle.e b/lang/cem/libcc/mon/execle.e
new file mode 100644 (file)
index 0000000..3f529ea
--- /dev/null
@@ -0,0 +1,25 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $execle
+ pro $execle,0
+ lal EM_PSIZE
+1
+ dup EM_PSIZE
+ loi EM_PSIZE
+ zer EM_PSIZE
+ cmp
+ zeq *2
+ adp EM_PSIZE
+ bra *1
+2
+ adp EM_PSIZE
+ loi EM_PSIZE
+ lal EM_PSIZE
+ lal 0
+ loi EM_PSIZE
+ loc 59
+ mon
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/execv.e b/lang/cem/libcc/mon/execv.e
new file mode 100644 (file)
index 0000000..5cbaa34
--- /dev/null
@@ -0,0 +1,14 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $execv
+ pro $execv,0
+ lae _penvp
+ loi EM_PSIZE
+ lal 0
+ loi 2*EM_PSIZE
+ loc 59
+ mon
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/execve.e b/lang/cem/libcc/mon/execve.e
new file mode 100644 (file)
index 0000000..33769b4
--- /dev/null
@@ -0,0 +1,12 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $execve
+ pro $execve,0
+ lal 0
+ loi 3*EM_PSIZE
+ loc 59
+ mon
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/exit.c b/lang/cem/libcc/mon/exit.c
new file mode 100644 (file)
index 0000000..f57bd3a
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
+ *
+ *          This product is part of the Amsterdam Compiler Kit
+ *        developed by Andrew  S.  Tanenbaum, Johan W. Stevenson,
+ *      Ed Keizer and Hans van Staveren of the Vrije Universiteit.
+ *
+ * Permission to use, sell, duplicate or disclose this software must be
+ * obtained in writing. Requests for such permissions may be sent to
+ *
+ *      Dr. Andrew S. Tanenbaum
+ *      Wiskundig Seminarium
+ *      Vrije Universiteit
+ *      Postbox 7161
+ *      1007 MC Amsterdam
+ *      The Netherlands
+ *
+ */
+
+exit(code)
+{
+       _cleanup() ;
+       _exit(code) ;
+}
diff --git a/lang/cem/libcc/mon/fork.e b/lang/cem/libcc/mon/fork.e
new file mode 100644 (file)
index 0000000..e2c27b9
--- /dev/null
@@ -0,0 +1,21 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exa par_uid
+par_uid
+ bss EM_WSIZE,0,0
+
+ exp $fork
+ pro $fork,0
+ loc 2
+ mon
+ zeq *1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+1
+ zeq *2
+ ste par_uid
+ loc 0
+2
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/fstat.e b/lang/cem/libcc/mon/fstat.e
new file mode 100644 (file)
index 0000000..97b8410
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $fstat
+ pro $fstat,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 28
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/ftime.e b/lang/cem/libcc/mon/ftime.e
new file mode 100644 (file)
index 0000000..614533a
--- /dev/null
@@ -0,0 +1,10 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $ftime
+ pro $ftime,0
+ lal 0
+ loi EM_PSIZE
+ loc 35
+ mon
+ ret 0
+ end
diff --git a/lang/cem/libcc/mon/getegid.e b/lang/cem/libcc/mon/getegid.e
new file mode 100644 (file)
index 0000000..3e0c4dd
--- /dev/null
@@ -0,0 +1,8 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $getegid
+ pro $getegid,0
+ loc 47
+ mon
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/geteuid.e b/lang/cem/libcc/mon/geteuid.e
new file mode 100644 (file)
index 0000000..78b0460
--- /dev/null
@@ -0,0 +1,8 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $geteuid
+ pro $geteuid,0
+ loc 24
+ mon
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/getgid.e b/lang/cem/libcc/mon/getgid.e
new file mode 100644 (file)
index 0000000..c52a8c7
--- /dev/null
@@ -0,0 +1,9 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $getgid
+ pro $getgid,0
+ loc 47
+ mon
+ asp EM_WSIZE
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/getpid.e b/lang/cem/libcc/mon/getpid.e
new file mode 100644 (file)
index 0000000..f98e720
--- /dev/null
@@ -0,0 +1,8 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $getpid
+ pro $getpid,0
+ loc 20
+ mon
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/getuid.e b/lang/cem/libcc/mon/getuid.e
new file mode 100644 (file)
index 0000000..7367cd2
--- /dev/null
@@ -0,0 +1,9 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $getuid
+ pro $getuid,0
+ loc 24
+ mon
+ asp EM_WSIZE
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/gtty.c b/lang/cem/libcc/mon/gtty.c
new file mode 100644 (file)
index 0000000..cf2c769
--- /dev/null
@@ -0,0 +1,4 @@
+#include <sgtty.h>
+int gtty(fildes,argp) int fildes ; struct sgttyb *argp ; {
+       return ioctl(fildes,TIOCGETP,argp) ;
+}
diff --git a/lang/cem/libcc/mon/ioctl.e b/lang/cem/libcc/mon/ioctl.e
new file mode 100644 (file)
index 0000000..337aab9
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $ioctl
+ pro $ioctl,0
+ lal 0
+ loi EM_PSIZE+2*EM_WSIZE
+ loc 54
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/kill.e b/lang/cem/libcc/mon/kill.e
new file mode 100644 (file)
index 0000000..49df6c0
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $kill
+ pro $kill,0
+ ldl 0
+ loc 37
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/link.e b/lang/cem/libcc/mon/link.e
new file mode 100644 (file)
index 0000000..50a1e87
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $link
+ pro $link,0
+ lal 0
+ loi 2*EM_PSIZE
+ loc 9
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/lock.e b/lang/cem/libcc/mon/lock.e
new file mode 100644 (file)
index 0000000..09faeed
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $lock
+ pro $lock,0
+ lol 0
+ loc 53
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/lseek.e b/lang/cem/libcc/mon/lseek.e
new file mode 100644 (file)
index 0000000..282a959
--- /dev/null
@@ -0,0 +1,25 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $lseek
+ pro $lseek,0
+ lal 0
+ loi 4*EM_WSIZE
+ loc 19
+ mon
+ zeq *1
+ ste errno
+#if EM_WSIZE==1
+ ldc -1
+ loc 2
+ loc 4
+ cii
+#endif
+#if EM_WSIZE==2
+ ldc -1
+#endif
+#if EM_WSIZE==4
+ loc -1
+#endif
+1
+ ret 2*EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/mknod.e b/lang/cem/libcc/mon/mknod.e
new file mode 100644 (file)
index 0000000..0732983
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $mknod
+ pro $mknod,0
+ lal 0
+ loi EM_PSIZE+2*EM_WSIZE
+ loc 14
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/mount.e b/lang/cem/libcc/mon/mount.e
new file mode 100644 (file)
index 0000000..8bdfddf
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $mount
+ pro $mount,0
+ lal 0
+ loi EM_WSIZE+2*EM_PSIZE
+ loc 21
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/mpxcall.e b/lang/cem/libcc/mon/mpxcall.e
new file mode 100644 (file)
index 0000000..8782b11
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $mpxcall
+ pro $mpxcall,0
+ lal 0
+ loi EM_PSIZE+EM_WSIZE
+ loc 56
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/nice.e b/lang/cem/libcc/mon/nice.e
new file mode 100644 (file)
index 0000000..60bda54
--- /dev/null
@@ -0,0 +1,9 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $nice
+ pro $nice,0
+ lol 0
+ loc 34
+ mon
+ ret 0
+ end
diff --git a/lang/cem/libcc/mon/open.e b/lang/cem/libcc/mon/open.e
new file mode 100644 (file)
index 0000000..e6da95e
--- /dev/null
@@ -0,0 +1,14 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $open
+ pro $open,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 5
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/pause.e b/lang/cem/libcc/mon/pause.e
new file mode 100644 (file)
index 0000000..4392772
--- /dev/null
@@ -0,0 +1,8 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $pause
+ pro $pause,0
+ loc 29
+ mon
+ ret 0
+ end
diff --git a/lang/cem/libcc/mon/pipe.e b/lang/cem/libcc/mon/pipe.e
new file mode 100644 (file)
index 0000000..133ada6
--- /dev/null
@@ -0,0 +1,18 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $pipe
+ pro $pipe,0
+ loc 42
+ mon
+ zeq *1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+1
+ lal 0
+ loi EM_PSIZE
+ stf EM_WSIZE
+ sil 0
+ loc 0
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/prof.e b/lang/cem/libcc/mon/prof.e
new file mode 100644 (file)
index 0000000..53617e4
--- /dev/null
@@ -0,0 +1,10 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $profil
+ pro $profil,0
+ lal 0
+ loi 4*EM_PSIZE
+ loc 44
+ mon
+ ret 0
+ end
diff --git a/lang/cem/libcc/mon/ptrace.e b/lang/cem/libcc/mon/ptrace.e
new file mode 100644 (file)
index 0000000..2fd4b97
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $ptrace
+ pro $ptrace,0
+ zre errno
+ lal 0
+ loi EM_PSIZE+3*EM_WSIZE
+ loc 26
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/read.e b/lang/cem/libcc/mon/read.e
new file mode 100644 (file)
index 0000000..82e0dd3
--- /dev/null
@@ -0,0 +1,23 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $read
+ pro $read,0
+ lol EM_WSIZE+EM_PSIZE
+ loc EM_WSIZE
+ loc EM_PSIZE
+ ciu
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 3
+ mon
+ zne *1
+ loc EM_PSIZE
+ loc EM_WSIZE
+ cui
+ bra *2
+1
+ ste errno
+ loc -1
+2
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/sbrk.e b/lang/cem/libcc/mon/sbrk.e
new file mode 100644 (file)
index 0000000..bed0138
--- /dev/null
@@ -0,0 +1,11 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $sbrk
+ pro $sbrk,0
+ lor 2
+ lor 2
+ lol 0
+ ads EM_WSIZE
+ str 2          ; The - possibly - occurring traps should be caught
+ ret EM_PSIZE
+ end
diff --git a/lang/cem/libcc/mon/setgid.e b/lang/cem/libcc/mon/setgid.e
new file mode 100644 (file)
index 0000000..1e9093a
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $setgid
+ pro $setgid,0
+ lol 0
+ loc 46
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/setsig.e b/lang/cem/libcc/mon/setsig.e
new file mode 100644 (file)
index 0000000..d0a4181
--- /dev/null
@@ -0,0 +1,45 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+save
+        bss EM_PSIZE,0,0
+trf
+        bss EM_PSIZE,0,0
+
+ exp $_setsig
+ pro $_setsig,0
+ lal 0
+ loi EM_PSIZE
+ lae trf
+ sti EM_PSIZE
+ inp $catchit
+ lpi $catchit           ; trap to catchit
+ sig
+ lae save               ; remember higher level trap
+ sti EM_PSIZE
+ ret 0
+ end
+
+ pro $catchit,0
+ lpi $catchit
+ sig
+ asp EM_PSIZE
+ lol 0                  ; fetch trapno
+ lae trf
+ loi EM_PSIZE           ; fetch procedure identifier
+ cai
+ lfr EM_WSIZE
+ zne *1
+ ; trap not handled by trf function, trap through; trapno still on stack
+ lae save
+ loi EM_PSIZE
+ sig
+ asp EM_PSIZE
+ trp
+ lpi $catchit           ; trap ignored, further traps to catchit
+ sig
+ asp EM_PSIZE
+ lae save               ; remember higher level trap
+ sti EM_PSIZE
+1
+ rtt
+ end
diff --git a/lang/cem/libcc/mon/setuid.e b/lang/cem/libcc/mon/setuid.e
new file mode 100644 (file)
index 0000000..656f5b8
--- /dev/null
@@ -0,0 +1,15 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $setuid
+ pro $setuid,0
+ lol 0
+ loc 23
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/signal.c b/lang/cem/libcc/mon/signal.c
new file mode 100644 (file)
index 0000000..9288479
--- /dev/null
@@ -0,0 +1,99 @@
+#include <signal.h>
+
+typedef int (*callvec)() ;
+
+static callvec vector[16] = {
+      SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL,
+      SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL, SIG_DFL
+} ;
+
+static char mapvec[] = {
+       0,              /* EARRAY */
+       0,              /* ERANGE */
+       0,              /* ESET */
+       0,              /* EIOVFL */
+       SIGFPE,         /* EFOVFL */
+       SIGFPE,         /* EFUNDFL */
+       0,              /* EIDIVZ */
+       SIGFPE,         /* EFDIVZ */
+       0,              /* EIUND, already ignored */
+       SIGFPE,         /* EFUND */
+       0,              /* ECONV */
+       0,              /* 11 */
+       0,              /* 12 */
+       0,              /* 13 */
+       0,              /* 14 */
+       0,              /* 15 */
+       SIGSEGV,        /* ESTACK */
+       SIGSEGV,        /* EHEAP */
+       0,              /* EILLINS */
+       0,              /* EODDZ */
+       0,              /* ECASE */
+       SIGSEGV,        /* EBADMEM */
+       SIGBUS,         /* EBADPTR */
+       0,              /* EBADPC */
+       0,              /* EBADLAE */
+       SIGSYS,         /* EBADMON */
+       0,              /* EBADLIN */
+       0,              /* EBADGTO */
+} ;
+
+#define VECBASE 128
+
+static          firsttime       = 1 ;
+static int      catchtrp() ;
+static int      procesig() ;
+
+callvec signal(sig,func) int sig ; callvec func ; {
+       register index, i ;
+       callvec  prev ;
+
+       index= sig-1 ;
+       if ( index<0 || index>=(sizeof vector/sizeof vector[0]) ) {
+               return (callvec) -1 ;
+       }
+       if ( firsttime ) {
+               firsttime= 0 ;
+               _setsig(catchtrp) ;
+       }
+       prev= vector[index] ;
+       if ( prev!=func ) {
+               register int mapval ;
+               vector[index]= func ;
+               if ( func==SIG_IGN ) {
+                       mapval= -3;
+               } else if ( func==SIG_DFL ) {
+                       mapval= -2;
+               } else {
+                       mapval=VECBASE+sig;
+               }
+               if ( sigtrp(mapval,sig)== -1 ) return (callvec) -1;
+
+       }
+       return prev ;
+}
+
+static int catchtrp(trapno) int trapno ; {
+       if ( trapno>VECBASE &&
+            trapno<=VECBASE + (sizeof vector/sizeof vector[0]) ) {
+               return procesig(trapno-VECBASE) ;
+       }
+       if ( trapno>=0 && trapno< (sizeof mapvec/sizeof mapvec[0]) &&
+            mapvec[trapno] ) {
+               return procesig(mapvec[trapno]) ;
+       }
+       return 0 ; /* Failed to handle the trap */
+}
+
+static int procesig(sig) int sig ; {
+       register index ;
+       callvec  trf ;
+
+       index= sig-1 ;
+       trf= vector[index] ;
+       if ( trf==SIG_IGN ) return 1 ;
+       if ( sig!=SIGILL && sig!=SIGTRAP ) vector[index]= SIG_IGN ;
+       if ( trf==SIG_DFL ) return 0 ;
+       (*trf)(sig) ;
+       return 1 ;
+}
diff --git a/lang/cem/libcc/mon/sigtrp.e b/lang/cem/libcc/mon/sigtrp.e
new file mode 100644 (file)
index 0000000..ffaa231
--- /dev/null
@@ -0,0 +1,13 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $sigtrp
+ pro $sigtrp,0
+ ldl 0
+ loc 48
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/stat.e b/lang/cem/libcc/mon/stat.e
new file mode 100644 (file)
index 0000000..d5be7a3
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $stat
+ pro $stat,0
+ lal 0
+ loi 2*EM_PSIZE
+ loc 18
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/stime.e b/lang/cem/libcc/mon/stime.e
new file mode 100644 (file)
index 0000000..79a8946
--- /dev/null
@@ -0,0 +1,20 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $stime
+ pro $stime,0
+#if EM_WSIZE<4
+ lol 0
+ loi 4
+#else
+ lil 0
+#endif
+ loc 25
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/stty.c b/lang/cem/libcc/mon/stty.c
new file mode 100644 (file)
index 0000000..778b9ae
--- /dev/null
@@ -0,0 +1,4 @@
+#include <sgtty.h>
+int stty(fildes,argp) int fildes ; struct sgttyb *argp ; {
+       return ioctl(fildes,TIOCSETP,argp) ;
+}
diff --git a/lang/cem/libcc/mon/sync.e b/lang/cem/libcc/mon/sync.e
new file mode 100644 (file)
index 0000000..476b45d
--- /dev/null
@@ -0,0 +1,8 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $sync
+ pro $sync,0
+ loc 36
+ mon
+ ret 0
+ end
diff --git a/lang/cem/libcc/mon/tell.c b/lang/cem/libcc/mon/tell.c
new file mode 100644 (file)
index 0000000..12e6bf2
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+ * return offset in file.
+ */
+
+long   lseek();
+
+long tell(f)
+{
+       return(lseek(f, 0L, 1));
+}
diff --git a/lang/cem/libcc/mon/time.c b/lang/cem/libcc/mon/time.c
new file mode 100644 (file)
index 0000000..29979d0
--- /dev/null
@@ -0,0 +1,9 @@
+#include <sys/types.h>
+#include <sys/timeb.h>
+time_t time(timpt) time_t *timpt ; {
+       struct timeb buf ;
+
+       ftime(&buf) ;
+       if ( timpt ) *timpt= buf.time ;
+       return buf.time ;
+}
diff --git a/lang/cem/libcc/mon/times.e b/lang/cem/libcc/mon/times.e
new file mode 100644 (file)
index 0000000..d347ffc
--- /dev/null
@@ -0,0 +1,10 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $times
+ pro $times,0
+ lal 0
+ loi EM_PSIZE
+ loc 43
+ mon
+ ret 0
+ end
diff --git a/lang/cem/libcc/mon/umask.e b/lang/cem/libcc/mon/umask.e
new file mode 100644 (file)
index 0000000..8bcf4fe
--- /dev/null
@@ -0,0 +1,9 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $umask
+ pro $umask,0
+ lol 0
+ loc 60
+ mon
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/umount.e b/lang/cem/libcc/mon/umount.e
new file mode 100644 (file)
index 0000000..f92b87e
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $umount
+ pro $umount,0
+ lal 0
+ loi EM_PSIZE
+ loc 22
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/unlink.e b/lang/cem/libcc/mon/unlink.e
new file mode 100644 (file)
index 0000000..3313d8a
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $unlink
+ pro $unlink,0
+ lal 0
+ loi EM_PSIZE
+ loc 10
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/utime.e b/lang/cem/libcc/mon/utime.e
new file mode 100644 (file)
index 0000000..50df236
--- /dev/null
@@ -0,0 +1,16 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $utime
+ pro $utime,0
+ lal 0
+ loi 2*EM_PSIZE
+ loc 30
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/wait.e b/lang/cem/libcc/mon/wait.e
new file mode 100644 (file)
index 0000000..a000ce8
--- /dev/null
@@ -0,0 +1,33 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+#if EM_WSIZE<4
+#define STATUS_SIZE 2
+#else
+#define STATUS_SIZE EM_WSIZE
+#endif
+ exp $wait
+ pro $wait,0
+ loc 7
+ mon
+ zne *1
+ lal 0
+ loi EM_PSIZE
+ zer EM_PSIZE
+ cms EM_PSIZE
+ zeq *2
+#if EM_WSIZE==1
+ lal 0
+ loi EM_PSIZE
+ sti 2                  ; 2 bytes, not one int!
+#else
+ sil 0
+#endif
+ ret EM_WSIZE
+2
+ asp STATUS_SIZE
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
diff --git a/lang/cem/libcc/mon/write.e b/lang/cem/libcc/mon/write.e
new file mode 100644 (file)
index 0000000..2e91b5a
--- /dev/null
@@ -0,0 +1,23 @@
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $write
+ pro $write,0
+ lol EM_WSIZE+EM_PSIZE
+ loc EM_WSIZE
+ loc EM_PSIZE
+ ciu
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 4
+ mon
+ zne *1
+ loc EM_PSIZE
+ loc EM_WSIZE
+ cui
+ bra *2
+1
+ ste errno
+ loc -1
+2
+ ret EM_WSIZE
+ end