*** empty log message ***
authorem <none@none>
Fri, 26 Jul 1985 12:51:45 +0000 (12:51 +0000)
committerem <none@none>
Fri, 26 Jul 1985 12:51:45 +0000 (12:51 +0000)
63 files changed:
mach/ns/libsys/_exit.s [new file with mode: 0644]
mach/ns/libsys/access.s [new file with mode: 0644]
mach/ns/libsys/acct.s [new file with mode: 0644]
mach/ns/libsys/alarm.s [new file with mode: 0644]
mach/ns/libsys/brk.s [new file with mode: 0644]
mach/ns/libsys/chdir.s [new file with mode: 0644]
mach/ns/libsys/chmod.s [new file with mode: 0644]
mach/ns/libsys/chown.s [new file with mode: 0644]
mach/ns/libsys/chroot.s [new file with mode: 0644]
mach/ns/libsys/cleanup.s [new file with mode: 0644]
mach/ns/libsys/close.s [new file with mode: 0644]
mach/ns/libsys/creat.s [new file with mode: 0644]
mach/ns/libsys/dup.s [new file with mode: 0644]
mach/ns/libsys/dup2.s [new file with mode: 0644]
mach/ns/libsys/errno.s [new file with mode: 0644]
mach/ns/libsys/execl.s [new file with mode: 0644]
mach/ns/libsys/execle.s [new file with mode: 0644]
mach/ns/libsys/execv.s [new file with mode: 0644]
mach/ns/libsys/execve.s [new file with mode: 0644]
mach/ns/libsys/exit.s [new file with mode: 0644]
mach/ns/libsys/fork.s [new file with mode: 0644]
mach/ns/libsys/fstat.s [new file with mode: 0644]
mach/ns/libsys/ftime.s [new file with mode: 0644]
mach/ns/libsys/getegid.s [new file with mode: 0644]
mach/ns/libsys/geteuid.s [new file with mode: 0644]
mach/ns/libsys/getgid.s [new file with mode: 0644]
mach/ns/libsys/getpid.s [new file with mode: 0644]
mach/ns/libsys/getuid.s [new file with mode: 0644]
mach/ns/libsys/gtty.s [new file with mode: 0644]
mach/ns/libsys/ioctl.s [new file with mode: 0644]
mach/ns/libsys/kill.s [new file with mode: 0644]
mach/ns/libsys/link.s [new file with mode: 0644]
mach/ns/libsys/lock.s [new file with mode: 0644]
mach/ns/libsys/lseek.s [new file with mode: 0644]
mach/ns/libsys/mknod.s [new file with mode: 0644]
mach/ns/libsys/mount.s [new file with mode: 0644]
mach/ns/libsys/mpxcall.s [new file with mode: 0644]
mach/ns/libsys/nice.s [new file with mode: 0644]
mach/ns/libsys/open.s [new file with mode: 0644]
mach/ns/libsys/pause.s [new file with mode: 0644]
mach/ns/libsys/pipe.s [new file with mode: 0644]
mach/ns/libsys/prof.s [new file with mode: 0644]
mach/ns/libsys/ptrace.s [new file with mode: 0644]
mach/ns/libsys/read.s [new file with mode: 0644]
mach/ns/libsys/sbrk.s [new file with mode: 0644]
mach/ns/libsys/setgid.s [new file with mode: 0644]
mach/ns/libsys/setsig.s [new file with mode: 0644]
mach/ns/libsys/setuid.s [new file with mode: 0644]
mach/ns/libsys/signal.s [new file with mode: 0644]
mach/ns/libsys/sigtrp.s [new file with mode: 0644]
mach/ns/libsys/stat.s [new file with mode: 0644]
mach/ns/libsys/stime.s [new file with mode: 0644]
mach/ns/libsys/stty.s [new file with mode: 0644]
mach/ns/libsys/sync.s [new file with mode: 0644]
mach/ns/libsys/tell.s [new file with mode: 0644]
mach/ns/libsys/time.s [new file with mode: 0644]
mach/ns/libsys/times.s [new file with mode: 0644]
mach/ns/libsys/umask.s [new file with mode: 0644]
mach/ns/libsys/umount.s [new file with mode: 0644]
mach/ns/libsys/unlink.s [new file with mode: 0644]
mach/ns/libsys/utime.s [new file with mode: 0644]
mach/ns/libsys/wait.s [new file with mode: 0644]
mach/ns/libsys/write.s [new file with mode: 0644]

diff --git a/mach/ns/libsys/_exit.s b/mach/ns/libsys/_exit.s
new file mode 100644 (file)
index 0000000..bcc38fd
--- /dev/null
@@ -0,0 +1,8 @@
+.define __exit
+.extern __exit
+.text
+__exit:
+enter[], 0
+movd 8(fp),tos
+movd 1,tos
+jsr @.mon
diff --git a/mach/ns/libsys/access.s b/mach/ns/libsys/access.s
new file mode 100644 (file)
index 0000000..0f2d0f7
--- /dev/null
@@ -0,0 +1,20 @@
+.define _access
+.extern _access
+.text
+_access:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 33,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/acct.s b/mach/ns/libsys/acct.s
new file mode 100644 (file)
index 0000000..f7afd78
--- /dev/null
@@ -0,0 +1,19 @@
+.define _acct
+.extern _acct
+.text
+_acct:
+enter[], 0
+movd 8(fp),tos
+movd 51,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/alarm.s b/mach/ns/libsys/alarm.s
new file mode 100644 (file)
index 0000000..bedbddd
--- /dev/null
@@ -0,0 +1,12 @@
+.define _alarm
+.extern _alarm
+.text
+_alarm:
+enter[], 0
+movd 8(fp),tos
+movd 27,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/brk.s b/mach/ns/libsys/brk.s
new file mode 100644 (file)
index 0000000..a3463ae
--- /dev/null
@@ -0,0 +1,9 @@
+.define _brk
+.extern _brk
+.text
+_brk:
+enter[], 0
+movd 8(fp),@.reghp
+movd 0,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/chdir.s b/mach/ns/libsys/chdir.s
new file mode 100644 (file)
index 0000000..1840b74
--- /dev/null
@@ -0,0 +1,19 @@
+.define _chdir
+.extern _chdir
+.text
+_chdir:
+enter[], 0
+movd 8(fp),tos
+movd 12,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/chmod.s b/mach/ns/libsys/chmod.s
new file mode 100644 (file)
index 0000000..03bf072
--- /dev/null
@@ -0,0 +1,20 @@
+.define _chmod
+.extern _chmod
+.text
+_chmod:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 15,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/chown.s b/mach/ns/libsys/chown.s
new file mode 100644 (file)
index 0000000..72e5cfc
--- /dev/null
@@ -0,0 +1,25 @@
+.define _chown
+.extern _chown
+.text
+_chown:
+enter[], 0
+addr 8(fp),r7
+movd 12,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 16,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/chroot.s b/mach/ns/libsys/chroot.s
new file mode 100644 (file)
index 0000000..2256b1a
--- /dev/null
@@ -0,0 +1,19 @@
+.define _chroot
+.extern _chroot
+.text
+_chroot:
+enter[], 0
+movd 8(fp),tos
+movd 61,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/cleanup.s b/mach/ns/libsys/cleanup.s
new file mode 100644 (file)
index 0000000..48c4252
--- /dev/null
@@ -0,0 +1,7 @@
+.define __cleanup
+.extern __cleanup
+.text
+__cleanup:
+enter[], 0
+exit []
+ret 0
diff --git a/mach/ns/libsys/close.s b/mach/ns/libsys/close.s
new file mode 100644 (file)
index 0000000..b6e217c
--- /dev/null
@@ -0,0 +1,6 @@
+.define _close
+.extern _close
+.text
+_close:
+movd 0, r4
+ret 0
diff --git a/mach/ns/libsys/creat.s b/mach/ns/libsys/creat.s
new file mode 100644 (file)
index 0000000..b0bf72e
--- /dev/null
@@ -0,0 +1,19 @@
+.define _creat
+.extern _creat
+.text
+_creat:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 8,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/dup.s b/mach/ns/libsys/dup.s
new file mode 100644 (file)
index 0000000..c4a353c
--- /dev/null
@@ -0,0 +1,19 @@
+.define _dup
+.extern _dup
+.text
+_dup:
+enter[], 0
+movd 8(fp),tos
+movd 8(fp),tos
+movd 41,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/dup2.s b/mach/ns/libsys/dup2.s
new file mode 100644 (file)
index 0000000..6f45f4e
--- /dev/null
@@ -0,0 +1,21 @@
+.define _dup2
+.extern _dup2
+.text
+_dup2:
+enter[], 0
+movd 8(fp),r7
+ord 64,r7
+movd 12(fp),tos
+movd r7,tos
+movd 41,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/errno.s b/mach/ns/libsys/errno.s
new file mode 100644 (file)
index 0000000..35c8719
--- /dev/null
@@ -0,0 +1,5 @@
+.define _errno
+.extern _errno
+.bss
+_errno:.space  4
+.text
diff --git a/mach/ns/libsys/execl.s b/mach/ns/libsys/execl.s
new file mode 100644 (file)
index 0000000..f637c22
--- /dev/null
@@ -0,0 +1,15 @@
+.define _execl
+.extern _execl
+.text
+_execl:
+enter[], 0
+movd @__penvp,tos
+addr 12(fp),tos
+movd 8(fp),tos
+movd 59,tos
+jsr @.mon
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/execle.s b/mach/ns/libsys/execle.s
new file mode 100644 (file)
index 0000000..2bd5385
--- /dev/null
@@ -0,0 +1,26 @@
+.define _execle
+.extern _execle
+.text
+_execle:
+enter[], 0
+addr 12(fp),tos
+I0011:
+movd tos,r7
+movd r7,tos
+cmpd 0(r7),0
+beq I0012
+movd tos,r7
+addr 4(r7),tos
+br I0011
+I0012:
+movd tos,r7
+movd 4(r7),tos
+addr 12(fp),tos
+movd 8(fp),tos
+movd 59,tos
+jsr @.mon
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/execv.s b/mach/ns/libsys/execv.s
new file mode 100644 (file)
index 0000000..a38e9bd
--- /dev/null
@@ -0,0 +1,15 @@
+.define _execv
+.extern _execv
+.text
+_execv:
+enter[], 0
+movd @__penvp,tos
+movd 12(fp),tos
+movd 8(fp),tos
+movd 59,tos
+jsr @.mon
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/execve.s b/mach/ns/libsys/execve.s
new file mode 100644 (file)
index 0000000..656278e
--- /dev/null
@@ -0,0 +1,19 @@
+.define _execve
+.extern _execve
+.text
+_execve:
+enter[], 0
+addr 8(fp),r7
+movd 12,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 59,tos
+jsr @.mon
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/exit.s b/mach/ns/libsys/exit.s
new file mode 100644 (file)
index 0000000..a809dd1
--- /dev/null
@@ -0,0 +1,11 @@
+.define _exit
+.extern _exit
+.text
+_exit:
+enter[], 0
+jsr @__cleanup
+movd 8(fp),tos
+jsr @__exit
+adjspd -4
+exit []
+ret 0
diff --git a/mach/ns/libsys/fork.s b/mach/ns/libsys/fork.s
new file mode 100644 (file)
index 0000000..9670ddf
--- /dev/null
@@ -0,0 +1,29 @@
+.define _fork
+.define _par_uid
+.extern _par_uid
+.bss
+_par_uid:.space        4
+.extern _fork
+.text
+_fork:
+enter[], 0
+movd 2,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
+I0011:
+cmpqd 0,tos
+beq I0012
+movd tos,r7
+movd r7,@_par_uid
+movd 0,tos
+I0012:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/fstat.s b/mach/ns/libsys/fstat.s
new file mode 100644 (file)
index 0000000..4a8f204
--- /dev/null
@@ -0,0 +1,20 @@
+.define _fstat
+.extern _fstat
+.text
+_fstat:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 28,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/ftime.s b/mach/ns/libsys/ftime.s
new file mode 100644 (file)
index 0000000..b4a2632
--- /dev/null
@@ -0,0 +1,10 @@
+.define _ftime
+.extern _ftime
+.text
+_ftime:
+enter[], 0
+movd 8(fp),tos
+movd 35,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/getegid.s b/mach/ns/libsys/getegid.s
new file mode 100644 (file)
index 0000000..6f2ff7e
--- /dev/null
@@ -0,0 +1,11 @@
+.define _getegid
+.extern _getegid
+.text
+_getegid:
+enter[], 0
+movd 47,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/geteuid.s b/mach/ns/libsys/geteuid.s
new file mode 100644 (file)
index 0000000..c2a99dd
--- /dev/null
@@ -0,0 +1,11 @@
+.define _geteuid
+.extern _geteuid
+.text
+_geteuid:
+enter[], 0
+movd 24,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/getgid.s b/mach/ns/libsys/getgid.s
new file mode 100644 (file)
index 0000000..011c894
--- /dev/null
@@ -0,0 +1,12 @@
+.define _getgid
+.extern _getgid
+.text
+_getgid:
+enter[], 0
+movd 47,tos
+jsr @.mon
+adjspd -4
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/getpid.s b/mach/ns/libsys/getpid.s
new file mode 100644 (file)
index 0000000..c064bc5
--- /dev/null
@@ -0,0 +1,11 @@
+.define _getpid
+.extern _getpid
+.text
+_getpid:
+enter[], 0
+movd 20,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/getuid.s b/mach/ns/libsys/getuid.s
new file mode 100644 (file)
index 0000000..1d3fabd
--- /dev/null
@@ -0,0 +1,12 @@
+.define _getuid
+.extern _getuid
+.text
+_getuid:
+enter[], 0
+movd 24,tos
+jsr @.mon
+adjspd -4
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/gtty.s b/mach/ns/libsys/gtty.s
new file mode 100644 (file)
index 0000000..bbe068d
--- /dev/null
@@ -0,0 +1,12 @@
+.define _gtty
+.extern _gtty
+.text
+_gtty:
+enter[], 0
+movd 12(fp),tos
+movd 29704,tos
+movd 8(fp),tos
+jsr @_ioctl
+adjspd -12
+exit []
+ret 0
diff --git a/mach/ns/libsys/ioctl.s b/mach/ns/libsys/ioctl.s
new file mode 100644 (file)
index 0000000..906d270
--- /dev/null
@@ -0,0 +1,25 @@
+.define _ioctl
+.extern _ioctl
+.text
+_ioctl:
+enter[], 0
+addr 8(fp),r7
+movd 12,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 54,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/kill.s b/mach/ns/libsys/kill.s
new file mode 100644 (file)
index 0000000..7447642
--- /dev/null
@@ -0,0 +1,20 @@
+.define _kill
+.extern _kill
+.text
+_kill:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 37,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/link.s b/mach/ns/libsys/link.s
new file mode 100644 (file)
index 0000000..9b82bd2
--- /dev/null
@@ -0,0 +1,20 @@
+.define _link
+.extern _link
+.text
+_link:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 9,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/lock.s b/mach/ns/libsys/lock.s
new file mode 100644 (file)
index 0000000..88fca25
--- /dev/null
@@ -0,0 +1,19 @@
+.define _lock
+.extern _lock
+.text
+_lock:
+enter[], 0
+movd 8(fp),tos
+movd 53,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/lseek.s b/mach/ns/libsys/lseek.s
new file mode 100644 (file)
index 0000000..8d50a6f
--- /dev/null
@@ -0,0 +1,24 @@
+.define _lseek
+.extern _lseek
+.text
+_lseek:
+enter[], 0
+addr 8(fp),r7
+movd 16,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 19,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r4
+movd tos,r5
+exit []
+ret 0
diff --git a/mach/ns/libsys/mknod.s b/mach/ns/libsys/mknod.s
new file mode 100644 (file)
index 0000000..3e85d2a
--- /dev/null
@@ -0,0 +1,25 @@
+.define _mknod
+.extern _mknod
+.text
+_mknod:
+enter[], 0
+addr 8(fp),r7
+movd 12,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 14,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/mount.s b/mach/ns/libsys/mount.s
new file mode 100644 (file)
index 0000000..216f5e2
--- /dev/null
@@ -0,0 +1,25 @@
+.define _mount
+.extern _mount
+.text
+_mount:
+enter[], 0
+addr 8(fp),r7
+movd 12,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 21,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/mpxcall.s b/mach/ns/libsys/mpxcall.s
new file mode 100644 (file)
index 0000000..9cdec1a
--- /dev/null
@@ -0,0 +1,20 @@
+.define _mpxcall
+.extern _mpxcall
+.text
+_mpxcall:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 56,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/nice.s b/mach/ns/libsys/nice.s
new file mode 100644 (file)
index 0000000..e47a54d
--- /dev/null
@@ -0,0 +1,10 @@
+.define _nice
+.extern _nice
+.text
+_nice:
+enter[], 0
+movd 8(fp),tos
+movd 34,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/open.s b/mach/ns/libsys/open.s
new file mode 100644 (file)
index 0000000..4a0cf98
--- /dev/null
@@ -0,0 +1,19 @@
+.define _open
+.extern _open
+.text
+_open:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 5,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/pause.s b/mach/ns/libsys/pause.s
new file mode 100644 (file)
index 0000000..607a351
--- /dev/null
@@ -0,0 +1,9 @@
+.define _pause
+.extern _pause
+.text
+_pause:
+enter[], 0
+movd 29,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/pipe.s b/mach/ns/libsys/pipe.s
new file mode 100644 (file)
index 0000000..6915b44
--- /dev/null
@@ -0,0 +1,23 @@
+.define _pipe
+.extern _pipe
+.text
+_pipe:
+enter[], 0
+movd 42,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
+I0011:
+movd 8(fp),r7
+movd tos,r6
+movd r6,4(r7)
+movd tos,r6
+movd r6,0(8(fp))
+movd 0,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/prof.s b/mach/ns/libsys/prof.s
new file mode 100644 (file)
index 0000000..822e5be
--- /dev/null
@@ -0,0 +1,16 @@
+.define _profil
+.extern _profil
+.text
+_profil:
+enter[], 0
+addr 8(fp),r7
+movd 16,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 44,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/ptrace.s b/mach/ns/libsys/ptrace.s
new file mode 100644 (file)
index 0000000..a32ebdf
--- /dev/null
@@ -0,0 +1,25 @@
+.define _ptrace
+.extern _ptrace
+.text
+_ptrace:
+enter[], 0
+xord @_errno,@_errno
+addr 8(fp),r7
+movd 16,r0
+addd r0,r7
+1:
+subd 4,r7
+movd 0(r7),tos
+acbd -4,r0,1b
+movd 26,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/read.s b/mach/ns/libsys/read.s
new file mode 100644 (file)
index 0000000..dd3552d
--- /dev/null
@@ -0,0 +1,15 @@
+.define _read
+.extern _read
+.text
+_read:
+enter[], 0
+save [r0,r1,r2,r3]
+movd 3,r0
+movd 12(fp),r1
+movd 16(fp),r2
+movd 0,r3
+svc
+movd 16(fp),r4
+restore [r0,r1,r2,r3]
+exit[]
+ret 0
diff --git a/mach/ns/libsys/sbrk.s b/mach/ns/libsys/sbrk.s
new file mode 100644 (file)
index 0000000..e7b080b
--- /dev/null
@@ -0,0 +1,11 @@
+.define _sbrk
+.extern _sbrk
+.text
+_sbrk:
+enter[], 0
+movd @.reghp,r7
+addd 8(fp),r7
+movd r7,@.reghp
+movd @.reghp,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/setgid.s b/mach/ns/libsys/setgid.s
new file mode 100644 (file)
index 0000000..b9cc669
--- /dev/null
@@ -0,0 +1,19 @@
+.define _setgid
+.extern _setgid
+.text
+_setgid:
+enter[], 0
+movd 8(fp),tos
+movd 46,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/setsig.s b/mach/ns/libsys/setsig.s
new file mode 100644 (file)
index 0000000..4035a36
--- /dev/null
@@ -0,0 +1,39 @@
+.define __setsig
+.bss
+_save:.space   4
+_trf:.space    4
+.extern __setsig
+.text
+__setsig:
+enter[], 0
+movd 8(fp),@_trf
+movd @.trpreg,r0
+movd _catchit,@.trpreg
+movd r0,@_save
+exit []
+ret 0
+_catchit:
+enter[], 0
+movd @.trpreg,r0
+movd _catchit,@.trpreg
+movd r0,tos
+adjspd -4
+movd @_trf,r7
+movd 8(fp),tos
+jsr r7
+cmpqd 0,r4
+bne I0021
+movd @.trpreg,r0
+movd @_save,@.trpreg
+movd r0,tos
+adjspd -4
+jsr @.trp
+movd @.trpreg,r0
+movd _catchit,@.trpreg
+movd r0,tos
+adjspd -4
+movd tos,r7
+movd r7,@_save
+I0021:
+exit []
+ret 0
diff --git a/mach/ns/libsys/setuid.s b/mach/ns/libsys/setuid.s
new file mode 100644 (file)
index 0000000..e9cfc09
--- /dev/null
@@ -0,0 +1,19 @@
+.define _setuid
+.extern _setuid
+.text
+_setuid:
+enter[], 0
+movd 8(fp),tos
+movd 23,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/signal.s b/mach/ns/libsys/signal.s
new file mode 100644 (file)
index 0000000..97d50b2
--- /dev/null
@@ -0,0 +1,159 @@
+.define _signal
+.data
+_vector:
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+.long  0
+_mapvec:
+.long  0
+.long  134219784
+.long  2048
+.long  0
+.long  2827
+.long  658176
+.long  3072
+firsttim:
+.extern _signal
+.long  1
+.text
+_signal:
+enter[], 16
+movd 8(fp),r7
+addd -1,r7
+movd r7,-4(fp)
+cmpqd 0,-4(fp)
+bgt I0014
+cmpd -4(fp),16
+blt I0013
+I0014:
+movd -1,tos
+br I0011
+I0013:
+cmpqd 0,@firsttim
+beq I0015
+xord @firsttim,@firsttim
+movd catchtrp,tos
+jsr @__setsig
+adjspd -4
+I0015:
+movd -4(fp),r7
+ashd 2,r7
+movd _vector(r7),-12(fp)
+cmpd -12(fp),12(fp)
+beq I0016
+movd -4(fp),r7
+ashd 2,r7
+movd 12(fp),_vector(r7)
+cmpd 12(fp),1
+bne I0017
+movd -3,-16(fp)
+br I0018
+I0017:
+cmpqd 0,12(fp)
+bne I0019
+movd -2,-16(fp)
+br I0018
+I0019:
+addr 128(8(fp)),-16(fp)
+I0018:
+movd 8(fp),tos
+movd -16(fp),tos
+jsr @_sigtrp
+adjspd -8
+cmpd r4,-1
+bne I0016
+movd -1,tos
+br I0011
+I0016:
+movd -12(fp),tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
+catchtrp:
+enter[], 0
+cmpd 8(fp),128
+ble I0023
+cmpd 8(fp),144
+bgt I0023
+movd 8(fp),r7
+subd 128,r7
+movd r7,tos
+jsr @procesig
+adjspd -4
+movd r4,tos
+br I0021
+I0023:
+cmpqd 0,8(fp)
+bgt I0024
+cmpd 8(fp),28
+bge I0024
+movd _mapvec,r7
+addd 8(fp),r7
+movzbd 0(r7),r6
+cmpqd 0,r6
+beq I0024
+movd _mapvec,r7
+addd 8(fp),r7
+movzbd 0(r7),tos
+jsr @procesig
+adjspd -4
+movd r4,tos
+br I0021
+I0024:
+movd 0,tos
+I0021:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
+procesig:
+enter[], 8
+movd 8(fp),r7
+addd -1,r7
+movd r7,-4(fp)
+movd -4(fp),r6
+ashd 2,r6
+movd _vector(r6),-8(fp)
+cmpd -8(fp),1
+bne I0033
+movd 1,tos
+br I0031
+I0033:
+cmpd 8(fp),4
+beq I0034
+cmpd 8(fp),5
+beq I0034
+movd -4(fp),r7
+ashd 2,r7
+movd 1,_vector(r7)
+I0034:
+cmpqd 0,-8(fp)
+bne I0035
+movd 0,tos
+br I0031
+I0035:
+movd -8(fp),r7
+movd 8(fp),tos
+jsr r7
+adjspd -4
+movd 1,tos
+I0031:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/sigtrp.s b/mach/ns/libsys/sigtrp.s
new file mode 100644 (file)
index 0000000..b20e917
--- /dev/null
@@ -0,0 +1,19 @@
+.define _sigtrp
+.extern _sigtrp
+.text
+_sigtrp:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 48,tos
+jsr @.mon
+cmpqd 0,tos
+beq I0011
+movd tos,r7
+movd r7,@_errno
+movd -1,tos
+I0011:
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/stat.s b/mach/ns/libsys/stat.s
new file mode 100644 (file)
index 0000000..66ca315
--- /dev/null
@@ -0,0 +1,20 @@
+.define _stat
+.extern _stat
+.text
+_stat:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 18,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/stime.s b/mach/ns/libsys/stime.s
new file mode 100644 (file)
index 0000000..a41bdde
--- /dev/null
@@ -0,0 +1,19 @@
+.define _stime
+.extern _stime
+.text
+_stime:
+enter[], 0
+movd 0(8(fp)),tos
+movd 25,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/stty.s b/mach/ns/libsys/stty.s
new file mode 100644 (file)
index 0000000..2a3fcc4
--- /dev/null
@@ -0,0 +1,12 @@
+.define _stty
+.extern _stty
+.text
+_stty:
+enter[], 0
+movd 12(fp),tos
+movd 29705,tos
+movd 8(fp),tos
+jsr @_ioctl
+adjspd -12
+exit []
+ret 0
diff --git a/mach/ns/libsys/sync.s b/mach/ns/libsys/sync.s
new file mode 100644 (file)
index 0000000..e0197ac
--- /dev/null
@@ -0,0 +1,9 @@
+.define _sync
+.extern _sync
+.text
+_sync:
+enter[], 0
+movd 36,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/tell.s b/mach/ns/libsys/tell.s
new file mode 100644 (file)
index 0000000..4623614
--- /dev/null
@@ -0,0 +1,12 @@
+.define _tell
+.extern _tell
+.text
+_tell:
+enter[], 0
+movd 1,tos
+movd 0,tos
+movd 8(fp),tos
+jsr @_lseek
+adjspd -12
+exit []
+ret 0
diff --git a/mach/ns/libsys/time.s b/mach/ns/libsys/time.s
new file mode 100644 (file)
index 0000000..9453664
--- /dev/null
@@ -0,0 +1,15 @@
+.define _time
+.extern _time
+.text
+_time:
+enter[], 12
+addr -12(fp),tos
+jsr @_ftime
+adjspd -4
+cmpqd 0,8(fp)
+beq I0013
+movd -12(fp),0(8(fp))
+I0013:
+movd -12(fp),r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/times.s b/mach/ns/libsys/times.s
new file mode 100644 (file)
index 0000000..d7a2671
--- /dev/null
@@ -0,0 +1,10 @@
+.define _times
+.extern _times
+.text
+_times:
+enter[], 0
+movd 8(fp),tos
+movd 43,tos
+jsr @.mon
+exit []
+ret 0
diff --git a/mach/ns/libsys/umask.s b/mach/ns/libsys/umask.s
new file mode 100644 (file)
index 0000000..4f2f63c
--- /dev/null
@@ -0,0 +1,12 @@
+.define _umask
+.extern _umask
+.text
+_umask:
+enter[], 0
+movd 8(fp),tos
+movd 60,tos
+jsr @.mon
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/umount.s b/mach/ns/libsys/umount.s
new file mode 100644 (file)
index 0000000..f1259bf
--- /dev/null
@@ -0,0 +1,19 @@
+.define _umount
+.extern _umount
+.text
+_umount:
+enter[], 0
+movd 8(fp),tos
+movd 22,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/unlink.s b/mach/ns/libsys/unlink.s
new file mode 100644 (file)
index 0000000..d5617c1
--- /dev/null
@@ -0,0 +1,19 @@
+.define _unlink
+.extern _unlink
+.text
+_unlink:
+enter[], 0
+movd 8(fp),tos
+movd 10,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/utime.s b/mach/ns/libsys/utime.s
new file mode 100644 (file)
index 0000000..0c98b78
--- /dev/null
@@ -0,0 +1,20 @@
+.define _utime
+.extern _utime
+.text
+_utime:
+enter[], 0
+movd 12(fp),tos
+movd 8(fp),tos
+movd 30,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+movd 0,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/wait.s b/mach/ns/libsys/wait.s
new file mode 100644 (file)
index 0000000..b63a258
--- /dev/null
@@ -0,0 +1,29 @@
+.define _wait
+.extern _wait
+.text
+_wait:
+enter[], 0
+movd 7,tos
+jsr @.mon
+cmpqd 0,tos
+bne I0011
+cmpqd 0,8(fp)
+beq I0012
+movd tos,r7
+movd r7,0(8(fp))
+movd tos,r6
+movd r6,r4
+exit []
+ret 0
+I0012:
+adjspd -4
+movd tos,r7
+movd r7,r4
+exit []
+ret 0
+I0011:
+movd tos,r7
+movd r7,@_errno
+movd -1,r4
+exit []
+ret 0
diff --git a/mach/ns/libsys/write.s b/mach/ns/libsys/write.s
new file mode 100644 (file)
index 0000000..ab89b52
--- /dev/null
@@ -0,0 +1,15 @@
+.define _write
+.extern _write
+.text
+_write:
+enter[], 0
+save [r0,r1,r2,r3]
+movd 4,r0
+movd 12(fp),r1
+movd 16(fp),r2
+movd 0,r3
+svc
+movd 16(fp),r4
+restore [r0,r1,r2,r3]
+exit[]
+ret 0