From 153e30bb1c42b91dc983be00b5ab2caa5f7dffdd Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 29 Jan 1987 22:36:35 +0000 Subject: [PATCH] Initial revision --- mach/m68020/libsys/README | 66 +++++++++++++++++++++++++++++++++++ mach/m68020/libsys/_exit.s | 10 ++++++ mach/m68020/libsys/access.s | 9 +++++ mach/m68020/libsys/acct.s | 9 +++++ mach/m68020/libsys/alarm.s | 10 ++++++ mach/m68020/libsys/brk.s | 25 +++++++++++++ mach/m68020/libsys/call.s | 28 +++++++++++++++ mach/m68020/libsys/chdir.s | 9 +++++ mach/m68020/libsys/chmod.s | 9 +++++ mach/m68020/libsys/chown.s | 9 +++++ mach/m68020/libsys/chroot.s | 9 +++++ mach/m68020/libsys/cleanup.s | 12 +++++++ mach/m68020/libsys/close.s | 9 +++++ mach/m68020/libsys/compmodule | 4 +++ mach/m68020/libsys/creat.s | 9 +++++ mach/m68020/libsys/dup.s | 9 +++++ mach/m68020/libsys/dup2.s | 10 ++++++ mach/m68020/libsys/errno.s | 9 +++++ mach/m68020/libsys/execl.s | 16 +++++++++ mach/m68020/libsys/execve.s | 9 +++++ mach/m68020/libsys/exit.s | 16 +++++++++ mach/m68020/libsys/fcntl.s | 9 +++++ mach/m68020/libsys/fork.s | 17 +++++++++ mach/m68020/libsys/fstat.s | 9 +++++ mach/m68020/libsys/ftime.s | 9 +++++ mach/m68020/libsys/getegid.s | 11 ++++++ mach/m68020/libsys/getgid.s | 10 ++++++ mach/m68020/libsys/getpid.s | 10 ++++++ mach/m68020/libsys/getuid.s | 10 ++++++ mach/m68020/libsys/gtty.s | 9 +++++ mach/m68020/libsys/ioctl.s | 9 +++++ mach/m68020/libsys/kill.s | 9 +++++ mach/m68020/libsys/link.s | 9 +++++ mach/m68020/libsys/lock.s | 9 +++++ mach/m68020/libsys/lseek.s | 9 +++++ mach/m68020/libsys/mknod.s | 9 +++++ mach/m68020/libsys/mount.s | 9 +++++ mach/m68020/libsys/nice.s | 9 +++++ mach/m68020/libsys/open.s | 9 +++++ mach/m68020/libsys/pause.s | 9 +++++ mach/m68020/libsys/pipe.s | 18 ++++++++++ mach/m68020/libsys/profil.s | 10 ++++++ mach/m68020/libsys/ptrace.s | 11 ++++++ mach/m68020/libsys/read.s | 9 +++++ mach/m68020/libsys/setgid.s | 9 +++++ mach/m68020/libsys/setuid.s | 9 +++++ mach/m68020/libsys/signal.s | 22 ++++++++++++ mach/m68020/libsys/stat.s | 9 +++++ mach/m68020/libsys/stime.s | 10 ++++++ mach/m68020/libsys/stty.s | 9 +++++ mach/m68020/libsys/sync.s | 10 ++++++ mach/m68020/libsys/time.s | 14 ++++++++ mach/m68020/libsys/times.s | 10 ++++++ mach/m68020/libsys/umask.s | 9 +++++ mach/m68020/libsys/umount.s | 9 +++++ mach/m68020/libsys/unlink.s | 9 +++++ mach/m68020/libsys/utime.s | 9 +++++ mach/m68020/libsys/wait.s | 15 ++++++++ mach/m68020/libsys/write.s | 9 +++++ 59 files changed, 690 insertions(+) create mode 100644 mach/m68020/libsys/README create mode 100644 mach/m68020/libsys/_exit.s create mode 100644 mach/m68020/libsys/access.s create mode 100644 mach/m68020/libsys/acct.s create mode 100644 mach/m68020/libsys/alarm.s create mode 100644 mach/m68020/libsys/brk.s create mode 100644 mach/m68020/libsys/call.s create mode 100644 mach/m68020/libsys/chdir.s create mode 100644 mach/m68020/libsys/chmod.s create mode 100644 mach/m68020/libsys/chown.s create mode 100644 mach/m68020/libsys/chroot.s create mode 100644 mach/m68020/libsys/cleanup.s create mode 100644 mach/m68020/libsys/close.s create mode 100755 mach/m68020/libsys/compmodule create mode 100644 mach/m68020/libsys/creat.s create mode 100644 mach/m68020/libsys/dup.s create mode 100644 mach/m68020/libsys/dup2.s create mode 100644 mach/m68020/libsys/errno.s create mode 100644 mach/m68020/libsys/execl.s create mode 100644 mach/m68020/libsys/execve.s create mode 100644 mach/m68020/libsys/exit.s create mode 100644 mach/m68020/libsys/fcntl.s create mode 100644 mach/m68020/libsys/fork.s create mode 100644 mach/m68020/libsys/fstat.s create mode 100644 mach/m68020/libsys/ftime.s create mode 100644 mach/m68020/libsys/getegid.s create mode 100644 mach/m68020/libsys/getgid.s create mode 100644 mach/m68020/libsys/getpid.s create mode 100644 mach/m68020/libsys/getuid.s create mode 100644 mach/m68020/libsys/gtty.s create mode 100644 mach/m68020/libsys/ioctl.s create mode 100644 mach/m68020/libsys/kill.s create mode 100644 mach/m68020/libsys/link.s create mode 100644 mach/m68020/libsys/lock.s create mode 100644 mach/m68020/libsys/lseek.s create mode 100644 mach/m68020/libsys/mknod.s create mode 100644 mach/m68020/libsys/mount.s create mode 100644 mach/m68020/libsys/nice.s create mode 100644 mach/m68020/libsys/open.s create mode 100644 mach/m68020/libsys/pause.s create mode 100644 mach/m68020/libsys/pipe.s create mode 100644 mach/m68020/libsys/profil.s create mode 100644 mach/m68020/libsys/ptrace.s create mode 100644 mach/m68020/libsys/read.s create mode 100644 mach/m68020/libsys/setgid.s create mode 100644 mach/m68020/libsys/setuid.s create mode 100644 mach/m68020/libsys/signal.s create mode 100644 mach/m68020/libsys/stat.s create mode 100644 mach/m68020/libsys/stime.s create mode 100644 mach/m68020/libsys/stty.s create mode 100644 mach/m68020/libsys/sync.s create mode 100644 mach/m68020/libsys/time.s create mode 100644 mach/m68020/libsys/times.s create mode 100644 mach/m68020/libsys/umask.s create mode 100644 mach/m68020/libsys/umount.s create mode 100644 mach/m68020/libsys/unlink.s create mode 100644 mach/m68020/libsys/utime.s create mode 100644 mach/m68020/libsys/wait.s create mode 100644 mach/m68020/libsys/write.s diff --git a/mach/m68020/libsys/README b/mach/m68020/libsys/README new file mode 100644 index 000000000..df9f3de6b --- /dev/null +++ b/mach/m68020/libsys/README @@ -0,0 +1,66 @@ + ! Two system calls (gtty and stty) in the m68000 tail_mon library + ! were not really system calls but they used _ioctl. The m68020 machine + ! the table was tested on used real system calls, and we'll use + ! them here. + ! There were also three calls (ftime, lock and dup2) that were in the + ! m68000 library, but were not included in the list of system calls + ! for the m68020 that was given to me. We'll include them anyway. + ! The original gtty and stty files are included here. + ! Note however that the 68000 machine (the Mantra) needs the parameters + ! to system calls in registers, while the m68020 machine this table was + ! tested on wanted the parameters on the stack + ! + ! Also read the comments in the signal.s file! +! ------------------- dup2.s +! .define _dup2 +! .extern _dup2 +! .sect .text +! .sect .rom +! .sect .data +! .sect .bss +! .sect .text +! _dup2: move.w #0x29,d0 +! move.l (4,sp),a0 +! move.l (8,sp),d1 +! add.l #0x40,a0 +! jmp (call) +! +! +! ! ------------------- gtty.s +! .define _gtty +! .extern _gtty +! .sect .text +! .sect .rom +! .sect .data +! .sect .bss +! .sect .text +! _gtty: +! tst.b (-40,sp) +! link a6,#-0 +! move.l (12,a6),-(sp) +! move.l #29704,-(sp) +! move.l (8,a6),-(sp) +! jsr (_ioctl) +! add.l #12,sp +! unlk a6 +! rts +! +! +! ! ------------------- stty.s +! .define _stty +! .extern _stty +! .sect .text +! .sect .rom +! .sect .data +! .sect .bss +! .sect .text +! _stty: +! tst.b (-40,sp) +! link a6,#-0 +! move.l (12,a6),-(sp) +! move.l #29705,-(sp) +! move.l (8,a6),-(sp) +! jsr (_ioctl) +! add.l #12,sp +! unlk a6 +! rts diff --git a/mach/m68020/libsys/_exit.s b/mach/m68020/libsys/_exit.s new file mode 100644 index 000000000..520d2814c --- /dev/null +++ b/mach/m68020/libsys/_exit.s @@ -0,0 +1,10 @@ +.define __exit +.extern __exit +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +__exit: move.l #0x1,d0 + trap #0 + stop #0 ! was there in 68020 routine diff --git a/mach/m68020/libsys/access.s b/mach/m68020/libsys/access.s new file mode 100644 index 000000000..02274d7b9 --- /dev/null +++ b/mach/m68020/libsys/access.s @@ -0,0 +1,9 @@ +.define _access +.extern _access +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_access: move.l #0x21,d0 + jmp (callc) diff --git a/mach/m68020/libsys/acct.s b/mach/m68020/libsys/acct.s new file mode 100644 index 000000000..71bb08da8 --- /dev/null +++ b/mach/m68020/libsys/acct.s @@ -0,0 +1,9 @@ +.define _acct +.extern _acct +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_acct: move.l #0x33,d0 + jmp (callc) diff --git a/mach/m68020/libsys/alarm.s b/mach/m68020/libsys/alarm.s new file mode 100644 index 000000000..18ceb91d0 --- /dev/null +++ b/mach/m68020/libsys/alarm.s @@ -0,0 +1,10 @@ +.define _alarm +.extern _alarm +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_alarm: move.l #0x1B,d0 + trap #0 + rts diff --git a/mach/m68020/libsys/brk.s b/mach/m68020/libsys/brk.s new file mode 100644 index 000000000..c52c17ec4 --- /dev/null +++ b/mach/m68020/libsys/brk.s @@ -0,0 +1,25 @@ +.define _brk +.define _sbrk +.extern _brk +.extern _sbrk +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_sbrk: move.l (.reghp),d0 + add.l d0,(4,sp) + move.l #0x11,d0 + trap #0 + bcs lcerror + move.l (.reghp),d0 + move.l d0,a0 + move.l (4,sp),(.reghp) + rts +lcerror: jmp (cerror) +_brk: move.l #0x11,d0 + trap #0 + bcs lcerror + move.l (4,sp),(.reghp) + clr.l d0 + rts diff --git a/mach/m68020/libsys/call.s b/mach/m68020/libsys/call.s new file mode 100644 index 000000000..37ddf9d23 --- /dev/null +++ b/mach/m68020/libsys/call.s @@ -0,0 +1,28 @@ +.define call +.define callc +.define calle +.define cerror +.extern call +.extern callc +.extern calle +.extern cerror +.extern _errno +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +call: trap #0 + bcs cerror + rts +callc: + trap #0 + bcs cerror + clr.l d0 + rts +calle: + trap #0 +cerror: + move.l d0,(_errno) + move.l #-1,d0 + rts diff --git a/mach/m68020/libsys/chdir.s b/mach/m68020/libsys/chdir.s new file mode 100644 index 000000000..b76384afd --- /dev/null +++ b/mach/m68020/libsys/chdir.s @@ -0,0 +1,9 @@ +.define _chdir +.extern _chdir +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_chdir: move.l #0xC,d0 + jmp (callc) diff --git a/mach/m68020/libsys/chmod.s b/mach/m68020/libsys/chmod.s new file mode 100644 index 000000000..636671a5e --- /dev/null +++ b/mach/m68020/libsys/chmod.s @@ -0,0 +1,9 @@ +.define _chmod +.extern _chmod +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_chmod: move.l #0xF,d0 + jmp (callc) diff --git a/mach/m68020/libsys/chown.s b/mach/m68020/libsys/chown.s new file mode 100644 index 000000000..ada39b8bb --- /dev/null +++ b/mach/m68020/libsys/chown.s @@ -0,0 +1,9 @@ +.define _chown +.extern _chown +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_chown: move.l #0x10,d0 + jmp (callc) diff --git a/mach/m68020/libsys/chroot.s b/mach/m68020/libsys/chroot.s new file mode 100644 index 000000000..85de8069d --- /dev/null +++ b/mach/m68020/libsys/chroot.s @@ -0,0 +1,9 @@ +.define _chroot +.extern _chroot +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_chroot: move.l #0x3D,d0 + jmp (callc) diff --git a/mach/m68020/libsys/cleanup.s b/mach/m68020/libsys/cleanup.s new file mode 100644 index 000000000..ecb859c0a --- /dev/null +++ b/mach/m68020/libsys/cleanup.s @@ -0,0 +1,12 @@ +.define __cleanup +.extern __cleanup +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +__cleanup: +tst.b (-40,sp) +link a6,#-0 +unlk a6 +rts diff --git a/mach/m68020/libsys/close.s b/mach/m68020/libsys/close.s new file mode 100644 index 000000000..45c0f0507 --- /dev/null +++ b/mach/m68020/libsys/close.s @@ -0,0 +1,9 @@ +.define _close +.extern _close +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_close: move.l #0x6,d0 + jmp (callc) diff --git a/mach/m68020/libsys/compmodule b/mach/m68020/libsys/compmodule new file mode 100755 index 000000000..e42fb932f --- /dev/null +++ b/mach/m68020/libsys/compmodule @@ -0,0 +1,4 @@ +if ${MACH?} -c $1 1>&2 +then echo `basename $1 $2`.o +else exit 1 +fi diff --git a/mach/m68020/libsys/creat.s b/mach/m68020/libsys/creat.s new file mode 100644 index 000000000..30aabd52d --- /dev/null +++ b/mach/m68020/libsys/creat.s @@ -0,0 +1,9 @@ +.define _creat +.extern _creat +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_creat: move.l #0x8,d0 + jmp (call) diff --git a/mach/m68020/libsys/dup.s b/mach/m68020/libsys/dup.s new file mode 100644 index 000000000..e2f29f2a4 --- /dev/null +++ b/mach/m68020/libsys/dup.s @@ -0,0 +1,9 @@ +.define _dup +.extern _dup +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_dup: move.l #0x29,d0 + jmp (call) diff --git a/mach/m68020/libsys/dup2.s b/mach/m68020/libsys/dup2.s new file mode 100644 index 000000000..dcdf0e9c1 --- /dev/null +++ b/mach/m68020/libsys/dup2.s @@ -0,0 +1,10 @@ +.define _dup2 +.extern _dup2 +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_dup2: move.l #0x29,d0 + add.l #0x40,(4,sp) ! ??? + jmp (call) diff --git a/mach/m68020/libsys/errno.s b/mach/m68020/libsys/errno.s new file mode 100644 index 000000000..adc083015 --- /dev/null +++ b/mach/m68020/libsys/errno.s @@ -0,0 +1,9 @@ +.define _errno +.extern _errno +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .bss +_errno: .space 4 +.sect .text diff --git a/mach/m68020/libsys/execl.s b/mach/m68020/libsys/execl.s new file mode 100644 index 000000000..147716a6b --- /dev/null +++ b/mach/m68020/libsys/execl.s @@ -0,0 +1,16 @@ +.define _execl +.extern _execl +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_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/m68020/libsys/execve.s b/mach/m68020/libsys/execve.s new file mode 100644 index 000000000..a26107d69 --- /dev/null +++ b/mach/m68020/libsys/execve.s @@ -0,0 +1,9 @@ +.define _execve +.extern _execve +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_execve: move.l #0x3B,d0 + jmp (calle) diff --git a/mach/m68020/libsys/exit.s b/mach/m68020/libsys/exit.s new file mode 100644 index 000000000..77d95a5ca --- /dev/null +++ b/mach/m68020/libsys/exit.s @@ -0,0 +1,16 @@ +.define _exit +.extern _exit +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .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/m68020/libsys/fcntl.s b/mach/m68020/libsys/fcntl.s new file mode 100644 index 000000000..385bcdb0b --- /dev/null +++ b/mach/m68020/libsys/fcntl.s @@ -0,0 +1,9 @@ +.define _fcntl +.extern _fcntl +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_fcntl: move.l #0x3E,d0 + jmp (callc) diff --git a/mach/m68020/libsys/fork.s b/mach/m68020/libsys/fork.s new file mode 100644 index 000000000..a087239e6 --- /dev/null +++ b/mach/m68020/libsys/fork.s @@ -0,0 +1,17 @@ +.define _fork +.extern _fork +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_fork: move.l #0x2,d0 + trap #0 + bcc 1f ! 68020 way to do it + jmp (cerror) +1: + tst.b d1 + beq 2f + clr.l d0 +2: + rts diff --git a/mach/m68020/libsys/fstat.s b/mach/m68020/libsys/fstat.s new file mode 100644 index 000000000..a9c091a9e --- /dev/null +++ b/mach/m68020/libsys/fstat.s @@ -0,0 +1,9 @@ +.define _fstat +.extern _fstat +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_fstat: move.l #0x1C,d0 + jmp (callc) diff --git a/mach/m68020/libsys/ftime.s b/mach/m68020/libsys/ftime.s new file mode 100644 index 000000000..4b3f05c1c --- /dev/null +++ b/mach/m68020/libsys/ftime.s @@ -0,0 +1,9 @@ +.define _ftime +.extern _ftime +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_ftime: move.l #0x23,d0 + jmp (callc) diff --git a/mach/m68020/libsys/getegid.s b/mach/m68020/libsys/getegid.s new file mode 100644 index 000000000..470f8b30c --- /dev/null +++ b/mach/m68020/libsys/getegid.s @@ -0,0 +1,11 @@ +.define _getegid +.extern _getegid +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_getegid: move.l #0x2F,d0 + trap #0 + move.l d1,d0 + rts diff --git a/mach/m68020/libsys/getgid.s b/mach/m68020/libsys/getgid.s new file mode 100644 index 000000000..ff4dd2cea --- /dev/null +++ b/mach/m68020/libsys/getgid.s @@ -0,0 +1,10 @@ +.define _getgid +.extern _getgid +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_getgid: move.l #0x2F,d0 + trap #0 + rts diff --git a/mach/m68020/libsys/getpid.s b/mach/m68020/libsys/getpid.s new file mode 100644 index 000000000..3d128e43f --- /dev/null +++ b/mach/m68020/libsys/getpid.s @@ -0,0 +1,10 @@ +.define _getpid +.extern _getpid +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_getpid: move.l #0x14,d0 + trap #0 + rts diff --git a/mach/m68020/libsys/getuid.s b/mach/m68020/libsys/getuid.s new file mode 100644 index 000000000..7c884c6c5 --- /dev/null +++ b/mach/m68020/libsys/getuid.s @@ -0,0 +1,10 @@ +.define _getuid +.extern _getuid +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_getuid: move.l #0x18,d0 + trap #0 + rts diff --git a/mach/m68020/libsys/gtty.s b/mach/m68020/libsys/gtty.s new file mode 100644 index 000000000..72249177a --- /dev/null +++ b/mach/m68020/libsys/gtty.s @@ -0,0 +1,9 @@ +.define _gtty +.extern _gtty +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_gtty: move.l #0x20, d0 + jmp (call) diff --git a/mach/m68020/libsys/ioctl.s b/mach/m68020/libsys/ioctl.s new file mode 100644 index 000000000..9f5d4ecb6 --- /dev/null +++ b/mach/m68020/libsys/ioctl.s @@ -0,0 +1,9 @@ +.define _ioctl +.extern _ioctl +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_ioctl: move.l #0x36,d0 + jmp (call) diff --git a/mach/m68020/libsys/kill.s b/mach/m68020/libsys/kill.s new file mode 100644 index 000000000..30cc6aae3 --- /dev/null +++ b/mach/m68020/libsys/kill.s @@ -0,0 +1,9 @@ +.define _kill +.extern _kill +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_kill: move.l #0x25,d0 + jmp (callc) diff --git a/mach/m68020/libsys/link.s b/mach/m68020/libsys/link.s new file mode 100644 index 000000000..fdc468d4c --- /dev/null +++ b/mach/m68020/libsys/link.s @@ -0,0 +1,9 @@ +.define _link +.extern _link +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_link: move.l #0x9,d0 + jmp (callc) diff --git a/mach/m68020/libsys/lock.s b/mach/m68020/libsys/lock.s new file mode 100644 index 000000000..672065326 --- /dev/null +++ b/mach/m68020/libsys/lock.s @@ -0,0 +1,9 @@ +.define _lock +.extern _lock +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_lock: move.l #0x35,d0 + jmp (callc) diff --git a/mach/m68020/libsys/lseek.s b/mach/m68020/libsys/lseek.s new file mode 100644 index 000000000..dfb7a3ce5 --- /dev/null +++ b/mach/m68020/libsys/lseek.s @@ -0,0 +1,9 @@ +.define _lseek +.extern _lseek +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_lseek: move.l #0x13,d0 + jmp (call) diff --git a/mach/m68020/libsys/mknod.s b/mach/m68020/libsys/mknod.s new file mode 100644 index 000000000..9364c9ffd --- /dev/null +++ b/mach/m68020/libsys/mknod.s @@ -0,0 +1,9 @@ +.define _mknod +.extern _mknod +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_mknod: move.l #0xE,d0 + jmp (callc) diff --git a/mach/m68020/libsys/mount.s b/mach/m68020/libsys/mount.s new file mode 100644 index 000000000..bf3083c27 --- /dev/null +++ b/mach/m68020/libsys/mount.s @@ -0,0 +1,9 @@ +.define _mount +.extern _mount +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_mount: move.l #0x15,d0 + jmp (callc) diff --git a/mach/m68020/libsys/nice.s b/mach/m68020/libsys/nice.s new file mode 100644 index 000000000..3c24e59bd --- /dev/null +++ b/mach/m68020/libsys/nice.s @@ -0,0 +1,9 @@ +.define _nice +.extern _nice +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_nice: move.l #0x22,d0 + jmp (call) diff --git a/mach/m68020/libsys/open.s b/mach/m68020/libsys/open.s new file mode 100644 index 000000000..b9de1c4ce --- /dev/null +++ b/mach/m68020/libsys/open.s @@ -0,0 +1,9 @@ +.define _open +.extern _open +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_open: move.l #0x5,d0 + jmp (call) diff --git a/mach/m68020/libsys/pause.s b/mach/m68020/libsys/pause.s new file mode 100644 index 000000000..30b21a1bc --- /dev/null +++ b/mach/m68020/libsys/pause.s @@ -0,0 +1,9 @@ +.define _pause +.extern _pause +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_pause: move.l #0x1D,d0 + jmp (callc) diff --git a/mach/m68020/libsys/pipe.s b/mach/m68020/libsys/pipe.s new file mode 100644 index 000000000..b4e4217a7 --- /dev/null +++ b/mach/m68020/libsys/pipe.s @@ -0,0 +1,18 @@ +.define _pipe +.extern _pipe +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_pipe: + move.l #0x2A,d0 + trap #0 + 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/m68020/libsys/profil.s b/mach/m68020/libsys/profil.s new file mode 100644 index 000000000..10703e860 --- /dev/null +++ b/mach/m68020/libsys/profil.s @@ -0,0 +1,10 @@ +.define _profil +.extern _profil +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_profil: move.l #0x2C,d0 + trap #0 + rts diff --git a/mach/m68020/libsys/ptrace.s b/mach/m68020/libsys/ptrace.s new file mode 100644 index 000000000..7ceba3fe5 --- /dev/null +++ b/mach/m68020/libsys/ptrace.s @@ -0,0 +1,11 @@ +.define _ptrace +.extern _ptrace +.extern _errno +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_ptrace: move.l #0x1A,d0 + clr.l (_errno) + jmp (call) diff --git a/mach/m68020/libsys/read.s b/mach/m68020/libsys/read.s new file mode 100644 index 000000000..1602d806c --- /dev/null +++ b/mach/m68020/libsys/read.s @@ -0,0 +1,9 @@ +.define _read +.extern _read +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_read: move.l #0x3,d0 + jmp (call) diff --git a/mach/m68020/libsys/setgid.s b/mach/m68020/libsys/setgid.s new file mode 100644 index 000000000..bba1a291d --- /dev/null +++ b/mach/m68020/libsys/setgid.s @@ -0,0 +1,9 @@ +.define _setgid +.extern _setgid +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_setgid: move.l #0x2E,d0 + jmp (callc) diff --git a/mach/m68020/libsys/setuid.s b/mach/m68020/libsys/setuid.s new file mode 100644 index 000000000..5fda75498 --- /dev/null +++ b/mach/m68020/libsys/setuid.s @@ -0,0 +1,9 @@ +.define _setuid +.extern _setuid +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_setuid: move.l #0x17,d0 + jmp (callc) diff --git a/mach/m68020/libsys/signal.s b/mach/m68020/libsys/signal.s new file mode 100644 index 000000000..1d22e7999 --- /dev/null +++ b/mach/m68020/libsys/signal.s @@ -0,0 +1,22 @@ +.define _signal +.extern _signal +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_signal: + move.l #0x30,d0 + jmp (callc) +! NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE +! +! Just as in the m68000 tail_mon library the acual signal system call +! is not called directly by the user, but an `interface'. This `interface' +! does the actual system call. On the m68020 machine the table was tested on +! this `interface' did things that I did not understand, e.g. it called +! a sytem call with number 38, called `_sysm68k'. I couldn't get the signal +! system call get to work properly on that machine, but as it is clear +! that this is in no way to blame to my back end table. +! The system call as presented here does not reset the catch routine: a +! signal that is caught by a user function will be caught every time, not +! just once. I couldn't change this. diff --git a/mach/m68020/libsys/stat.s b/mach/m68020/libsys/stat.s new file mode 100644 index 000000000..73dd9490f --- /dev/null +++ b/mach/m68020/libsys/stat.s @@ -0,0 +1,9 @@ +.define _stat +.extern _stat +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_stat: move.l #0x12,d0 + jmp (callc) diff --git a/mach/m68020/libsys/stime.s b/mach/m68020/libsys/stime.s new file mode 100644 index 000000000..7d0823c8a --- /dev/null +++ b/mach/m68020/libsys/stime.s @@ -0,0 +1,10 @@ +.define _stime +.extern _stime +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_stime: move.l #0x19,d0 + move.l ([4,sp]),(4,sp) + jmp (callc) diff --git a/mach/m68020/libsys/stty.s b/mach/m68020/libsys/stty.s new file mode 100644 index 000000000..469f9c5a3 --- /dev/null +++ b/mach/m68020/libsys/stty.s @@ -0,0 +1,9 @@ +.define _stty +.extern _stty +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_stty: move.l #0x21, d0 + jmp (call) diff --git a/mach/m68020/libsys/sync.s b/mach/m68020/libsys/sync.s new file mode 100644 index 000000000..3ee77a2c6 --- /dev/null +++ b/mach/m68020/libsys/sync.s @@ -0,0 +1,10 @@ +.define _sync +.extern _sync +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_sync: move.l #0x24,d0 + trap #0 + rts diff --git a/mach/m68020/libsys/time.s b/mach/m68020/libsys/time.s new file mode 100644 index 000000000..ad82771c3 --- /dev/null +++ b/mach/m68020/libsys/time.s @@ -0,0 +1,14 @@ +.define _time +.extern _time +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_time: move.l #0xD,d0 + trap #0 + tst.l (4,sp) + beq 1f + move.l d0,([4,sp]) +1: + rts diff --git a/mach/m68020/libsys/times.s b/mach/m68020/libsys/times.s new file mode 100644 index 000000000..e06693f8b --- /dev/null +++ b/mach/m68020/libsys/times.s @@ -0,0 +1,10 @@ +.define _times +.extern _times +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_times: move.l #0x2B,d0 + trap #0 + jmp (call) diff --git a/mach/m68020/libsys/umask.s b/mach/m68020/libsys/umask.s new file mode 100644 index 000000000..b16bf5fcf --- /dev/null +++ b/mach/m68020/libsys/umask.s @@ -0,0 +1,9 @@ +.define _umask +.extern _umask +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_umask: move.l #0x3C,d0 + jmp (call) diff --git a/mach/m68020/libsys/umount.s b/mach/m68020/libsys/umount.s new file mode 100644 index 000000000..3940f13a9 --- /dev/null +++ b/mach/m68020/libsys/umount.s @@ -0,0 +1,9 @@ +.define _umount +.extern _umount +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_umount: move.l #0x16,d0 + jmp (callc) diff --git a/mach/m68020/libsys/unlink.s b/mach/m68020/libsys/unlink.s new file mode 100644 index 000000000..a31a191c8 --- /dev/null +++ b/mach/m68020/libsys/unlink.s @@ -0,0 +1,9 @@ +.define _unlink +.extern _unlink +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_unlink: move.l #0xA,d0 + jmp (callc) diff --git a/mach/m68020/libsys/utime.s b/mach/m68020/libsys/utime.s new file mode 100644 index 000000000..98070dbae --- /dev/null +++ b/mach/m68020/libsys/utime.s @@ -0,0 +1,9 @@ +.define _utime +.extern _utime +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_utime: move.l #0x1E,d0 + jmp (callc) diff --git a/mach/m68020/libsys/wait.s b/mach/m68020/libsys/wait.s new file mode 100644 index 000000000..4ffafbd4d --- /dev/null +++ b/mach/m68020/libsys/wait.s @@ -0,0 +1,15 @@ +.define _wait +.extern _wait +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_wait: move.l #0x7,d0 + trap #0 + bcs cerror + tst.l (4,sp) + beq 1f + move.l d1,([4,sp]) +1: + rts diff --git a/mach/m68020/libsys/write.s b/mach/m68020/libsys/write.s new file mode 100644 index 000000000..cf1f3c3b5 --- /dev/null +++ b/mach/m68020/libsys/write.s @@ -0,0 +1,9 @@ +.define _write +.extern _write +.sect .text +.sect .rom +.sect .data +.sect .bss +.sect .text +_write: move.l #0x4,d0 + jmp (call)