From 6babe9fccd41702e0c7e0bc6fe6b056561b5d58f Mon Sep 17 00:00:00 2001 From: bal Date: Fri, 14 Dec 1984 15:52:15 +0000 Subject: [PATCH] Initial revision --- mach/m68k2/libsys/LIST | 45 ++++++++++++++++++++++++++++++++++ mach/m68k2/libsys/_exit.s | 6 +++++ mach/m68k2/libsys/access.s | 8 ++++++ mach/m68k2/libsys/alarm.s | 9 +++++++ mach/m68k2/libsys/brk.s | 25 +++++++++++++++++++ mach/m68k2/libsys/call.s | 28 +++++++++++++++++++++ mach/m68k2/libsys/chdir.s | 6 +++++ mach/m68k2/libsys/chmod.s | 8 ++++++ mach/m68k2/libsys/chroot.s | 6 +++++ mach/m68k2/libsys/cleanup.s | 8 ++++++ mach/m68k2/libsys/close.s | 6 +++++ mach/m68k2/libsys/creat.s | 8 ++++++ mach/m68k2/libsys/execl.s | 11 +++++++++ mach/m68k2/libsys/execve.s | 8 ++++++ mach/m68k2/libsys/exit.s | 12 +++++++++ mach/m68k2/libsys/fork.s | 13 ++++++++++ mach/m68k2/libsys/fstat.s | 6 +++++ mach/m68k2/libsys/getegid.s | 7 ++++++ mach/m68k2/libsys/getgid.s | 6 +++++ mach/m68k2/libsys/getpid.s | 6 +++++ mach/m68k2/libsys/getuid.s | 6 +++++ mach/m68k2/libsys/gtty.s | 13 ++++++++++ mach/m68k2/libsys/ioctl.s | 9 +++++++ mach/m68k2/libsys/kill.s | 8 ++++++ mach/m68k2/libsys/link.s | 8 ++++++ mach/m68k2/libsys/lseek.s | 8 ++++++ mach/m68k2/libsys/mknod.s | 9 +++++++ mach/m68k2/libsys/mount.s | 9 +++++++ mach/m68k2/libsys/nice.s | 6 +++++ mach/m68k2/libsys/open.s | 8 ++++++ mach/m68k2/libsys/pause.s | 6 +++++ mach/m68k2/libsys/read.s | 8 ++++++ mach/m68k2/libsys/setgid.s | 6 +++++ mach/m68k2/libsys/setuid.s | 6 +++++ mach/m68k2/libsys/signal.s | 49 +++++++++++++++++++++++++++++++++++++ mach/m68k2/libsys/stat.s | 8 ++++++ mach/m68k2/libsys/stime.s | 11 +++++++++ mach/m68k2/libsys/stty.s | 13 ++++++++++ mach/m68k2/libsys/sync.s | 6 +++++ mach/m68k2/libsys/time.s | 11 +++++++++ mach/m68k2/libsys/times.s | 7 ++++++ mach/m68k2/libsys/umount.s | 6 +++++ mach/m68k2/libsys/unlink.s | 6 +++++ mach/m68k2/libsys/wait.s | 12 +++++++++ mach/m68k2/libsys/write.s | 8 ++++++ mach/m68k4/libsys/LIST | 45 ++++++++++++++++++++++++++++++++++ mach/m68k4/libsys/_exit.s | 6 +++++ mach/m68k4/libsys/access.s | 8 ++++++ mach/m68k4/libsys/alarm.s | 9 +++++++ mach/m68k4/libsys/brk.s | 25 +++++++++++++++++++ mach/m68k4/libsys/call.s | 28 +++++++++++++++++++++ mach/m68k4/libsys/chdir.s | 6 +++++ mach/m68k4/libsys/chmod.s | 8 ++++++ mach/m68k4/libsys/chroot.s | 6 +++++ mach/m68k4/libsys/cleanup.s | 8 ++++++ mach/m68k4/libsys/close.s | 6 +++++ mach/m68k4/libsys/creat.s | 8 ++++++ mach/m68k4/libsys/execl.s | 11 +++++++++ mach/m68k4/libsys/execve.s | 8 ++++++ mach/m68k4/libsys/exit.s | 12 +++++++++ mach/m68k4/libsys/fork.s | 13 ++++++++++ mach/m68k4/libsys/fstat.s | 6 +++++ mach/m68k4/libsys/getegid.s | 7 ++++++ mach/m68k4/libsys/getgid.s | 6 +++++ mach/m68k4/libsys/getpid.s | 6 +++++ mach/m68k4/libsys/getuid.s | 6 +++++ mach/m68k4/libsys/gtty.s | 13 ++++++++++ mach/m68k4/libsys/ioctl.s | 9 +++++++ mach/m68k4/libsys/kill.s | 8 ++++++ mach/m68k4/libsys/link.s | 8 ++++++ mach/m68k4/libsys/lseek.s | 8 ++++++ mach/m68k4/libsys/mknod.s | 9 +++++++ mach/m68k4/libsys/mount.s | 9 +++++++ mach/m68k4/libsys/nice.s | 6 +++++ mach/m68k4/libsys/open.s | 8 ++++++ mach/m68k4/libsys/pause.s | 6 +++++ mach/m68k4/libsys/read.s | 8 ++++++ mach/m68k4/libsys/setgid.s | 6 +++++ mach/m68k4/libsys/setuid.s | 6 +++++ mach/m68k4/libsys/signal.s | 49 +++++++++++++++++++++++++++++++++++++ mach/m68k4/libsys/stat.s | 8 ++++++ mach/m68k4/libsys/stime.s | 11 +++++++++ mach/m68k4/libsys/stty.s | 13 ++++++++++ mach/m68k4/libsys/sync.s | 6 +++++ mach/m68k4/libsys/time.s | 11 +++++++++ mach/m68k4/libsys/times.s | 7 ++++++ mach/m68k4/libsys/umount.s | 6 +++++ mach/m68k4/libsys/unlink.s | 6 +++++ mach/m68k4/libsys/wait.s | 12 +++++++++ mach/m68k4/libsys/write.s | 8 ++++++ 90 files changed, 958 insertions(+) create mode 100644 mach/m68k2/libsys/LIST create mode 100644 mach/m68k2/libsys/_exit.s create mode 100644 mach/m68k2/libsys/access.s create mode 100644 mach/m68k2/libsys/alarm.s create mode 100644 mach/m68k2/libsys/brk.s create mode 100644 mach/m68k2/libsys/call.s create mode 100644 mach/m68k2/libsys/chdir.s create mode 100644 mach/m68k2/libsys/chmod.s create mode 100644 mach/m68k2/libsys/chroot.s create mode 100644 mach/m68k2/libsys/cleanup.s create mode 100644 mach/m68k2/libsys/close.s create mode 100644 mach/m68k2/libsys/creat.s create mode 100644 mach/m68k2/libsys/execl.s create mode 100644 mach/m68k2/libsys/execve.s create mode 100644 mach/m68k2/libsys/exit.s create mode 100644 mach/m68k2/libsys/fork.s create mode 100644 mach/m68k2/libsys/fstat.s create mode 100644 mach/m68k2/libsys/getegid.s create mode 100644 mach/m68k2/libsys/getgid.s create mode 100644 mach/m68k2/libsys/getpid.s create mode 100644 mach/m68k2/libsys/getuid.s create mode 100644 mach/m68k2/libsys/gtty.s create mode 100644 mach/m68k2/libsys/ioctl.s create mode 100644 mach/m68k2/libsys/kill.s create mode 100644 mach/m68k2/libsys/link.s create mode 100644 mach/m68k2/libsys/lseek.s create mode 100644 mach/m68k2/libsys/mknod.s create mode 100644 mach/m68k2/libsys/mount.s create mode 100644 mach/m68k2/libsys/nice.s create mode 100644 mach/m68k2/libsys/open.s create mode 100644 mach/m68k2/libsys/pause.s create mode 100644 mach/m68k2/libsys/read.s create mode 100644 mach/m68k2/libsys/setgid.s create mode 100644 mach/m68k2/libsys/setuid.s create mode 100644 mach/m68k2/libsys/signal.s create mode 100644 mach/m68k2/libsys/stat.s create mode 100644 mach/m68k2/libsys/stime.s create mode 100644 mach/m68k2/libsys/stty.s create mode 100644 mach/m68k2/libsys/sync.s create mode 100644 mach/m68k2/libsys/time.s create mode 100644 mach/m68k2/libsys/times.s create mode 100644 mach/m68k2/libsys/umount.s create mode 100644 mach/m68k2/libsys/unlink.s create mode 100644 mach/m68k2/libsys/wait.s create mode 100644 mach/m68k2/libsys/write.s create mode 100644 mach/m68k4/libsys/LIST create mode 100644 mach/m68k4/libsys/_exit.s create mode 100644 mach/m68k4/libsys/access.s create mode 100644 mach/m68k4/libsys/alarm.s create mode 100644 mach/m68k4/libsys/brk.s create mode 100644 mach/m68k4/libsys/call.s create mode 100644 mach/m68k4/libsys/chdir.s create mode 100644 mach/m68k4/libsys/chmod.s create mode 100644 mach/m68k4/libsys/chroot.s create mode 100644 mach/m68k4/libsys/cleanup.s create mode 100644 mach/m68k4/libsys/close.s create mode 100644 mach/m68k4/libsys/creat.s create mode 100644 mach/m68k4/libsys/execl.s create mode 100644 mach/m68k4/libsys/execve.s create mode 100644 mach/m68k4/libsys/exit.s create mode 100644 mach/m68k4/libsys/fork.s create mode 100644 mach/m68k4/libsys/fstat.s create mode 100644 mach/m68k4/libsys/getegid.s create mode 100644 mach/m68k4/libsys/getgid.s create mode 100644 mach/m68k4/libsys/getpid.s create mode 100644 mach/m68k4/libsys/getuid.s create mode 100644 mach/m68k4/libsys/gtty.s create mode 100644 mach/m68k4/libsys/ioctl.s create mode 100644 mach/m68k4/libsys/kill.s create mode 100644 mach/m68k4/libsys/link.s create mode 100644 mach/m68k4/libsys/lseek.s create mode 100644 mach/m68k4/libsys/mknod.s create mode 100644 mach/m68k4/libsys/mount.s create mode 100644 mach/m68k4/libsys/nice.s create mode 100644 mach/m68k4/libsys/open.s create mode 100644 mach/m68k4/libsys/pause.s create mode 100644 mach/m68k4/libsys/read.s create mode 100644 mach/m68k4/libsys/setgid.s create mode 100644 mach/m68k4/libsys/setuid.s create mode 100644 mach/m68k4/libsys/signal.s create mode 100644 mach/m68k4/libsys/stat.s create mode 100644 mach/m68k4/libsys/stime.s create mode 100644 mach/m68k4/libsys/stty.s create mode 100644 mach/m68k4/libsys/sync.s create mode 100644 mach/m68k4/libsys/time.s create mode 100644 mach/m68k4/libsys/times.s create mode 100644 mach/m68k4/libsys/umount.s create mode 100644 mach/m68k4/libsys/unlink.s create mode 100644 mach/m68k4/libsys/wait.s create mode 100644 mach/m68k4/libsys/write.s diff --git a/mach/m68k2/libsys/LIST b/mach/m68k2/libsys/LIST new file mode 100644 index 000000000..4fccdc161 --- /dev/null +++ b/mach/m68k2/libsys/LIST @@ -0,0 +1,45 @@ +tail_mon.a +exit.s +_exit.s +access.s +alarm.s +chdir.s +chmod.s +chroot.s +close.s +creat.s +execl.s +execve.s +fork.s +getegid.s +getgid.s +getpid.s +getuid.s +stty.s +gtty.s +ioctl.s +kill.s +link.s +lseek.s +mknod.s +mount.s +nice.s +open.s +pause.s +read.s +setgid.s +setuid.s +stat.s +stime.s +sync.s +time.s +times.s +umount.s +unlink.s +write.s +brk.s +wait.s +fstat.s +signal.s +call.s +cleanup.s diff --git a/mach/m68k2/libsys/_exit.s b/mach/m68k2/libsys/_exit.s new file mode 100644 index 000000000..398c93904 --- /dev/null +++ b/mach/m68k2/libsys/_exit.s @@ -0,0 +1,6 @@ +.define __exit +.extern __exit +.text +__exit: move.w #0x1,d0 + move.w 4(sp),a0 + trap #0 diff --git a/mach/m68k2/libsys/access.s b/mach/m68k2/libsys/access.s new file mode 100644 index 000000000..fdceffbf7 --- /dev/null +++ b/mach/m68k2/libsys/access.s @@ -0,0 +1,8 @@ +.define _access +.extern _access +.text +_access: move.w #0x21,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k2/libsys/alarm.s b/mach/m68k2/libsys/alarm.s new file mode 100644 index 000000000..98781a707 --- /dev/null +++ b/mach/m68k2/libsys/alarm.s @@ -0,0 +1,9 @@ +.define _alarm +.extern _alarm +.text +_alarm: clr.l d0 + move.w 4(sp),d0 + move.l d0,a0 + move.w #0x1B,d0 + trap #0 + rts diff --git a/mach/m68k2/libsys/brk.s b/mach/m68k2/libsys/brk.s new file mode 100644 index 000000000..f337c0533 --- /dev/null +++ b/mach/m68k2/libsys/brk.s @@ -0,0 +1,25 @@ +.define _brk +.define _sbrk +.extern _brk +.extern _sbrk +.text +_sbrk: move.l nd,d0 + add.l d0, 4(sp) + move.w #0x11,d0 + move.l 4(sp),a0 + trap #0 + bcs lcerror + move.l nd,d0 + move.l 4(sp),nd + rts +lcerror: jmp cerror +_brk: move.w #0x11,d0 + move.l 4(sp),a0 + trap #0 + bcs lcerror + move.l 4(sp),nd + clr.l d0 + rts +.data +nd: .long endbss +.text diff --git a/mach/m68k2/libsys/call.s b/mach/m68k2/libsys/call.s new file mode 100644 index 000000000..846fb7797 --- /dev/null +++ b/mach/m68k2/libsys/call.s @@ -0,0 +1,28 @@ +.define call +.define callc +.define calle +.define cerror +.define _errno +.extern call +.extern callc +.extern calle +.extern cerror +.extern _errno +.text +call: trap #0 + bcs cerror + rts +callc: + trap #0 + bcs cerror + clr.l d0 + rts +calle: + trap #0 +cerror: + move.w d0,_errno + move.l #-1,d0 + rts +.bss +_errno: .space 4 +.text diff --git a/mach/m68k2/libsys/chdir.s b/mach/m68k2/libsys/chdir.s new file mode 100644 index 000000000..d03224aea --- /dev/null +++ b/mach/m68k2/libsys/chdir.s @@ -0,0 +1,6 @@ +.define _chdir +.extern _chdir +.text +_chdir: move.w #0xC,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/chmod.s b/mach/m68k2/libsys/chmod.s new file mode 100644 index 000000000..6c86e3a25 --- /dev/null +++ b/mach/m68k2/libsys/chmod.s @@ -0,0 +1,8 @@ +.define _chmod +.extern _chmod +.text +_chmod: move.w #0xF,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k2/libsys/chroot.s b/mach/m68k2/libsys/chroot.s new file mode 100644 index 000000000..ebf9f6a42 --- /dev/null +++ b/mach/m68k2/libsys/chroot.s @@ -0,0 +1,6 @@ +.define _chroot +.extern _chroot +.text +_chroot: move.w #0x3D,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/cleanup.s b/mach/m68k2/libsys/cleanup.s new file mode 100644 index 000000000..7df1860b5 --- /dev/null +++ b/mach/m68k2/libsys/cleanup.s @@ -0,0 +1,8 @@ +.define __cleanup +.extern __cleanup +.text +__cleanup: +tst.b -40(sp) +link a6,#-0 +unlk a6 +rts diff --git a/mach/m68k2/libsys/close.s b/mach/m68k2/libsys/close.s new file mode 100644 index 000000000..add7e7012 --- /dev/null +++ b/mach/m68k2/libsys/close.s @@ -0,0 +1,6 @@ +.define _close +.extern _close +.text +_close: move.w #0x6,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/creat.s b/mach/m68k2/libsys/creat.s new file mode 100644 index 000000000..73e7db84a --- /dev/null +++ b/mach/m68k2/libsys/creat.s @@ -0,0 +1,8 @@ +.define _creat +.extern _creat +.text +_creat: move.w #0x8,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp call diff --git a/mach/m68k2/libsys/execl.s b/mach/m68k2/libsys/execl.s new file mode 100644 index 000000000..21e03dc9d --- /dev/null +++ b/mach/m68k2/libsys/execl.s @@ -0,0 +1,11 @@ +.define _execl +.extern _execl +_execl: link a6,#0 + tst.b -132(sp) + move.l _environ,-(sp) + pea 12(sp) + move.l 8(a6),-(sp) + jsr _execve + add.l #0xC,sp + unlk a6 + rts diff --git a/mach/m68k2/libsys/execve.s b/mach/m68k2/libsys/execve.s new file mode 100644 index 000000000..2b2de5f84 --- /dev/null +++ b/mach/m68k2/libsys/execve.s @@ -0,0 +1,8 @@ +.define _execve +.extern _execve +.text +_execve: move.w #0x3B,d0 + move.l 4(sp),a0 + move.l 8(sp),d1 + move.l 12(sp),a1 + jmp calle diff --git a/mach/m68k2/libsys/exit.s b/mach/m68k2/libsys/exit.s new file mode 100644 index 000000000..d766750e7 --- /dev/null +++ b/mach/m68k2/libsys/exit.s @@ -0,0 +1,12 @@ +.define _exit +.extern _exit +.text +_exit: +tst.b -40(sp) +link a6,#-0 +jsr __cleanup +move.w 8(a6),-(sp) +jsr __exit +add.l #2,sp +unlk a6 +rts diff --git a/mach/m68k2/libsys/fork.s b/mach/m68k2/libsys/fork.s new file mode 100644 index 000000000..0401e6312 --- /dev/null +++ b/mach/m68k2/libsys/fork.s @@ -0,0 +1,13 @@ +.define _fork +.extern _fork +.text +_fork: move.w #0x2,d0 + trap #0 + bra 1f + bcc 2f + jmp cerror +1: + !move.l d0,p_uid + clr.l d0 +2: + rts diff --git a/mach/m68k2/libsys/fstat.s b/mach/m68k2/libsys/fstat.s new file mode 100644 index 000000000..1dd3d66c7 --- /dev/null +++ b/mach/m68k2/libsys/fstat.s @@ -0,0 +1,6 @@ +.define _fstat +.extern _fstat +_fstat: move.w #0x1C,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + jmp callc diff --git a/mach/m68k2/libsys/getegid.s b/mach/m68k2/libsys/getegid.s new file mode 100644 index 000000000..b4da40c1d --- /dev/null +++ b/mach/m68k2/libsys/getegid.s @@ -0,0 +1,7 @@ +.define _getegid +.extern _getegid +.text +_getegid: move.w #0x2F,d0 + trap #0 + move.l d1,d0 + rts diff --git a/mach/m68k2/libsys/getgid.s b/mach/m68k2/libsys/getgid.s new file mode 100644 index 000000000..3ef4def31 --- /dev/null +++ b/mach/m68k2/libsys/getgid.s @@ -0,0 +1,6 @@ +.define _getgid +.extern _getgid +.text +_getgid: move.w #0x2F,d0 + trap #0 + rts diff --git a/mach/m68k2/libsys/getpid.s b/mach/m68k2/libsys/getpid.s new file mode 100644 index 000000000..1bf2aba7e --- /dev/null +++ b/mach/m68k2/libsys/getpid.s @@ -0,0 +1,6 @@ +.define _getpid +.extern _getpid +.text +_getpid: move.w #0x14,d0 + trap #0 + rts diff --git a/mach/m68k2/libsys/getuid.s b/mach/m68k2/libsys/getuid.s new file mode 100644 index 000000000..d0e15a1b0 --- /dev/null +++ b/mach/m68k2/libsys/getuid.s @@ -0,0 +1,6 @@ +.define _getuid +.extern _getuid +.text +_getuid: move.w #0x18,d0 + trap #0 + rts diff --git a/mach/m68k2/libsys/gtty.s b/mach/m68k2/libsys/gtty.s new file mode 100644 index 000000000..ee9f096c8 --- /dev/null +++ b/mach/m68k2/libsys/gtty.s @@ -0,0 +1,13 @@ +.define _gtty +.extern _gtty +.text +_gtty: +tst.b -40(sp) +link a6,#-0 +move.l 10(a6),-(sp) +move.w #29704,-(sp) +move.w 8(a6),-(sp) +jsr _ioctl +add.l #8,sp +unlk a6 +rts diff --git a/mach/m68k2/libsys/ioctl.s b/mach/m68k2/libsys/ioctl.s new file mode 100644 index 000000000..75d16214c --- /dev/null +++ b/mach/m68k2/libsys/ioctl.s @@ -0,0 +1,9 @@ +.define _ioctl +.extern _ioctl +.text +_ioctl: move.w #0x36,d0 + move.w 4(sp),a0 + move.w 6(sp),d1 + ext.l d1 + move.l 8(sp),a1 + jmp callc diff --git a/mach/m68k2/libsys/kill.s b/mach/m68k2/libsys/kill.s new file mode 100644 index 000000000..c5c4038cc --- /dev/null +++ b/mach/m68k2/libsys/kill.s @@ -0,0 +1,8 @@ +.define _kill +.extern _kill +.text +_kill: move.w #0x25,d0 + move.w 4(sp),a0 + move.w 6(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k2/libsys/link.s b/mach/m68k2/libsys/link.s new file mode 100644 index 000000000..161ca6d1d --- /dev/null +++ b/mach/m68k2/libsys/link.s @@ -0,0 +1,8 @@ +.define _link +.extern _link +.text +_link: move.w #0x9,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k2/libsys/lseek.s b/mach/m68k2/libsys/lseek.s new file mode 100644 index 000000000..96f670e7f --- /dev/null +++ b/mach/m68k2/libsys/lseek.s @@ -0,0 +1,8 @@ +.define _lseek +.extern _lseek +.text +_lseek: move.w #0x13,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + move.w 10(sp),a1 + jmp call diff --git a/mach/m68k2/libsys/mknod.s b/mach/m68k2/libsys/mknod.s new file mode 100644 index 000000000..21d86ad0e --- /dev/null +++ b/mach/m68k2/libsys/mknod.s @@ -0,0 +1,9 @@ +.define _mknod +.extern _mknod +.text +_mknod: move.w #0xE,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + move.w 10(sp),a1 + jmp callc diff --git a/mach/m68k2/libsys/mount.s b/mach/m68k2/libsys/mount.s new file mode 100644 index 000000000..b7d37737a --- /dev/null +++ b/mach/m68k2/libsys/mount.s @@ -0,0 +1,9 @@ + +.define _mount +.extern _mount +.text +_mount: move.w #0x15,d0 + move.l 4(sp),a0 + move.l 8(sp),d1 + move.l 12(sp),a1 + jmp callc diff --git a/mach/m68k2/libsys/nice.s b/mach/m68k2/libsys/nice.s new file mode 100644 index 000000000..4929617bc --- /dev/null +++ b/mach/m68k2/libsys/nice.s @@ -0,0 +1,6 @@ +.define _nice +.extern _nice +.text +_nice: move.w #0x22,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/open.s b/mach/m68k2/libsys/open.s new file mode 100644 index 000000000..04b3b5054 --- /dev/null +++ b/mach/m68k2/libsys/open.s @@ -0,0 +1,8 @@ +.define _open +.extern _open +.text +_open: move.w #0x5,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp call diff --git a/mach/m68k2/libsys/pause.s b/mach/m68k2/libsys/pause.s new file mode 100644 index 000000000..53b99d732 --- /dev/null +++ b/mach/m68k2/libsys/pause.s @@ -0,0 +1,6 @@ +.define _pause +.extern _pause +.text +_pause: move.w #0x1D,d0 + trap #0 + rts diff --git a/mach/m68k2/libsys/read.s b/mach/m68k2/libsys/read.s new file mode 100644 index 000000000..a5e0449a7 --- /dev/null +++ b/mach/m68k2/libsys/read.s @@ -0,0 +1,8 @@ +.define _read +.extern _read +.text +_read: move.w #0x3,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + move.w 10(sp),a1 + jmp call diff --git a/mach/m68k2/libsys/setgid.s b/mach/m68k2/libsys/setgid.s new file mode 100644 index 000000000..5ad03004d --- /dev/null +++ b/mach/m68k2/libsys/setgid.s @@ -0,0 +1,6 @@ +.define _setgid +.extern _setgid +.text +_setgid: move.w #0x2E,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/setuid.s b/mach/m68k2/libsys/setuid.s new file mode 100644 index 000000000..94cc45ef6 --- /dev/null +++ b/mach/m68k2/libsys/setuid.s @@ -0,0 +1,6 @@ +.define _setuid +.extern _setuid +.text +_setuid: move.w #0x17,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/signal.s b/mach/m68k2/libsys/signal.s new file mode 100644 index 000000000..8f18c1f81 --- /dev/null +++ b/mach/m68k2/libsys/signal.s @@ -0,0 +1,49 @@ +.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 d0,a0 + move.w #0x30,d0 + trap #0 + 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/m68k2/libsys/stat.s b/mach/m68k2/libsys/stat.s new file mode 100644 index 000000000..304c38b1b --- /dev/null +++ b/mach/m68k2/libsys/stat.s @@ -0,0 +1,8 @@ +.define _stat +.extern _stat +.text +_stat: move.w #0x12,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k2/libsys/stime.s b/mach/m68k2/libsys/stime.s new file mode 100644 index 000000000..bac6386de --- /dev/null +++ b/mach/m68k2/libsys/stime.s @@ -0,0 +1,11 @@ +.define _stime +.extern _stime +.text +_stime: move.w #0x19,d0 + move.l 4(sp),a0 + move.l (a0),a0 + trap #0 + bcs 1f + rts +1: + jmp cerror diff --git a/mach/m68k2/libsys/stty.s b/mach/m68k2/libsys/stty.s new file mode 100644 index 000000000..46a497cd8 --- /dev/null +++ b/mach/m68k2/libsys/stty.s @@ -0,0 +1,13 @@ +.define _stty +.extern _stty +.text +_stty: +tst.b -40(sp) +link a6,#-0 +move.l 10(a6),-(sp) +move.w #29705,-(sp) +move.w 8(a6),-(sp) +jsr _ioctl +add.l #8,sp +unlk a6 +rts diff --git a/mach/m68k2/libsys/sync.s b/mach/m68k2/libsys/sync.s new file mode 100644 index 000000000..3c38a8ada --- /dev/null +++ b/mach/m68k2/libsys/sync.s @@ -0,0 +1,6 @@ +.define _sync +.extern _sync +.text +_sync: move.w #0x24,d0 + trap #0 + rts diff --git a/mach/m68k2/libsys/time.s b/mach/m68k2/libsys/time.s new file mode 100644 index 000000000..87b9d8bd3 --- /dev/null +++ b/mach/m68k2/libsys/time.s @@ -0,0 +1,11 @@ +.define _time +.extern _time +.text +_time: move.w #0xD,d0 + trap #0 + tst.l 4(sp) + beq 1f + move.l 4(sp),a0 + move.l d0,(a0) +1: + rts diff --git a/mach/m68k2/libsys/times.s b/mach/m68k2/libsys/times.s new file mode 100644 index 000000000..002f63be5 --- /dev/null +++ b/mach/m68k2/libsys/times.s @@ -0,0 +1,7 @@ +.define _times +.extern _times +.text +_times: move.w #0x2B,d0 + move.w 4(sp),a0 + trap #0 + rts diff --git a/mach/m68k2/libsys/umount.s b/mach/m68k2/libsys/umount.s new file mode 100644 index 000000000..59354ee90 --- /dev/null +++ b/mach/m68k2/libsys/umount.s @@ -0,0 +1,6 @@ +.define _umount +.extern _umount +.text +_umount: move.w #0x16,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/unlink.s b/mach/m68k2/libsys/unlink.s new file mode 100644 index 000000000..99e856a5a --- /dev/null +++ b/mach/m68k2/libsys/unlink.s @@ -0,0 +1,6 @@ +.define _unlink +.extern _unlink +.text +_unlink: move.w #0xA,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k2/libsys/wait.s b/mach/m68k2/libsys/wait.s new file mode 100644 index 000000000..a0ea1a5e9 --- /dev/null +++ b/mach/m68k2/libsys/wait.s @@ -0,0 +1,12 @@ +.define _wait +.extern _wait +_wait: move.w #0x7,d0 + move.l 4(sp),a0 + trap #0 + bcs cerror + tst.l 4(sp) + beq 1f + move.l 4(sp),a0 + move.w d1,(a0) +1: + rts diff --git a/mach/m68k2/libsys/write.s b/mach/m68k2/libsys/write.s new file mode 100644 index 000000000..192d7adbe --- /dev/null +++ b/mach/m68k2/libsys/write.s @@ -0,0 +1,8 @@ +.define _write +.extern _write +.text +_write: move.w #0x4,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + move.w 10(sp),a1 + jmp call diff --git a/mach/m68k4/libsys/LIST b/mach/m68k4/libsys/LIST new file mode 100644 index 000000000..4fccdc161 --- /dev/null +++ b/mach/m68k4/libsys/LIST @@ -0,0 +1,45 @@ +tail_mon.a +exit.s +_exit.s +access.s +alarm.s +chdir.s +chmod.s +chroot.s +close.s +creat.s +execl.s +execve.s +fork.s +getegid.s +getgid.s +getpid.s +getuid.s +stty.s +gtty.s +ioctl.s +kill.s +link.s +lseek.s +mknod.s +mount.s +nice.s +open.s +pause.s +read.s +setgid.s +setuid.s +stat.s +stime.s +sync.s +time.s +times.s +umount.s +unlink.s +write.s +brk.s +wait.s +fstat.s +signal.s +call.s +cleanup.s diff --git a/mach/m68k4/libsys/_exit.s b/mach/m68k4/libsys/_exit.s new file mode 100644 index 000000000..398c93904 --- /dev/null +++ b/mach/m68k4/libsys/_exit.s @@ -0,0 +1,6 @@ +.define __exit +.extern __exit +.text +__exit: move.w #0x1,d0 + move.w 4(sp),a0 + trap #0 diff --git a/mach/m68k4/libsys/access.s b/mach/m68k4/libsys/access.s new file mode 100644 index 000000000..fdceffbf7 --- /dev/null +++ b/mach/m68k4/libsys/access.s @@ -0,0 +1,8 @@ +.define _access +.extern _access +.text +_access: move.w #0x21,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k4/libsys/alarm.s b/mach/m68k4/libsys/alarm.s new file mode 100644 index 000000000..98781a707 --- /dev/null +++ b/mach/m68k4/libsys/alarm.s @@ -0,0 +1,9 @@ +.define _alarm +.extern _alarm +.text +_alarm: clr.l d0 + move.w 4(sp),d0 + move.l d0,a0 + move.w #0x1B,d0 + trap #0 + rts diff --git a/mach/m68k4/libsys/brk.s b/mach/m68k4/libsys/brk.s new file mode 100644 index 000000000..f337c0533 --- /dev/null +++ b/mach/m68k4/libsys/brk.s @@ -0,0 +1,25 @@ +.define _brk +.define _sbrk +.extern _brk +.extern _sbrk +.text +_sbrk: move.l nd,d0 + add.l d0, 4(sp) + move.w #0x11,d0 + move.l 4(sp),a0 + trap #0 + bcs lcerror + move.l nd,d0 + move.l 4(sp),nd + rts +lcerror: jmp cerror +_brk: move.w #0x11,d0 + move.l 4(sp),a0 + trap #0 + bcs lcerror + move.l 4(sp),nd + clr.l d0 + rts +.data +nd: .long endbss +.text diff --git a/mach/m68k4/libsys/call.s b/mach/m68k4/libsys/call.s new file mode 100644 index 000000000..846fb7797 --- /dev/null +++ b/mach/m68k4/libsys/call.s @@ -0,0 +1,28 @@ +.define call +.define callc +.define calle +.define cerror +.define _errno +.extern call +.extern callc +.extern calle +.extern cerror +.extern _errno +.text +call: trap #0 + bcs cerror + rts +callc: + trap #0 + bcs cerror + clr.l d0 + rts +calle: + trap #0 +cerror: + move.w d0,_errno + move.l #-1,d0 + rts +.bss +_errno: .space 4 +.text diff --git a/mach/m68k4/libsys/chdir.s b/mach/m68k4/libsys/chdir.s new file mode 100644 index 000000000..d03224aea --- /dev/null +++ b/mach/m68k4/libsys/chdir.s @@ -0,0 +1,6 @@ +.define _chdir +.extern _chdir +.text +_chdir: move.w #0xC,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/chmod.s b/mach/m68k4/libsys/chmod.s new file mode 100644 index 000000000..6c86e3a25 --- /dev/null +++ b/mach/m68k4/libsys/chmod.s @@ -0,0 +1,8 @@ +.define _chmod +.extern _chmod +.text +_chmod: move.w #0xF,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k4/libsys/chroot.s b/mach/m68k4/libsys/chroot.s new file mode 100644 index 000000000..ebf9f6a42 --- /dev/null +++ b/mach/m68k4/libsys/chroot.s @@ -0,0 +1,6 @@ +.define _chroot +.extern _chroot +.text +_chroot: move.w #0x3D,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/cleanup.s b/mach/m68k4/libsys/cleanup.s new file mode 100644 index 000000000..7df1860b5 --- /dev/null +++ b/mach/m68k4/libsys/cleanup.s @@ -0,0 +1,8 @@ +.define __cleanup +.extern __cleanup +.text +__cleanup: +tst.b -40(sp) +link a6,#-0 +unlk a6 +rts diff --git a/mach/m68k4/libsys/close.s b/mach/m68k4/libsys/close.s new file mode 100644 index 000000000..add7e7012 --- /dev/null +++ b/mach/m68k4/libsys/close.s @@ -0,0 +1,6 @@ +.define _close +.extern _close +.text +_close: move.w #0x6,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/creat.s b/mach/m68k4/libsys/creat.s new file mode 100644 index 000000000..73e7db84a --- /dev/null +++ b/mach/m68k4/libsys/creat.s @@ -0,0 +1,8 @@ +.define _creat +.extern _creat +.text +_creat: move.w #0x8,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp call diff --git a/mach/m68k4/libsys/execl.s b/mach/m68k4/libsys/execl.s new file mode 100644 index 000000000..21e03dc9d --- /dev/null +++ b/mach/m68k4/libsys/execl.s @@ -0,0 +1,11 @@ +.define _execl +.extern _execl +_execl: link a6,#0 + tst.b -132(sp) + move.l _environ,-(sp) + pea 12(sp) + move.l 8(a6),-(sp) + jsr _execve + add.l #0xC,sp + unlk a6 + rts diff --git a/mach/m68k4/libsys/execve.s b/mach/m68k4/libsys/execve.s new file mode 100644 index 000000000..2b2de5f84 --- /dev/null +++ b/mach/m68k4/libsys/execve.s @@ -0,0 +1,8 @@ +.define _execve +.extern _execve +.text +_execve: move.w #0x3B,d0 + move.l 4(sp),a0 + move.l 8(sp),d1 + move.l 12(sp),a1 + jmp calle diff --git a/mach/m68k4/libsys/exit.s b/mach/m68k4/libsys/exit.s new file mode 100644 index 000000000..d766750e7 --- /dev/null +++ b/mach/m68k4/libsys/exit.s @@ -0,0 +1,12 @@ +.define _exit +.extern _exit +.text +_exit: +tst.b -40(sp) +link a6,#-0 +jsr __cleanup +move.w 8(a6),-(sp) +jsr __exit +add.l #2,sp +unlk a6 +rts diff --git a/mach/m68k4/libsys/fork.s b/mach/m68k4/libsys/fork.s new file mode 100644 index 000000000..0401e6312 --- /dev/null +++ b/mach/m68k4/libsys/fork.s @@ -0,0 +1,13 @@ +.define _fork +.extern _fork +.text +_fork: move.w #0x2,d0 + trap #0 + bra 1f + bcc 2f + jmp cerror +1: + !move.l d0,p_uid + clr.l d0 +2: + rts diff --git a/mach/m68k4/libsys/fstat.s b/mach/m68k4/libsys/fstat.s new file mode 100644 index 000000000..1dd3d66c7 --- /dev/null +++ b/mach/m68k4/libsys/fstat.s @@ -0,0 +1,6 @@ +.define _fstat +.extern _fstat +_fstat: move.w #0x1C,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + jmp callc diff --git a/mach/m68k4/libsys/getegid.s b/mach/m68k4/libsys/getegid.s new file mode 100644 index 000000000..b4da40c1d --- /dev/null +++ b/mach/m68k4/libsys/getegid.s @@ -0,0 +1,7 @@ +.define _getegid +.extern _getegid +.text +_getegid: move.w #0x2F,d0 + trap #0 + move.l d1,d0 + rts diff --git a/mach/m68k4/libsys/getgid.s b/mach/m68k4/libsys/getgid.s new file mode 100644 index 000000000..3ef4def31 --- /dev/null +++ b/mach/m68k4/libsys/getgid.s @@ -0,0 +1,6 @@ +.define _getgid +.extern _getgid +.text +_getgid: move.w #0x2F,d0 + trap #0 + rts diff --git a/mach/m68k4/libsys/getpid.s b/mach/m68k4/libsys/getpid.s new file mode 100644 index 000000000..1bf2aba7e --- /dev/null +++ b/mach/m68k4/libsys/getpid.s @@ -0,0 +1,6 @@ +.define _getpid +.extern _getpid +.text +_getpid: move.w #0x14,d0 + trap #0 + rts diff --git a/mach/m68k4/libsys/getuid.s b/mach/m68k4/libsys/getuid.s new file mode 100644 index 000000000..d0e15a1b0 --- /dev/null +++ b/mach/m68k4/libsys/getuid.s @@ -0,0 +1,6 @@ +.define _getuid +.extern _getuid +.text +_getuid: move.w #0x18,d0 + trap #0 + rts diff --git a/mach/m68k4/libsys/gtty.s b/mach/m68k4/libsys/gtty.s new file mode 100644 index 000000000..ee9f096c8 --- /dev/null +++ b/mach/m68k4/libsys/gtty.s @@ -0,0 +1,13 @@ +.define _gtty +.extern _gtty +.text +_gtty: +tst.b -40(sp) +link a6,#-0 +move.l 10(a6),-(sp) +move.w #29704,-(sp) +move.w 8(a6),-(sp) +jsr _ioctl +add.l #8,sp +unlk a6 +rts diff --git a/mach/m68k4/libsys/ioctl.s b/mach/m68k4/libsys/ioctl.s new file mode 100644 index 000000000..75d16214c --- /dev/null +++ b/mach/m68k4/libsys/ioctl.s @@ -0,0 +1,9 @@ +.define _ioctl +.extern _ioctl +.text +_ioctl: move.w #0x36,d0 + move.w 4(sp),a0 + move.w 6(sp),d1 + ext.l d1 + move.l 8(sp),a1 + jmp callc diff --git a/mach/m68k4/libsys/kill.s b/mach/m68k4/libsys/kill.s new file mode 100644 index 000000000..c5c4038cc --- /dev/null +++ b/mach/m68k4/libsys/kill.s @@ -0,0 +1,8 @@ +.define _kill +.extern _kill +.text +_kill: move.w #0x25,d0 + move.w 4(sp),a0 + move.w 6(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k4/libsys/link.s b/mach/m68k4/libsys/link.s new file mode 100644 index 000000000..161ca6d1d --- /dev/null +++ b/mach/m68k4/libsys/link.s @@ -0,0 +1,8 @@ +.define _link +.extern _link +.text +_link: move.w #0x9,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k4/libsys/lseek.s b/mach/m68k4/libsys/lseek.s new file mode 100644 index 000000000..96f670e7f --- /dev/null +++ b/mach/m68k4/libsys/lseek.s @@ -0,0 +1,8 @@ +.define _lseek +.extern _lseek +.text +_lseek: move.w #0x13,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + move.w 10(sp),a1 + jmp call diff --git a/mach/m68k4/libsys/mknod.s b/mach/m68k4/libsys/mknod.s new file mode 100644 index 000000000..21d86ad0e --- /dev/null +++ b/mach/m68k4/libsys/mknod.s @@ -0,0 +1,9 @@ +.define _mknod +.extern _mknod +.text +_mknod: move.w #0xE,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + move.w 10(sp),a1 + jmp callc diff --git a/mach/m68k4/libsys/mount.s b/mach/m68k4/libsys/mount.s new file mode 100644 index 000000000..b7d37737a --- /dev/null +++ b/mach/m68k4/libsys/mount.s @@ -0,0 +1,9 @@ + +.define _mount +.extern _mount +.text +_mount: move.w #0x15,d0 + move.l 4(sp),a0 + move.l 8(sp),d1 + move.l 12(sp),a1 + jmp callc diff --git a/mach/m68k4/libsys/nice.s b/mach/m68k4/libsys/nice.s new file mode 100644 index 000000000..4929617bc --- /dev/null +++ b/mach/m68k4/libsys/nice.s @@ -0,0 +1,6 @@ +.define _nice +.extern _nice +.text +_nice: move.w #0x22,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/open.s b/mach/m68k4/libsys/open.s new file mode 100644 index 000000000..04b3b5054 --- /dev/null +++ b/mach/m68k4/libsys/open.s @@ -0,0 +1,8 @@ +.define _open +.extern _open +.text +_open: move.w #0x5,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp call diff --git a/mach/m68k4/libsys/pause.s b/mach/m68k4/libsys/pause.s new file mode 100644 index 000000000..53b99d732 --- /dev/null +++ b/mach/m68k4/libsys/pause.s @@ -0,0 +1,6 @@ +.define _pause +.extern _pause +.text +_pause: move.w #0x1D,d0 + trap #0 + rts diff --git a/mach/m68k4/libsys/read.s b/mach/m68k4/libsys/read.s new file mode 100644 index 000000000..a5e0449a7 --- /dev/null +++ b/mach/m68k4/libsys/read.s @@ -0,0 +1,8 @@ +.define _read +.extern _read +.text +_read: move.w #0x3,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + move.w 10(sp),a1 + jmp call diff --git a/mach/m68k4/libsys/setgid.s b/mach/m68k4/libsys/setgid.s new file mode 100644 index 000000000..5ad03004d --- /dev/null +++ b/mach/m68k4/libsys/setgid.s @@ -0,0 +1,6 @@ +.define _setgid +.extern _setgid +.text +_setgid: move.w #0x2E,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/setuid.s b/mach/m68k4/libsys/setuid.s new file mode 100644 index 000000000..94cc45ef6 --- /dev/null +++ b/mach/m68k4/libsys/setuid.s @@ -0,0 +1,6 @@ +.define _setuid +.extern _setuid +.text +_setuid: move.w #0x17,d0 + move.w 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/signal.s b/mach/m68k4/libsys/signal.s new file mode 100644 index 000000000..8f18c1f81 --- /dev/null +++ b/mach/m68k4/libsys/signal.s @@ -0,0 +1,49 @@ +.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 d0,a0 + move.w #0x30,d0 + trap #0 + 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/m68k4/libsys/stat.s b/mach/m68k4/libsys/stat.s new file mode 100644 index 000000000..304c38b1b --- /dev/null +++ b/mach/m68k4/libsys/stat.s @@ -0,0 +1,8 @@ +.define _stat +.extern _stat +.text +_stat: move.w #0x12,d0 + move.l 4(sp),a0 + move.w 8(sp),d1 + ext.l d1 + jmp callc diff --git a/mach/m68k4/libsys/stime.s b/mach/m68k4/libsys/stime.s new file mode 100644 index 000000000..bac6386de --- /dev/null +++ b/mach/m68k4/libsys/stime.s @@ -0,0 +1,11 @@ +.define _stime +.extern _stime +.text +_stime: move.w #0x19,d0 + move.l 4(sp),a0 + move.l (a0),a0 + trap #0 + bcs 1f + rts +1: + jmp cerror diff --git a/mach/m68k4/libsys/stty.s b/mach/m68k4/libsys/stty.s new file mode 100644 index 000000000..46a497cd8 --- /dev/null +++ b/mach/m68k4/libsys/stty.s @@ -0,0 +1,13 @@ +.define _stty +.extern _stty +.text +_stty: +tst.b -40(sp) +link a6,#-0 +move.l 10(a6),-(sp) +move.w #29705,-(sp) +move.w 8(a6),-(sp) +jsr _ioctl +add.l #8,sp +unlk a6 +rts diff --git a/mach/m68k4/libsys/sync.s b/mach/m68k4/libsys/sync.s new file mode 100644 index 000000000..3c38a8ada --- /dev/null +++ b/mach/m68k4/libsys/sync.s @@ -0,0 +1,6 @@ +.define _sync +.extern _sync +.text +_sync: move.w #0x24,d0 + trap #0 + rts diff --git a/mach/m68k4/libsys/time.s b/mach/m68k4/libsys/time.s new file mode 100644 index 000000000..87b9d8bd3 --- /dev/null +++ b/mach/m68k4/libsys/time.s @@ -0,0 +1,11 @@ +.define _time +.extern _time +.text +_time: move.w #0xD,d0 + trap #0 + tst.l 4(sp) + beq 1f + move.l 4(sp),a0 + move.l d0,(a0) +1: + rts diff --git a/mach/m68k4/libsys/times.s b/mach/m68k4/libsys/times.s new file mode 100644 index 000000000..002f63be5 --- /dev/null +++ b/mach/m68k4/libsys/times.s @@ -0,0 +1,7 @@ +.define _times +.extern _times +.text +_times: move.w #0x2B,d0 + move.w 4(sp),a0 + trap #0 + rts diff --git a/mach/m68k4/libsys/umount.s b/mach/m68k4/libsys/umount.s new file mode 100644 index 000000000..59354ee90 --- /dev/null +++ b/mach/m68k4/libsys/umount.s @@ -0,0 +1,6 @@ +.define _umount +.extern _umount +.text +_umount: move.w #0x16,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/unlink.s b/mach/m68k4/libsys/unlink.s new file mode 100644 index 000000000..99e856a5a --- /dev/null +++ b/mach/m68k4/libsys/unlink.s @@ -0,0 +1,6 @@ +.define _unlink +.extern _unlink +.text +_unlink: move.w #0xA,d0 + move.l 4(sp),a0 + jmp callc diff --git a/mach/m68k4/libsys/wait.s b/mach/m68k4/libsys/wait.s new file mode 100644 index 000000000..a0ea1a5e9 --- /dev/null +++ b/mach/m68k4/libsys/wait.s @@ -0,0 +1,12 @@ +.define _wait +.extern _wait +_wait: move.w #0x7,d0 + move.l 4(sp),a0 + trap #0 + bcs cerror + tst.l 4(sp) + beq 1f + move.l 4(sp),a0 + move.w d1,(a0) +1: + rts diff --git a/mach/m68k4/libsys/write.s b/mach/m68k4/libsys/write.s new file mode 100644 index 000000000..192d7adbe --- /dev/null +++ b/mach/m68k4/libsys/write.s @@ -0,0 +1,8 @@ +.define _write +.extern _write +.text +_write: move.w #0x4,d0 + move.w 4(sp),a0 + move.l 6(sp),d1 + move.w 10(sp),a1 + jmp call -- 2.34.1