From bc759a29039137a4551b9cba22ddce4099c7f465 Mon Sep 17 00:00:00 2001 From: em Date: Fri, 26 Jul 1985 12:51:45 +0000 Subject: [PATCH] *** empty log message *** --- mach/ns/libsys/_exit.s | 8 ++ mach/ns/libsys/access.s | 20 +++++ mach/ns/libsys/acct.s | 19 +++++ mach/ns/libsys/alarm.s | 12 +++ mach/ns/libsys/brk.s | 9 +++ mach/ns/libsys/chdir.s | 19 +++++ mach/ns/libsys/chmod.s | 20 +++++ mach/ns/libsys/chown.s | 25 ++++++ mach/ns/libsys/chroot.s | 19 +++++ mach/ns/libsys/cleanup.s | 7 ++ mach/ns/libsys/close.s | 6 ++ mach/ns/libsys/creat.s | 19 +++++ mach/ns/libsys/dup.s | 19 +++++ mach/ns/libsys/dup2.s | 21 ++++++ mach/ns/libsys/errno.s | 5 ++ mach/ns/libsys/execl.s | 15 ++++ mach/ns/libsys/execle.s | 26 +++++++ mach/ns/libsys/execv.s | 15 ++++ mach/ns/libsys/execve.s | 19 +++++ mach/ns/libsys/exit.s | 11 +++ mach/ns/libsys/fork.s | 29 +++++++ mach/ns/libsys/fstat.s | 20 +++++ mach/ns/libsys/ftime.s | 10 +++ mach/ns/libsys/getegid.s | 11 +++ mach/ns/libsys/geteuid.s | 11 +++ mach/ns/libsys/getgid.s | 12 +++ mach/ns/libsys/getpid.s | 11 +++ mach/ns/libsys/getuid.s | 12 +++ mach/ns/libsys/gtty.s | 12 +++ mach/ns/libsys/ioctl.s | 25 ++++++ mach/ns/libsys/kill.s | 20 +++++ mach/ns/libsys/link.s | 20 +++++ mach/ns/libsys/lock.s | 19 +++++ mach/ns/libsys/lseek.s | 24 ++++++ mach/ns/libsys/mknod.s | 25 ++++++ mach/ns/libsys/mount.s | 25 ++++++ mach/ns/libsys/mpxcall.s | 20 +++++ mach/ns/libsys/nice.s | 10 +++ mach/ns/libsys/open.s | 19 +++++ mach/ns/libsys/pause.s | 9 +++ mach/ns/libsys/pipe.s | 23 ++++++ mach/ns/libsys/prof.s | 16 ++++ mach/ns/libsys/ptrace.s | 25 ++++++ mach/ns/libsys/read.s | 15 ++++ mach/ns/libsys/sbrk.s | 11 +++ mach/ns/libsys/setgid.s | 19 +++++ mach/ns/libsys/setsig.s | 39 ++++++++++ mach/ns/libsys/setuid.s | 19 +++++ mach/ns/libsys/signal.s | 159 +++++++++++++++++++++++++++++++++++++++ mach/ns/libsys/sigtrp.s | 19 +++++ mach/ns/libsys/stat.s | 20 +++++ mach/ns/libsys/stime.s | 19 +++++ mach/ns/libsys/stty.s | 12 +++ mach/ns/libsys/sync.s | 9 +++ mach/ns/libsys/tell.s | 12 +++ mach/ns/libsys/time.s | 15 ++++ mach/ns/libsys/times.s | 10 +++ mach/ns/libsys/umask.s | 12 +++ mach/ns/libsys/umount.s | 19 +++++ mach/ns/libsys/unlink.s | 19 +++++ mach/ns/libsys/utime.s | 20 +++++ mach/ns/libsys/wait.s | 29 +++++++ mach/ns/libsys/write.s | 15 ++++ 63 files changed, 1214 insertions(+) create mode 100644 mach/ns/libsys/_exit.s create mode 100644 mach/ns/libsys/access.s create mode 100644 mach/ns/libsys/acct.s create mode 100644 mach/ns/libsys/alarm.s create mode 100644 mach/ns/libsys/brk.s create mode 100644 mach/ns/libsys/chdir.s create mode 100644 mach/ns/libsys/chmod.s create mode 100644 mach/ns/libsys/chown.s create mode 100644 mach/ns/libsys/chroot.s create mode 100644 mach/ns/libsys/cleanup.s create mode 100644 mach/ns/libsys/close.s create mode 100644 mach/ns/libsys/creat.s create mode 100644 mach/ns/libsys/dup.s create mode 100644 mach/ns/libsys/dup2.s create mode 100644 mach/ns/libsys/errno.s create mode 100644 mach/ns/libsys/execl.s create mode 100644 mach/ns/libsys/execle.s create mode 100644 mach/ns/libsys/execv.s create mode 100644 mach/ns/libsys/execve.s create mode 100644 mach/ns/libsys/exit.s create mode 100644 mach/ns/libsys/fork.s create mode 100644 mach/ns/libsys/fstat.s create mode 100644 mach/ns/libsys/ftime.s create mode 100644 mach/ns/libsys/getegid.s create mode 100644 mach/ns/libsys/geteuid.s create mode 100644 mach/ns/libsys/getgid.s create mode 100644 mach/ns/libsys/getpid.s create mode 100644 mach/ns/libsys/getuid.s create mode 100644 mach/ns/libsys/gtty.s create mode 100644 mach/ns/libsys/ioctl.s create mode 100644 mach/ns/libsys/kill.s create mode 100644 mach/ns/libsys/link.s create mode 100644 mach/ns/libsys/lock.s create mode 100644 mach/ns/libsys/lseek.s create mode 100644 mach/ns/libsys/mknod.s create mode 100644 mach/ns/libsys/mount.s create mode 100644 mach/ns/libsys/mpxcall.s create mode 100644 mach/ns/libsys/nice.s create mode 100644 mach/ns/libsys/open.s create mode 100644 mach/ns/libsys/pause.s create mode 100644 mach/ns/libsys/pipe.s create mode 100644 mach/ns/libsys/prof.s create mode 100644 mach/ns/libsys/ptrace.s create mode 100644 mach/ns/libsys/read.s create mode 100644 mach/ns/libsys/sbrk.s create mode 100644 mach/ns/libsys/setgid.s create mode 100644 mach/ns/libsys/setsig.s create mode 100644 mach/ns/libsys/setuid.s create mode 100644 mach/ns/libsys/signal.s create mode 100644 mach/ns/libsys/sigtrp.s create mode 100644 mach/ns/libsys/stat.s create mode 100644 mach/ns/libsys/stime.s create mode 100644 mach/ns/libsys/stty.s create mode 100644 mach/ns/libsys/sync.s create mode 100644 mach/ns/libsys/tell.s create mode 100644 mach/ns/libsys/time.s create mode 100644 mach/ns/libsys/times.s create mode 100644 mach/ns/libsys/umask.s create mode 100644 mach/ns/libsys/umount.s create mode 100644 mach/ns/libsys/unlink.s create mode 100644 mach/ns/libsys/utime.s create mode 100644 mach/ns/libsys/wait.s create mode 100644 mach/ns/libsys/write.s diff --git a/mach/ns/libsys/_exit.s b/mach/ns/libsys/_exit.s new file mode 100644 index 000000000..bcc38fd80 --- /dev/null +++ b/mach/ns/libsys/_exit.s @@ -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 index 000000000..0f2d0f7f4 --- /dev/null +++ b/mach/ns/libsys/access.s @@ -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 index 000000000..f7afd78ab --- /dev/null +++ b/mach/ns/libsys/acct.s @@ -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 index 000000000..bedbddd00 --- /dev/null +++ b/mach/ns/libsys/alarm.s @@ -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 index 000000000..a3463ae61 --- /dev/null +++ b/mach/ns/libsys/brk.s @@ -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 index 000000000..1840b74b4 --- /dev/null +++ b/mach/ns/libsys/chdir.s @@ -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 index 000000000..03bf072c7 --- /dev/null +++ b/mach/ns/libsys/chmod.s @@ -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 index 000000000..72e5cfcee --- /dev/null +++ b/mach/ns/libsys/chown.s @@ -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 index 000000000..2256b1a9a --- /dev/null +++ b/mach/ns/libsys/chroot.s @@ -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 index 000000000..48c425203 --- /dev/null +++ b/mach/ns/libsys/cleanup.s @@ -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 index 000000000..b6e217c8e --- /dev/null +++ b/mach/ns/libsys/close.s @@ -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 index 000000000..b0bf72e91 --- /dev/null +++ b/mach/ns/libsys/creat.s @@ -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 index 000000000..c4a353c2a --- /dev/null +++ b/mach/ns/libsys/dup.s @@ -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 index 000000000..6f45f4e5f --- /dev/null +++ b/mach/ns/libsys/dup2.s @@ -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 index 000000000..35c871935 --- /dev/null +++ b/mach/ns/libsys/errno.s @@ -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 index 000000000..f637c229f --- /dev/null +++ b/mach/ns/libsys/execl.s @@ -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 index 000000000..2bd538580 --- /dev/null +++ b/mach/ns/libsys/execle.s @@ -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 index 000000000..a38e9bdfa --- /dev/null +++ b/mach/ns/libsys/execv.s @@ -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 index 000000000..656278ec6 --- /dev/null +++ b/mach/ns/libsys/execve.s @@ -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 index 000000000..a809dd175 --- /dev/null +++ b/mach/ns/libsys/exit.s @@ -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 index 000000000..9670ddfb5 --- /dev/null +++ b/mach/ns/libsys/fork.s @@ -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 index 000000000..4a8f20481 --- /dev/null +++ b/mach/ns/libsys/fstat.s @@ -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 index 000000000..b4a26323a --- /dev/null +++ b/mach/ns/libsys/ftime.s @@ -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 index 000000000..6f2ff7e8f --- /dev/null +++ b/mach/ns/libsys/getegid.s @@ -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 index 000000000..c2a99dd98 --- /dev/null +++ b/mach/ns/libsys/geteuid.s @@ -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 index 000000000..011c894fe --- /dev/null +++ b/mach/ns/libsys/getgid.s @@ -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 index 000000000..c064bc5c6 --- /dev/null +++ b/mach/ns/libsys/getpid.s @@ -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 index 000000000..1d3fabd1d --- /dev/null +++ b/mach/ns/libsys/getuid.s @@ -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 index 000000000..bbe068d52 --- /dev/null +++ b/mach/ns/libsys/gtty.s @@ -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 index 000000000..906d270a6 --- /dev/null +++ b/mach/ns/libsys/ioctl.s @@ -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 index 000000000..7447642ff --- /dev/null +++ b/mach/ns/libsys/kill.s @@ -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 index 000000000..9b82bd2f0 --- /dev/null +++ b/mach/ns/libsys/link.s @@ -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 index 000000000..88fca256c --- /dev/null +++ b/mach/ns/libsys/lock.s @@ -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 index 000000000..8d50a6fd6 --- /dev/null +++ b/mach/ns/libsys/lseek.s @@ -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 index 000000000..3e85d2a13 --- /dev/null +++ b/mach/ns/libsys/mknod.s @@ -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 index 000000000..216f5e273 --- /dev/null +++ b/mach/ns/libsys/mount.s @@ -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 index 000000000..9cdec1ab7 --- /dev/null +++ b/mach/ns/libsys/mpxcall.s @@ -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 index 000000000..e47a54d35 --- /dev/null +++ b/mach/ns/libsys/nice.s @@ -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 index 000000000..4a0cf9804 --- /dev/null +++ b/mach/ns/libsys/open.s @@ -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 index 000000000..607a351b8 --- /dev/null +++ b/mach/ns/libsys/pause.s @@ -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 index 000000000..6915b4438 --- /dev/null +++ b/mach/ns/libsys/pipe.s @@ -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 index 000000000..822e5beb0 --- /dev/null +++ b/mach/ns/libsys/prof.s @@ -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 index 000000000..a32ebdfc0 --- /dev/null +++ b/mach/ns/libsys/ptrace.s @@ -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 index 000000000..dd3552dbe --- /dev/null +++ b/mach/ns/libsys/read.s @@ -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 index 000000000..e7b080b5d --- /dev/null +++ b/mach/ns/libsys/sbrk.s @@ -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 index 000000000..b9cc66989 --- /dev/null +++ b/mach/ns/libsys/setgid.s @@ -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 index 000000000..4035a369a --- /dev/null +++ b/mach/ns/libsys/setsig.s @@ -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 index 000000000..e9cfc095b --- /dev/null +++ b/mach/ns/libsys/setuid.s @@ -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 index 000000000..97d50b24a --- /dev/null +++ b/mach/ns/libsys/signal.s @@ -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 index 000000000..b20e9172e --- /dev/null +++ b/mach/ns/libsys/sigtrp.s @@ -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 index 000000000..66ca31568 --- /dev/null +++ b/mach/ns/libsys/stat.s @@ -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 index 000000000..a41bdde18 --- /dev/null +++ b/mach/ns/libsys/stime.s @@ -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 index 000000000..2a3fcc444 --- /dev/null +++ b/mach/ns/libsys/stty.s @@ -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 index 000000000..e0197ac6c --- /dev/null +++ b/mach/ns/libsys/sync.s @@ -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 index 000000000..4623614b0 --- /dev/null +++ b/mach/ns/libsys/tell.s @@ -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 index 000000000..9453664cb --- /dev/null +++ b/mach/ns/libsys/time.s @@ -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 index 000000000..d7a267127 --- /dev/null +++ b/mach/ns/libsys/times.s @@ -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 index 000000000..4f2f63cff --- /dev/null +++ b/mach/ns/libsys/umask.s @@ -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 index 000000000..f1259bf0b --- /dev/null +++ b/mach/ns/libsys/umount.s @@ -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 index 000000000..d5617c1cc --- /dev/null +++ b/mach/ns/libsys/unlink.s @@ -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 index 000000000..0c98b7895 --- /dev/null +++ b/mach/ns/libsys/utime.s @@ -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 index 000000000..b63a2586f --- /dev/null +++ b/mach/ns/libsys/wait.s @@ -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 index 000000000..ab89b5287 --- /dev/null +++ b/mach/ns/libsys/write.s @@ -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 -- 2.34.1