From 0122bc2dd72165b335cad178630775ca688f2c3c Mon Sep 17 00:00:00 2001 From: keie Date: Thu, 7 Feb 1985 22:59:50 +0000 Subject: [PATCH] *** empty log message *** --- mach/pmds4/libsys/LIST | 36 +++++++++++++++++++++++++ mach/pmds4/libsys/access.s | 10 +++++++ mach/pmds4/libsys/alarm.s | 6 +++++ mach/pmds4/libsys/cerror.s | 9 +++++++ mach/pmds4/libsys/chmod.s | 9 +++++++ mach/pmds4/libsys/chown.s | 10 +++++++ mach/pmds4/libsys/cleanup.s | 5 ++++ mach/pmds4/libsys/close.s | 9 +++++++ mach/pmds4/libsys/creat.s | 8 ++++++ mach/pmds4/libsys/dup.s | 13 ++++++++++ mach/pmds4/libsys/exec.s | 13 ++++++++++ mach/pmds4/libsys/exit1.s | 12 +++++++++ mach/pmds4/libsys/exit2.s | 4 +++ mach/pmds4/libsys/fork.s | 11 ++++++++ mach/pmds4/libsys/fstat.s | 9 +++++++ mach/pmds4/libsys/getgid.s | 12 +++++++++ mach/pmds4/libsys/getpid.s | 5 ++++ mach/pmds4/libsys/getuid.s | 12 +++++++++ mach/pmds4/libsys/ioctl.s | 9 +++++++ mach/pmds4/libsys/kill.s | 9 +++++++ mach/pmds4/libsys/link.s | 9 +++++++ mach/pmds4/libsys/lseek.s | 8 ++++++ mach/pmds4/libsys/mknod.s | 10 +++++++ mach/pmds4/libsys/mount.s | 10 +++++++ mach/pmds4/libsys/nice.s | 10 +++++++ mach/pmds4/libsys/open.s | 8 ++++++ mach/pmds4/libsys/pipe.s | 12 +++++++++ mach/pmds4/libsys/profil.s | 6 +++++ mach/pmds4/libsys/read.s | 8 ++++++ mach/pmds4/libsys/sbrk.s | 31 ++++++++++++++++++++++ mach/pmds4/libsys/signal.s | 52 +++++++++++++++++++++++++++++++++++++ mach/pmds4/libsys/stat.s | 9 +++++++ mach/pmds4/libsys/time.s | 21 +++++++++++++++ mach/pmds4/libsys/unlink.s | 9 +++++++ mach/pmds4/libsys/wait.s | 13 ++++++++++ mach/pmds4/libsys/write.s | 8 ++++++ 36 files changed, 435 insertions(+) create mode 100644 mach/pmds4/libsys/LIST create mode 100644 mach/pmds4/libsys/access.s create mode 100644 mach/pmds4/libsys/alarm.s create mode 100644 mach/pmds4/libsys/cerror.s create mode 100644 mach/pmds4/libsys/chmod.s create mode 100644 mach/pmds4/libsys/chown.s create mode 100644 mach/pmds4/libsys/cleanup.s create mode 100644 mach/pmds4/libsys/close.s create mode 100644 mach/pmds4/libsys/creat.s create mode 100644 mach/pmds4/libsys/dup.s create mode 100644 mach/pmds4/libsys/exec.s create mode 100644 mach/pmds4/libsys/exit1.s create mode 100644 mach/pmds4/libsys/exit2.s create mode 100644 mach/pmds4/libsys/fork.s create mode 100644 mach/pmds4/libsys/fstat.s create mode 100644 mach/pmds4/libsys/getgid.s create mode 100644 mach/pmds4/libsys/getpid.s create mode 100644 mach/pmds4/libsys/getuid.s create mode 100644 mach/pmds4/libsys/ioctl.s create mode 100644 mach/pmds4/libsys/kill.s create mode 100644 mach/pmds4/libsys/link.s create mode 100644 mach/pmds4/libsys/lseek.s create mode 100644 mach/pmds4/libsys/mknod.s create mode 100644 mach/pmds4/libsys/mount.s create mode 100644 mach/pmds4/libsys/nice.s create mode 100644 mach/pmds4/libsys/open.s create mode 100644 mach/pmds4/libsys/pipe.s create mode 100644 mach/pmds4/libsys/profil.s create mode 100644 mach/pmds4/libsys/read.s create mode 100644 mach/pmds4/libsys/sbrk.s create mode 100644 mach/pmds4/libsys/signal.s create mode 100644 mach/pmds4/libsys/stat.s create mode 100644 mach/pmds4/libsys/time.s create mode 100644 mach/pmds4/libsys/unlink.s create mode 100644 mach/pmds4/libsys/wait.s create mode 100644 mach/pmds4/libsys/write.s diff --git a/mach/pmds4/libsys/LIST b/mach/pmds4/libsys/LIST new file mode 100644 index 000000000..df1f06ac6 --- /dev/null +++ b/mach/pmds4/libsys/LIST @@ -0,0 +1,36 @@ +tail_mon +chmod.s +close.s +creat.s +exec.s +fork.s +fstat.s +getgid.s +getpid.s +getuid.s +ioctl.s +kill.s +link.s +lseek.s +open.s +pipe.s +read.s +sbrk.s +stat.s +unlink.s +wait.s +write.s +cerror.s +access.s +alarm.s +chown.s +dup.s +mknod.s +mount.s +nice.s +profil.s +signal.s +exit1.s +exit2.s +time.s +cleanup.s diff --git a/mach/pmds4/libsys/access.s b/mach/pmds4/libsys/access.s new file mode 100644 index 000000000..1618ec886 --- /dev/null +++ b/mach/pmds4/libsys/access.s @@ -0,0 +1,10 @@ +.define _access +.extern _access +rts +_access: trap #0 +.short 0x21 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/alarm.s b/mach/pmds4/libsys/alarm.s new file mode 100644 index 000000000..4e8e6982f --- /dev/null +++ b/mach/pmds4/libsys/alarm.s @@ -0,0 +1,6 @@ +.define _alarm +.extern _alarm +.text +_alarm: trap #0 +.short 0x1B + rts diff --git a/mach/pmds4/libsys/cerror.s b/mach/pmds4/libsys/cerror.s new file mode 100644 index 000000000..d9fff34c9 --- /dev/null +++ b/mach/pmds4/libsys/cerror.s @@ -0,0 +1,9 @@ +.define cerror +.extern cerror +cerror: move.l d0,_errno + move.l #-1,d0 + rts +.bss +_errno: + .space 4 +.text diff --git a/mach/pmds4/libsys/chmod.s b/mach/pmds4/libsys/chmod.s new file mode 100644 index 000000000..d51b23b60 --- /dev/null +++ b/mach/pmds4/libsys/chmod.s @@ -0,0 +1,9 @@ +.define _chmod +.extern _chmod +_chmod: trap #0 +.short 0xF + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/chown.s b/mach/pmds4/libsys/chown.s new file mode 100644 index 000000000..dd96bb183 --- /dev/null +++ b/mach/pmds4/libsys/chown.s @@ -0,0 +1,10 @@ +.define _chown +.extern _chown +.text +_chown: trap #0 +.short 0x10 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/cleanup.s b/mach/pmds4/libsys/cleanup.s new file mode 100644 index 000000000..ce4a76359 --- /dev/null +++ b/mach/pmds4/libsys/cleanup.s @@ -0,0 +1,5 @@ +.define __cleanup +.extern __cleanup +.text +__cleanup: +rts diff --git a/mach/pmds4/libsys/close.s b/mach/pmds4/libsys/close.s new file mode 100644 index 000000000..3f330bc81 --- /dev/null +++ b/mach/pmds4/libsys/close.s @@ -0,0 +1,9 @@ +.define _close +.extern _close +_close: trap #0 +.short 0x6 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/creat.s b/mach/pmds4/libsys/creat.s new file mode 100644 index 000000000..ed29f4511 --- /dev/null +++ b/mach/pmds4/libsys/creat.s @@ -0,0 +1,8 @@ +.define _creat +.extern _creat +_creat: trap #0 +.short 0x8 + bcc 1f + jmp cerror +1: + rts diff --git a/mach/pmds4/libsys/dup.s b/mach/pmds4/libsys/dup.s new file mode 100644 index 000000000..2adfabdd6 --- /dev/null +++ b/mach/pmds4/libsys/dup.s @@ -0,0 +1,13 @@ +.define _dup +.define _dup2 +.extern _dup +.text +.extern _dup2 +_dup2: or.l #64,4(sp) + +_dup: trap #0 +.short 0x29 + bcc 1f + jmp cerror +1: + rts diff --git a/mach/pmds4/libsys/exec.s b/mach/pmds4/libsys/exec.s new file mode 100644 index 000000000..8e38e94c5 --- /dev/null +++ b/mach/pmds4/libsys/exec.s @@ -0,0 +1,13 @@ +.define _execl +.define _execve +.extern _execl +.extern _execve +_execl: tst.b -48(sp) + link a6,#0 + move.l _environ,-(sp) + pea 12(a6) + move.l 8(a6),-(sp) + jsr _execve +_execve: trap #0 +.short 59 + jmp cerror diff --git a/mach/pmds4/libsys/exit1.s b/mach/pmds4/libsys/exit1.s new file mode 100644 index 000000000..3824a590d --- /dev/null +++ b/mach/pmds4/libsys/exit1.s @@ -0,0 +1,12 @@ +.define _exit +.extern _exit +.text +_exit: +tst.b -40(sp) +link a6,#-0 +jsr __cleanup +move.l 8(a6),-(sp) +jsr __exit +add.l #4,sp +unlk a6 +rts diff --git a/mach/pmds4/libsys/exit2.s b/mach/pmds4/libsys/exit2.s new file mode 100644 index 000000000..5cbdc68fa --- /dev/null +++ b/mach/pmds4/libsys/exit2.s @@ -0,0 +1,4 @@ +.define __exit +.extern __exit +__exit: trap #0 +.short 0x1 diff --git a/mach/pmds4/libsys/fork.s b/mach/pmds4/libsys/fork.s new file mode 100644 index 000000000..b338b3e1e --- /dev/null +++ b/mach/pmds4/libsys/fork.s @@ -0,0 +1,11 @@ +.define _fork +.extern _fork +_fork: trap #0 +.short 0x2 + bra 1f + bcc 2f + jmp cerror +2: + clr.l d0 +1: + rts diff --git a/mach/pmds4/libsys/fstat.s b/mach/pmds4/libsys/fstat.s new file mode 100644 index 000000000..f574f28bd --- /dev/null +++ b/mach/pmds4/libsys/fstat.s @@ -0,0 +1,9 @@ +.define _fstat +.extern _fstat +_fstat: trap #0 +.short 0x1C + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/getgid.s b/mach/pmds4/libsys/getgid.s new file mode 100644 index 000000000..098977ada --- /dev/null +++ b/mach/pmds4/libsys/getgid.s @@ -0,0 +1,12 @@ +.define _getgid +.define _getegid +.extern _getgid +.extern _getegid +_getgid: trap #0 +.short 0x2F + rts + +_getegid: trap #0 +.short 0x2F + move.l d1,d0 + rts diff --git a/mach/pmds4/libsys/getpid.s b/mach/pmds4/libsys/getpid.s new file mode 100644 index 000000000..75894271d --- /dev/null +++ b/mach/pmds4/libsys/getpid.s @@ -0,0 +1,5 @@ +.define _getpid +.extern _getpid +_getpid: trap #0 +.short 0x14 + rts diff --git a/mach/pmds4/libsys/getuid.s b/mach/pmds4/libsys/getuid.s new file mode 100644 index 000000000..53f6b0be9 --- /dev/null +++ b/mach/pmds4/libsys/getuid.s @@ -0,0 +1,12 @@ +.define _getuid +.define _geteuid +.extern _getuid +.extern _geteuid +_getuid: trap #0 +.short 0x18 + rts + +_geteuid: trap #0 +.short 0x18 + move.l d1,d0 + rts diff --git a/mach/pmds4/libsys/ioctl.s b/mach/pmds4/libsys/ioctl.s new file mode 100644 index 000000000..4d4a772c8 --- /dev/null +++ b/mach/pmds4/libsys/ioctl.s @@ -0,0 +1,9 @@ +.define _ioctl +.extern _ioctl +_ioctl: trap #0 +.short 0x36 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/kill.s b/mach/pmds4/libsys/kill.s new file mode 100644 index 000000000..191f044f1 --- /dev/null +++ b/mach/pmds4/libsys/kill.s @@ -0,0 +1,9 @@ +.define _kill +.extern _kill +_kill: trap #0 +.short 0x25 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/link.s b/mach/pmds4/libsys/link.s new file mode 100644 index 000000000..e1531b952 --- /dev/null +++ b/mach/pmds4/libsys/link.s @@ -0,0 +1,9 @@ +.define _link +.extern _link +_link: trap #0 +.short 0x9 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/lseek.s b/mach/pmds4/libsys/lseek.s new file mode 100644 index 000000000..b3e26e737 --- /dev/null +++ b/mach/pmds4/libsys/lseek.s @@ -0,0 +1,8 @@ +.define _lseek +.extern _lseek +_lseek: trap #0 +.short 0x13 + bcc 1f + jmp cerror +1: + rts diff --git a/mach/pmds4/libsys/mknod.s b/mach/pmds4/libsys/mknod.s new file mode 100644 index 000000000..bc3cd6773 --- /dev/null +++ b/mach/pmds4/libsys/mknod.s @@ -0,0 +1,10 @@ +.define _mknod +.extern _mknod +.text +_mknod: trap #0 +.short 0xE + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/mount.s b/mach/pmds4/libsys/mount.s new file mode 100644 index 000000000..6cb2c42cf --- /dev/null +++ b/mach/pmds4/libsys/mount.s @@ -0,0 +1,10 @@ +.define _mount +.extern _mount +.text +_mount: trap #0 +.short 0x15 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/nice.s b/mach/pmds4/libsys/nice.s new file mode 100644 index 000000000..2737392d0 --- /dev/null +++ b/mach/pmds4/libsys/nice.s @@ -0,0 +1,10 @@ +.define _nice +.extern _nice +.text +_nice: trap #0 +.short 0x22 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/open.s b/mach/pmds4/libsys/open.s new file mode 100644 index 000000000..ef2b038f5 --- /dev/null +++ b/mach/pmds4/libsys/open.s @@ -0,0 +1,8 @@ +.define _open +.extern _open +_open: trap #0 +.short 0x5 + bcc 1f + jmp cerror +1: + rts diff --git a/mach/pmds4/libsys/pipe.s b/mach/pmds4/libsys/pipe.s new file mode 100644 index 000000000..6f011c01f --- /dev/null +++ b/mach/pmds4/libsys/pipe.s @@ -0,0 +1,12 @@ +.define _pipe +.extern _pipe +_pipe: trap #0 +.short 0x2A + bcc 1f + jmp cerror +1: + move.l 4(sp),a0 + move.l d0,(a0)+ + move.l d1,(a0) + clr.l d0 + rts diff --git a/mach/pmds4/libsys/profil.s b/mach/pmds4/libsys/profil.s new file mode 100644 index 000000000..0651fdbaa --- /dev/null +++ b/mach/pmds4/libsys/profil.s @@ -0,0 +1,6 @@ +.define _profil +.extern _profil +.text +_profil: trap #0 +.short 0x2C + rts diff --git a/mach/pmds4/libsys/read.s b/mach/pmds4/libsys/read.s new file mode 100644 index 000000000..6609752c9 --- /dev/null +++ b/mach/pmds4/libsys/read.s @@ -0,0 +1,8 @@ +.define _read +.extern _read +_read: trap #0 +.short 0x3 + bcc 1f + jmp cerror +1: + rts diff --git a/mach/pmds4/libsys/sbrk.s b/mach/pmds4/libsys/sbrk.s new file mode 100644 index 000000000..aae02474b --- /dev/null +++ b/mach/pmds4/libsys/sbrk.s @@ -0,0 +1,31 @@ +.define _sbrk +.define _brk +.extern _sbrk +.extern _brk +_sbrk: tst.b -8(sp) + move.l 4(sp),d0 + beq 1f + add.l nd,d0 + move.l d0,-(sp) + clr.l -(sp) + trap #0 +.short 0x11 + add.l #8,sp + bcc 1f + jmp cerror +1: + move.l nd,d0 + move.l 4(sp),d1 + add.l d1,nd + rts +_brk: trap #0 +.short 0x11 + bcc 1f + jmp cerror +1: + move.l 4(sp),nd + clr.l d0 + rts +.data +nd: .long endbss +.text diff --git a/mach/pmds4/libsys/signal.s b/mach/pmds4/libsys/signal.s new file mode 100644 index 000000000..22fdd1d4f --- /dev/null +++ b/mach/pmds4/libsys/signal.s @@ -0,0 +1,52 @@ +.define _signal +.extern _signal +NSIG=32 +_signal: + move.w 4(sp), d0 + ext.l d0 + cmp.l #NSIG,d0 + bcc 1f + move.l 6(sp),d1 + move.l d0,a0 + add.l a0,a0 + add.l a0,a0 + add.l #dvect,a0 + move.l (a0),a1 + move.l d1,(a0) + beq 2f + btst #0,d1 + bne 2f + move.l #enter,d1 +2: + move.l d1,-(sp) + move.l d0,-(sp) + clr.l -(sp) + trap #0 +.short 48 + add.l #12,sp + bcs 3f + btst #0,d0 + bne 4f + move.l a1,d0 +4: + rts +1: + move.l #22,d0 +3: + jmp cerror + +enter: + movem.l d0/d1/a0/a1,-(sp) + move.l 16(sp),a0 + move.l a0,-(sp) + add.l a0,a0 + add.l a0,a0 + add.l #dvect,a0 + move.l (a0),a0 + jsr (a0) + add.l #4,sp + movem.l (sp)+,d0/d1/a0/a1 + add.l #4,sp + rtr +.bss +dvect: .space 4*NSIG diff --git a/mach/pmds4/libsys/stat.s b/mach/pmds4/libsys/stat.s new file mode 100644 index 000000000..45dfa7555 --- /dev/null +++ b/mach/pmds4/libsys/stat.s @@ -0,0 +1,9 @@ +.define _stat +.extern _stat +_stat: trap #0 +.short 0x12 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/time.s b/mach/pmds4/libsys/time.s new file mode 100644 index 000000000..dce236575 --- /dev/null +++ b/mach/pmds4/libsys/time.s @@ -0,0 +1,21 @@ +.define _time +.define _ftime +.extern _time +_time: + trap #0 +.short 0xD + tst.l 4(sp) + beq 1f + move.l 4(sp),a0 + move.l d0,(a0) +1: + rts +.extern _ftime +_ftime: + trap #0 +.short 0x23 + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/unlink.s b/mach/pmds4/libsys/unlink.s new file mode 100644 index 000000000..2093ce74d --- /dev/null +++ b/mach/pmds4/libsys/unlink.s @@ -0,0 +1,9 @@ +.define _unlink +.extern _unlink +_unlink: trap #0 +.short 0xA + bcc 1f + jmp cerror +1: + clr.l d0 + rts diff --git a/mach/pmds4/libsys/wait.s b/mach/pmds4/libsys/wait.s new file mode 100644 index 000000000..7a8a6ebb9 --- /dev/null +++ b/mach/pmds4/libsys/wait.s @@ -0,0 +1,13 @@ +.define _wait +.extern _wait +_wait: trap #0 +.short 0x7 + bcc 1f + jmp cerror +1: + tst.l 4(sp) + beq 2f + move.l 4(sp),a0 + move.l d1,(a0) +2: + rts diff --git a/mach/pmds4/libsys/write.s b/mach/pmds4/libsys/write.s new file mode 100644 index 000000000..cb87ca0f0 --- /dev/null +++ b/mach/pmds4/libsys/write.s @@ -0,0 +1,8 @@ +.define _write +.extern _write +_write: trap #0 +.short 0x4 + bcc 1f + jmp cerror +1: + rts -- 2.34.1