--- /dev/null
+tail_mon.a
+_exit.s
+access.s
+acct.s
+alarm.s
+chdir.s
+chmod.s
+chown.s
+close.s
+creat.s
+dup.s
+errmon.s
+execl.s
+execle.s
+execv.s
+execve.s
+fork.s
+fstat.s
+ftime.s
+getgid.s
+getpid.s
+getuid.s
+ioctl.s
+kill.s
+link.s
+lseek.s
+mknod.s
+mount.s
+mpx.s
+nice.s
+open.s
+pause.s
+pipe.s
+profil.s
+ptrace.s
+read.s
+sbrk.s
+setgid.s
+setuid.s
+signal.s
+stat.s
+stime.s
+sync.s
+syscall.s
+time.s
+times.s
+umask.s
+umount.s
+unlink.s
+utime.s
+vadvise.s
+vfork.s
+vhangup.s
+vlimit.s
+vread.s
+vtimes.s
+vwait.s
+vwrite.s
+wait.s
+write.s
--- /dev/null
+# $Header$
+install: cp
+
+cp: all
+ ../../install head_em
+ ../../install tail_mon
+ rm -f head_em tail_mon
+
+cmp: all
+ -../../compare head_em
+ -../../compare tail_mon
+ rm -f head_em tail_mon
+
+all: head_em tail_mon
+
+head_em: head_em.s
+ vax4 -I../../../h -c head_em.s ; mv head_em.o head_em
+
+tail_mon:
+ ASAR=ar ; export ASAR ;\
+ RANLIB=ranlib ; export RANLIB ;\
+ march . tail_mon
+
+clean:
+ rm -f *.o
+opr:
+ make pr | opr
+pr:
+ @pr `pwd`/Makefile `pwd`/head_em.s
+ @pr -l33 `tail +1 LIST|sort`
--- /dev/null
+.globl __exit
+.set exit,1
+
+.align 1
+__exit:
+ .word 0x0000
+ chmk $exit
+ halt
--- /dev/null
+.globl _access
+.set access,33
+
+.align 1
+_access:
+ .word 0x0000
+ chmk $access
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _acct
+.set acct,51
+
+.align 1
+_acct:
+ .word 0x0000
+ chmk $acct
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _alarm
+.set alarm,27
+
+.align 1
+_alarm:
+ .word 0x0000
+ chmk $alarm
+ ret
--- /dev/null
+.globl _chdir
+.set chdir,12
+
+.align 1
+_chdir:
+ .word 0x0000
+ chmk $chdir
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _chmod
+.set chmod,15
+
+.align 1
+_chmod:
+ .word 0x0000
+ chmk $chmod
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _chown
+.set chown,16
+
+.align 1
+_chown:
+ .word 0x0000
+ chmk $chown
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _close
+.set close,6
+
+.align 1
+_close:
+ .word 0x0000
+ chmk $close
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _creat
+.set creat,8
+
+.align 1
+_creat:
+ .word 0x0000
+ chmk $creat
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _dup
+.globl _dup2
+.set dup,41
+
+.align 1
+_dup:
+ .word 0x0000
+ brb 1f
+
+.align 1
+_dup2:
+ .word 0x0000
+ bisb2 $0100,4(ap)
+1:
+ chmk $dup
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl errmon
+.comm _errno,4
+
+.align 1
+errmon:
+ movl r0,_errno
+ mnegl $1,r0
+ ret
--- /dev/null
+.globl _execl
+.globl _environ
+
+.align 1
+_execl:
+ .word 0x0000
+ pushl _environ
+ pushab 8(ap)
+ pushl 4(ap)
+ calls $3,_execve
+ ret
--- /dev/null
+.globl _execle
+
+.align 1
+_execle:
+ .word 0x0000
+ movl (ap),r0
+ pushl (ap)[r0]
+ pushab 8(ap)
+ pushl 4(ap)
+ calls $3,_execve
+ ret
--- /dev/null
+.globl _execv
+.globl _environ
+
+.align 1
+_execv:
+ .word 0x0000
+ pushl _environ
+ pushl 8(ap)
+ pushl 4(ap)
+ calls $3,_execve
+ ret
--- /dev/null
+.globl _execve
+.set exec,59
+
+.align 1
+_execve:
+ .word 0x0000
+ chmk $exec
+ jmp errmon
--- /dev/null
+.globl _fork
+.set fork,2
+
+.align 1
+_fork:
+ .word 0x0000
+ chmk $fork
+ bcc 1f
+ jmp errmon
+1:
+ jlbc r1,1f
+ clrl r0
+1:
+ ret
--- /dev/null
+.globl _fstat
+.set fstat,28
+
+.align 1
+_fstat:
+ .word 0x0000
+ chmk $fstat
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _ftime
+.set ftime,35
+
+.align 1
+_ftime:
+ .word 0x0000
+ chmk $ftime
+ ret
--- /dev/null
+.globl _getgid, _getegid
+.set getgid,47
+
+.align 1
+_getgid:
+ .word 0x0000
+ chmk $getgid
+ ret
+
+.align 1
+_getegid:
+ .word 0x0000
+ chmk $getgid
+ movl r1,r0
+ ret
--- /dev/null
+.globl _getpid, _getppid
+.set getpid,20
+
+.align 1
+_getpid:
+ .word 0x0000
+ chmk $getpid
+ ret
+
+.align 1
+_getppid:
+ .word 0x0000
+ chmk $getpid
+ movl r1,r0
+ ret
--- /dev/null
+.globl _getuid, _geteuid
+.set getuid,24
+
+.align 1
+_getuid:
+ .word 0x0000
+ chmk $getuid
+ ret
+
+.align 1
+_geteuid:
+ .word 0x0000
+ chmk $getuid
+ movl r1,r0
+ ret
--- /dev/null
+#include "em_abs.h"
+
+ # $Header$
+
+.globl hol0
+.globl .reghp
+.globl .trppc
+.globl .trpim
+
+ # run time startoff
+ .word 0
+ bispsw $0100 # set FU(0100)
+ movl 4(sp),r0
+ clrl -4(r0)
+ movl sp,r0
+ movl (r0)+,r1
+ movl r0,r2
+a1:
+ tstl (r0)+
+ bneq a1
+ cmpl r0,(r2)
+ blssu a2
+ tstl -(r0)
+a2:
+ pushl r0
+ pushl r2
+ pushl r1
+ movl $m1,ap
+ chmk (ap)+ # catch floating point exception
+ calls $3,_m_a_i_n
+ movl $m2,ap
+ movl r0,6(ap)
+ chmk (ap)+
+ halt
+
+ .align 1
+sig8:
+ .word 0x0000
+ pushl 8(ap)
+ movl (sp)+,ap
+ pushl tab [ap]
+ jsb .trp
+ movl $m1,ap
+ chmk (ap)+
+ ret
+
+ .data
+m1:
+ .word 48
+ .long 2
+ .long 8
+ .long sig8
+m2:
+ .word 1
+ .long 1
+ .long 0
+.reghp:
+ .long _end
+hol0:
+ .space 8
+.trppc:
+ .space 4
+.trpim:
+ .long 0
+tab:
+ .long 0
+ .long EIOVFL
+ .long EIDIVZ
+ .long EFOVFL
+ .long EFDIVZ
+ .long EFUNFL
+ .long EILLINS
+ .long EARRAY
+ .long EFOVFL
+ .long EFDIVZ
+ .long EFUNFL
--- /dev/null
+.globl _ioctl
+.set ioctl,54
+
+.align 1
+_ioctl:
+ .word 0x0000
+ chmk $ioctl
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _kill
+.set kill,37
+
+.align 1
+_kill:
+ .word 0x0000
+ chmk $kill
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _link
+.set link,9
+
+.align 1
+_link:
+ .word 0x0000
+ chmk $link
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _lseek
+.set lseek,19
+
+.align 1
+_lseek:
+ .word 0x0000
+ chmk $lseek
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _mknod
+.set mknod,14
+
+.align 1
+_mknod:
+ .word 0x0000
+ chmk $mknod
+ bcc 1f
+ jmp errmod
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _mount
+.set mount,21
+
+.align 1
+_mount:
+ .word 0x0000
+ chmk $mount
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.set mpxcall,56
+.globl _mpxcall
+
+.align 1
+_mpxcall:
+ .word 0x0000
+ chmk $mpxcall
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _nice
+.set nice,34
+
+.align 1
+_nice:
+ .word 0x0000
+ chmk $nice
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _open
+.set open,5
+
+.align 1
+_open:
+ .word 0x0000
+ chmk $open
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _pause
+.set pause,29
+
+.align 1
+_pause:
+ .word 0x0000
+ chmk $pause
+ ret
--- /dev/null
+.globl _pipe
+.set pipe,42
+
+.align 1
+_pipe:
+ .word 0x0000
+ chmk $pipe
+ bcc 1f
+ jmp errmon
+1:
+ movl 4(ap),r2
+ movl r0,(r2)+
+ movl r1,(r2)
+ clrl r0
+ ret
--- /dev/null
+.globl _profil
+.set profil,44
+
+.align 1
+_profil:
+ .word 0x0000
+ chmk $profil
+ ret
--- /dev/null
+.globl _ptrace
+.set ptrace,26
+
+.align 1
+_ptrace:
+ .word 0x0000
+ clrl _errno
+ chmk $ptrace
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _read
+.set read,3
+
+.align 1
+_read:
+ .word 0x0000
+ chmk $read
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.set break,17
+.globl _sbrk, _brk
+.globl _end
+
+.align 1
+_sbrk:
+ .word 0x0000
+ addl3 brk,4(ap),-(sp)
+ bcc 1f
+ movl $0xFFFFFFFF,(sp) # will cause an error (I hope)
+1:
+ movl brk,r3
+ calls $1,_brk
+ tstl r0
+ blss 1f
+ movl r3,r0
+1:
+ ret
+
+.align 1
+_brk:
+ .word 0x0000
+ chmk $break
+ bcc 1f
+ jmp errmon
+1:
+ movl 4(ap),brk
+ clrl r0
+ ret
+
+.data
+brk: .long _end
--- /dev/null
+.globl _setgid
+.set setgid,46
+
+.align 1
+_setgid:
+ .word 0x0000
+ chmk $setgid
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _setuid
+.set setuid,23
+
+.align 1
+_setuid:
+ .word 0x0000
+ chmk $setuid
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _signal
+.set signal,48
+
+.align 1
+_signal:
+ .word 0x0000
+ chmk $signal
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _stat
+.set stat,18
+
+.align 1
+_stat:
+ .word 0x0000
+ chmk $stat
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _stime
+.set stime,25
+
+.align 1
+_stime:
+ .word 0x0000
+ movl *4(ap),4(ap)
+ chmk $stime
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _sync
+.set sync,36
+
+.align 1
+_sync:
+ .word 0x0000
+ chmk $sync
+ ret
--- /dev/null
+.globl _syscall
+
+.align 1
+_syscall:
+ .word 0x0000
+ movl 4(ap),r0
+ subl3 $1,(ap)+,(ap)
+ chmk r0
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _time
+.set time,13
+
+.align 1
+_time:
+ .word 0x0000
+ chmk $time
+ movl 4(ap),r1
+ beql 1f
+ movl r0,(r1)
+1:
+ ret
--- /dev/null
+.globl _times
+.set times,43
+
+.align 1
+_times:
+ .word 0x0000
+ chmk $times
+ ret
--- /dev/null
+.globl _umask
+.set umask,60
+
+.align 1
+_umask:
+ .word 0x0000
+ chmk $umask
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _umount
+.set umount,22
+
+.align 1
+_umount:
+ .word 0x0000
+ chmk $umount
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _unlink
+.set unlink,10
+
+.align 1
+_unlink:
+ .word 0x0000
+ chmk $unlink
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _utime
+.set utime,30
+
+.align 1
+_utime:
+ .word 0x0000
+ chmk $utime
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.set vadvise,72
+.globl _vadvise
+
+.align 1
+_vadvise:
+ .word 0x0000
+ chmk $vadvise
+ bcc 1f
+ jmp errmon
+1:
+ clrl r0
+ ret
--- /dev/null
+.globl _vfork
+.set vfork,66
+
+.align 1
+_vfork:
+ .word 0x0000
+ movl 16(fp),r2
+ movab 1f,16(fp) # dirty. Only one process can do return,
+ # so do it before forking
+ ret
+1:
+ chmk $vfork
+ bcs 3f
+ tstl r1
+ bneq 1f
+ clrl r0
+1:
+ jmp (r2)
+3:
+ movl r0,_errno
+ mnegl $1,r0
+ jmp (r2)
--- /dev/null
+.globl _vhangup
+.set vhangup,76
+
+.align 1
+_vhangup:
+ .word 0x0000
+ chmk $vhangup
+ ret
--- /dev/null
+.globl _vlimit
+.set vlimit,77
+
+.align 1
+_vlimit:
+ .word 0x0000
+ chmk $vlimit
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _vread
+.set vread,67
+
+.align 1
+_vread:
+ .word 0x0000
+ chmk $vread
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.globl _vtimes
+.set vtimes,107
+
+.align 1
+_vtimes:
+ .word 0x0000
+ chmk $vtimes
+ ret
--- /dev/null
+.globl _vwait
+.set vwait,71
+
+.align 1
+_vwait:
+ .word 0x0000
+ chmk $vwait
+ bcc 1f
+ jmp errmon
+1:
+ tstl 4(ap)
+ beql 1f
+ movl r1,*4(ap)
+1:
+ ret
--- /dev/null
+.globl _vwrite
+.set vwrite,68
+
+.align 1
+_vwrite:
+ .word 0x0000
+ chmk $vwrite
+ bcc 1f
+ jmp errmon
+1:
+ ret
--- /dev/null
+.set wait,7
+.globl _wait
+
+.align 1
+_wait:
+ .word 0x0000
+ chmk $wait
+ bcc 1f
+ jmp errmon
+1:
+ tstl 4(ap)
+ beql 1f
+ movl r1,*4(ap)
+1:
+ ret
--- /dev/null
+.globl _write
+.set write,4
+
+.align 1
+_write:
+ .word 0x0000
+ chmk $write
+ bcc 1f
+ jmp errmon
+1:
+ ret