Adapted for use of ACK VAX assembler

This commit is contained in:
ceriel 1990-01-11 16:00:19 +00:00
parent 2eacdccc5d
commit de564c09b2
141 changed files with 1026 additions and 816 deletions

View file

@ -16,8 +16,7 @@ head_em.o: head_em.s
vax4 -I../../../h -c head_em.s vax4 -I../../../h -c head_em.s
libmon_o.a: libmon_s.a libmon_o.a: libmon_s.a
ASAR=ar ; export ASAR ;\ ASAR=aal ; export ASAR ;\
RANLIB=ranlib ; export RANLIB ;\
march . libmon_o.a march . libmon_o.a
clean: clean:

View file

@ -1,8 +1,10 @@
.globl __exit .sect .text; .sect .rom; .sect .data; .sect .bss
.set exit,1 .sect .text
.define __exit
exit = 1
.align 1 .align 1
__exit: __exit:
.word 0x0000 .data2 0x0000
chmk $exit chmk $exit
halt halt

View file

@ -1,9 +1,11 @@
.globl _access .sect .text; .sect .rom; .sect .data; .sect .bss
.set access,33 .sect .text
.define _access
access = 33
.align 1 .align 1
_access: _access:
.word 0x0000 .data2 0x0000
chmk $access chmk $access
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _acct .sect .text; .sect .rom; .sect .data; .sect .bss
.set acct,51 .sect .text
.define _acct
acct = 51
.align 1 .align 1
_acct: _acct:
.word 0x0000 .data2 0x0000
chmk $acct chmk $acct
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,8 +1,10 @@
.globl _alarm .sect .text; .sect .rom; .sect .data; .sect .bss
.set alarm,27 .sect .text
.define _alarm
alarm = 27
.align 1 .align 1
_alarm: _alarm:
.word 0x0000 .data2 0x0000
chmk $alarm chmk $alarm
ret ret

View file

@ -1,9 +1,11 @@
.globl _chdir .sect .text; .sect .rom; .sect .data; .sect .bss
.set chdir,12 .sect .text
.define _chdir
chdir = 12
.align 1 .align 1
_chdir: _chdir:
.word 0x0000 .data2 0x0000
chmk $chdir chmk $chdir
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _chmod .sect .text; .sect .rom; .sect .data; .sect .bss
.set chmod,15 .sect .text
.define _chmod
chmod = 15
.align 1 .align 1
_chmod: _chmod:
.word 0x0000 .data2 0x0000
chmk $chmod chmk $chmod
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _chown .sect .text; .sect .rom; .sect .data; .sect .bss
.set chown,16 .sect .text
.define _chown
chown = 16
.align 1 .align 1
_chown: _chown:
.word 0x0000 .data2 0x0000
chmk $chown chmk $chown
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _chroot .sect .text; .sect .rom; .sect .data; .sect .bss
.set chroot,61 .sect .text
.define _chroot
chroot = 61
.globl errmon .define errmon
_chroot: _chroot:
.word 0x0000 .data2 0x0000
chmk $chroot chmk $chroot
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _close .sect .text; .sect .rom; .sect .data; .sect .bss
.set close,6 .sect .text
.define _close
close = 6
.align 1 .align 1
_close: _close:
.word 0x0000 .data2 0x0000
chmk $close chmk $close
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _creat .sect .text; .sect .rom; .sect .data; .sect .bss
.set creat,8 .sect .text
.define _creat
creat = 8
.align 1 .align 1
_creat: _creat:
.word 0x0000 .data2 0x0000
chmk $creat chmk $creat
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,15 +1,17 @@
.globl _dup .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _dup2 .sect .text
.set dup,41 .define _dup
.define _dup2
dup = 41
.align 1 .align 1
_dup: _dup:
.word 0x0000 .data2 0x0000
brb 1f brb 1f
.align 1 .align 1
_dup2: _dup2:
.word 0x0000 .data2 0x0000
bisb2 $0100,4(ap) bisb2 $0100,4(ap)
1: 1:
chmk $dup chmk $dup

View file

@ -1,4 +1,6 @@
.globl errmon .sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define errmon
.comm _errno,4 .comm _errno,4
.align 1 .align 1

View file

@ -1,9 +1,11 @@
.globl _execl .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _environ .sect .text
.define _execl
.define _environ
.align 1 .align 1
_execl: _execl:
.word 0x0000 .data2 0x0000
pushl _environ pushl _environ
pushab 8(ap) pushab 8(ap)
pushl 4(ap) pushl 4(ap)

View file

@ -1,8 +1,10 @@
.globl _execle .sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define _execle
.align 1 .align 1
_execle: _execle:
.word 0x0000 .data2 0x0000
movl (ap),r0 movl (ap),r0
pushl (ap)[r0] pushl (ap)[r0]
pushab 8(ap) pushab 8(ap)

View file

@ -1,9 +1,11 @@
.globl _execv .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _environ .sect .text
.define _execv
.define _environ
.align 1 .align 1
_execv: _execv:
.word 0x0000 .data2 0x0000
pushl _environ pushl _environ
pushl 8(ap) pushl 8(ap)
pushl 4(ap) pushl 4(ap)

View file

@ -1,8 +1,10 @@
.globl _execve .sect .text; .sect .rom; .sect .data; .sect .bss
.set exec,59 .sect .text
.define _execve
exec = 59
.align 1 .align 1
_execve: _execve:
.word 0x0000 .data2 0x0000
chmk $exec chmk $exec
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _fork .sect .text; .sect .rom; .sect .data; .sect .bss
.set fork,2 .sect .text
.define _fork
fork = 2
.align 1 .align 1
_fork: _fork:
.word 0x0000 .data2 0x0000
chmk $fork chmk $fork
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _fstat .sect .text; .sect .rom; .sect .data; .sect .bss
.set fstat,28 .sect .text
.define _fstat
fstat = 28
.align 1 .align 1
_fstat: _fstat:
.word 0x0000 .data2 0x0000
chmk $fstat chmk $fstat
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,8 +1,10 @@
.globl _ftime .sect .text; .sect .rom; .sect .data; .sect .bss
.set ftime,35 .sect .text
.define _ftime
ftime = 35
.align 1 .align 1
_ftime: _ftime:
.word 0x0000 .data2 0x0000
chmk $ftime chmk $ftime
ret ret

View file

@ -1,16 +1,18 @@
.globl _getgid .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getegid .sect .text
.set getgid,47 .define _getgid
.define _getegid
getgid = 47
.align 1 .align 1
_getgid: _getgid:
.word 0x0000 .data2 0x0000
chmk $getgid chmk $getgid
ret ret
.align 1 .align 1
_getegid: _getegid:
.word 0x0000 .data2 0x0000
chmk $getgid chmk $getgid
movl r1,r0 movl r1,r0
ret ret

View file

@ -1,16 +1,18 @@
.globl _getpid .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getppid .sect .text
.set getpid,20 .define _getpid
.define _getppid
getpid = 20
.align 1 .align 1
_getpid: _getpid:
.word 0x0000 .data2 0x0000
chmk $getpid chmk $getpid
ret ret
.align 1 .align 1
_getppid: _getppid:
.word 0x0000 .data2 0x0000
chmk $getpid chmk $getpid
movl r1,r0 movl r1,r0
ret ret

View file

@ -1,16 +1,18 @@
.globl _getuid .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _geteuid .sect .text
.set getuid,24 .define _getuid
.define _geteuid
getuid = 24
.align 1 .align 1
_getuid: _getuid:
.word 0x0000 .data2 0x0000
chmk $getuid chmk $getuid
ret ret
.align 1 .align 1
_geteuid: _geteuid:
.word 0x0000 .data2 0x0000
chmk $getuid chmk $getuid
movl r1,r0 movl r1,r0
ret ret

View file

@ -1,76 +1,81 @@
#include "em_abs.h" #include "em_abs.h"
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
# $Header$ ! $Header$
.globl hol0 .define hol0
.globl .reghp .define .reghp
.globl .trppc .define .trppc
.globl .trpim .define .trpim
# run time startoff ! run time startoff
.word 0 .data2 0
bispsw $0100 # set FU(0100) bispsw $0100 ! set FU(0100)
movl 4(sp),r0 movl 4(sp),r0
clrl -4(r0) clrl -4(r0)
movl sp,r0 movl sp,r0
movl (r0)+,r1 movl (r0)+,r1
movl r0,r2 movl r0,r2
a1: 1:
tstl (r0)+ tstl (r0)+
bneq a1 bneq 1b
cmpl r0,(r2) cmpl r0,(r2)
blssu a2 blssu 2f
tstl -(r0) tstl -(r0)
a2: 2:
pushl r0 pushl r0
pushl r2 pushl r2
pushl r1 pushl r1
movl $m1,ap movl $Im1,ap
chmk (ap)+ # catch floating point exception chmk (ap)+ ! catch floating point exception
calls $3,_m_a_i_n calls $3,_m_a_i_n
movl $m2,ap movl $Im2,ap
movl r0,6(ap) movl r0,6(ap)
chmk (ap)+ chmk (ap)+
halt halt
.align 1 .align 1
sig8: Isig8:
.word 0x0000 .data2 0x0000
pushl 8(ap) pushl 8(ap)
movl (sp)+,ap movl (sp)+,ap
pushl tab [ap] pushl Itab [ap]
jsb .trp jsb .trp
movl $m1,ap movl $Im1,ap
chmk (ap)+ chmk (ap)+
ret ret
.data .sect .rom
m1: Im1:
.word 48 .data2 48
.long 2 .data4 2
.long 8 .data4 8
.long sig8 .data4 Isig8
m2:
.word 1 Itab:
.long 1 .data4 0
.long 0 .data4 EIOVFL
.data4 EIDIVZ
.data4 EFOVFL
.data4 EFDIVZ
.data4 EFUNFL
.data4 EILLINS
.data4 EARRAY
.data4 EFOVFL
.data4 EFDIVZ
.data4 EFUNFL
.sect .data
Im2:
.data2 1
.data4 1
.data4 0
.reghp: .reghp:
.long _end .data4 _end
hol0: hol0:
.space 8 .space 8
.trppc: .trppc:
.space 4 .space 4
.trpim: .trpim:
.long 0 .data4 0
tab:
.long 0
.long EIOVFL
.long EIDIVZ
.long EFOVFL
.long EFDIVZ
.long EFUNFL
.long EILLINS
.long EARRAY
.long EFOVFL
.long EFDIVZ
.long EFUNFL

View file

@ -1,9 +1,11 @@
.globl _ioctl .sect .text; .sect .rom; .sect .data; .sect .bss
.set ioctl,54 .sect .text
.define _ioctl
ioctl = 54
.align 1 .align 1
_ioctl: _ioctl:
.word 0x0000 .data2 0x0000
chmk $ioctl chmk $ioctl
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _kill .sect .text; .sect .rom; .sect .data; .sect .bss
.set kill,37 .sect .text
.define _kill
kill = 37
.align 1 .align 1
_kill: _kill:
.word 0x0000 .data2 0x0000
chmk $kill chmk $kill
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _link .sect .text; .sect .rom; .sect .data; .sect .bss
.set link,9 .sect .text
.define _link
link = 9
.align 1 .align 1
_link: _link:
.word 0x0000 .data2 0x0000
chmk $link chmk $link
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _lseek .sect .text; .sect .rom; .sect .data; .sect .bss
.set lseek,19 .sect .text
.define _lseek
lseek = 19
.align 1 .align 1
_lseek: _lseek:
.word 0x0000 .data2 0x0000
chmk $lseek chmk $lseek
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _mknod .sect .text; .sect .rom; .sect .data; .sect .bss
.set mknod,14 .sect .text
.define _mknod
mknod = 14
.align 1 .align 1
_mknod: _mknod:
.word 0x0000 .data2 0x0000
chmk $mknod chmk $mknod
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _mount .sect .text; .sect .rom; .sect .data; .sect .bss
.set mount,21 .sect .text
.define _mount
mount = 21
.align 1 .align 1
_mount: _mount:
.word 0x0000 .data2 0x0000
chmk $mount chmk $mount
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.set mpxcall,56 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _mpxcall .sect .text
mpxcall = 56
.define _mpxcall
.align 1 .align 1
_mpxcall: _mpxcall:
.word 0x0000 .data2 0x0000
chmk $mpxcall chmk $mpxcall
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _nice .sect .text; .sect .rom; .sect .data; .sect .bss
.set nice,34 .sect .text
.define _nice
nice = 34
.align 1 .align 1
_nice: _nice:
.word 0x0000 .data2 0x0000
chmk $nice chmk $nice
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _open .sect .text; .sect .rom; .sect .data; .sect .bss
.set open,5 .sect .text
.define _open
open = 5
.align 1 .align 1
_open: _open:
.word 0x0000 .data2 0x0000
chmk $open chmk $open
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,8 +1,10 @@
.globl _pause .sect .text; .sect .rom; .sect .data; .sect .bss
.set pause,29 .sect .text
.define _pause
pause = 29
.align 1 .align 1
_pause: _pause:
.word 0x0000 .data2 0x0000
chmk $pause chmk $pause
ret ret

View file

@ -1,9 +1,11 @@
.globl _pipe .sect .text; .sect .rom; .sect .data; .sect .bss
.set pipe,42 .sect .text
.define _pipe
pipe = 42
.align 1 .align 1
_pipe: _pipe:
.word 0x0000 .data2 0x0000
chmk $pipe chmk $pipe
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,8 +1,10 @@
.globl _profil .sect .text; .sect .rom; .sect .data; .sect .bss
.set profil,44 .sect .text
.define _profil
profil = 44
.align 1 .align 1
_profil: _profil:
.word 0x0000 .data2 0x0000
chmk $profil chmk $profil
ret ret

View file

@ -1,9 +1,11 @@
.globl _ptrace .sect .text; .sect .rom; .sect .data; .sect .bss
.set ptrace,26 .sect .text
.define _ptrace
ptrace = 26
.align 1 .align 1
_ptrace: _ptrace:
.word 0x0000 .data2 0x0000
clrl _errno clrl _errno
chmk $ptrace chmk $ptrace
bcc 1f bcc 1f

View file

@ -1,9 +1,11 @@
.globl _read .sect .text; .sect .rom; .sect .data; .sect .bss
.set read,3 .sect .text
.define _read
read = 3
.align 1 .align 1
_read: _read:
.word 0x0000 .data2 0x0000
chmk $read chmk $read
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,16 +1,18 @@
.set break,17 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _sbrk .sect .text
.globl _brk break = 17
.globl _end .define _sbrk
.define _brk
.define _end
.align 1 .align 1
_sbrk: _sbrk:
.word 0x0000 .data2 0x0000
addl3 brk,4(ap),-(sp) addl3 Ibrk,4(ap),-(sp)
bcc 1f bcc 1f
movl $0xFFFFFFFF,(sp) # will cause an error (I hope) movl $0xFFFFFFFF,(sp) ! will cause an error (I hope)
1: 1:
movl brk,r3 movl Ibrk,r3
calls $1,_brk calls $1,_brk
tstl r0 tstl r0
blss 1f blss 1f
@ -20,14 +22,14 @@ _sbrk:
.align 1 .align 1
_brk: _brk:
.word 0x0000 .data2 0x0000
chmk $break chmk $break
bcc 1f bcc 1f
jmp errmon jmp errmon
1: 1:
movl 4(ap),brk movl 4(ap),Ibrk
clrl r0 clrl r0
ret ret
.data .sect .data
brk: .long _end Ibrk: .data4 _end

View file

@ -1,9 +1,11 @@
.globl _setgid .sect .text; .sect .rom; .sect .data; .sect .bss
.set setgid,46 .sect .text
.define _setgid
setgid = 46
.align 1 .align 1
_setgid: _setgid:
.word 0x0000 .data2 0x0000
chmk $setgid chmk $setgid
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _setuid .sect .text; .sect .rom; .sect .data; .sect .bss
.set setuid,23 .sect .text
.define _setuid
setuid = 23
.align 1 .align 1
_setuid: _setuid:
.word 0x0000 .data2 0x0000
chmk $setuid chmk $setuid
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _signal .sect .text; .sect .rom; .sect .data; .sect .bss
.set signal,48 .sect .text
.define _signal
signal = 48
.align 1 .align 1
_signal: _signal:
.word 0x0000 .data2 0x0000
chmk $signal chmk $signal
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _stat .sect .text; .sect .rom; .sect .data; .sect .bss
.set stat,18 .sect .text
.define _stat
stat = 18
.align 1 .align 1
_stat: _stat:
.word 0x0000 .data2 0x0000
chmk $stat chmk $stat
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _stime .sect .text; .sect .rom; .sect .data; .sect .bss
.set stime,25 .sect .text
.define _stime
stime = 25
.align 1 .align 1
_stime: _stime:
.word 0x0000 .data2 0x0000
movl *4(ap),4(ap) movl *4(ap),4(ap)
chmk $stime chmk $stime
bcc 1f bcc 1f

View file

@ -1,8 +1,10 @@
.globl _sync .sect .text; .sect .rom; .sect .data; .sect .bss
.set sync,36 .sect .text
.define _sync
sync = 36
.align 1 .align 1
_sync: _sync:
.word 0x0000 .data2 0x0000
chmk $sync chmk $sync
ret ret

View file

@ -1,8 +1,10 @@
.globl _syscall .sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define _syscall
.align 1 .align 1
_syscall: _syscall:
.word 0x0000 .data2 0x0000
movl 4(ap),r0 movl 4(ap),r0
subl3 $1,(ap)+,(ap) subl3 $1,(ap)+,(ap)
chmk r0 chmk r0

View file

@ -1,9 +1,11 @@
.globl _time .sect .text; .sect .rom; .sect .data; .sect .bss
.set time,13 .sect .text
.define _time
time = 13
.align 1 .align 1
_time: _time:
.word 0x0000 .data2 0x0000
chmk $time chmk $time
movl 4(ap),r1 movl 4(ap),r1
beql 1f beql 1f

View file

@ -1,8 +1,10 @@
.globl _times .sect .text; .sect .rom; .sect .data; .sect .bss
.set times,43 .sect .text
.define _times
times = 43
.align 1 .align 1
_times: _times:
.word 0x0000 .data2 0x0000
chmk $times chmk $times
ret ret

View file

@ -1,9 +1,11 @@
.globl _umask .sect .text; .sect .rom; .sect .data; .sect .bss
.set umask,60 .sect .text
.define _umask
umask = 60
.align 1 .align 1
_umask: _umask:
.word 0x0000 .data2 0x0000
chmk $umask chmk $umask
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _umount .sect .text; .sect .rom; .sect .data; .sect .bss
.set umount,22 .sect .text
.define _umount
umount = 22
.align 1 .align 1
_umount: _umount:
.word 0x0000 .data2 0x0000
chmk $umount chmk $umount
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _unlink .sect .text; .sect .rom; .sect .data; .sect .bss
.set unlink,10 .sect .text
.define _unlink
unlink = 10
.align 1 .align 1
_unlink: _unlink:
.word 0x0000 .data2 0x0000
chmk $unlink chmk $unlink
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _utime .sect .text; .sect .rom; .sect .data; .sect .bss
.set utime,30 .sect .text
.define _utime
utime = 30
.align 1 .align 1
_utime: _utime:
.word 0x0000 .data2 0x0000
chmk $utime chmk $utime
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.set vadvise,72 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _vadvise .sect .text
vadvise = 72
.define _vadvise
.align 1 .align 1
_vadvise: _vadvise:
.word 0x0000 .data2 0x0000
chmk $vadvise chmk $vadvise
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,12 +1,14 @@
.globl _vfork .sect .text; .sect .rom; .sect .data; .sect .bss
.set vfork,66 .sect .text
.define _vfork
vfork = 66
.align 1 .align 1
_vfork: _vfork:
.word 0x0000 .data2 0x0000
movl 16(fp),r2 movl 16(fp),r2
movab 1f,16(fp) # dirty. Only one process can do return, movab 1f,16(fp) ! dirty. Only one process can do return,
# so do it before forking ! so do it before forking
ret ret
1: 1:
chmk $vfork chmk $vfork

View file

@ -1,8 +1,10 @@
.globl _vhangup .sect .text; .sect .rom; .sect .data; .sect .bss
.set vhangup,76 .sect .text
.define _vhangup
vhangup = 76
.align 1 .align 1
_vhangup: _vhangup:
.word 0x0000 .data2 0x0000
chmk $vhangup chmk $vhangup
ret ret

View file

@ -1,9 +1,11 @@
.globl _vlimit .sect .text; .sect .rom; .sect .data; .sect .bss
.set vlimit,77 .sect .text
.define _vlimit
vlimit = 77
.align 1 .align 1
_vlimit: _vlimit:
.word 0x0000 .data2 0x0000
chmk $vlimit chmk $vlimit
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _vread .sect .text; .sect .rom; .sect .data; .sect .bss
.set vread,67 .sect .text
.define _vread
vread = 67
.align 1 .align 1
_vread: _vread:
.word 0x0000 .data2 0x0000
chmk $vread chmk $vread
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,8 +1,10 @@
.globl _vtimes .sect .text; .sect .rom; .sect .data; .sect .bss
.set vtimes,107 .sect .text
.define _vtimes
vtimes = 107
.align 1 .align 1
_vtimes: _vtimes:
.word 0x0000 .data2 0x0000
chmk $vtimes chmk $vtimes
ret ret

View file

@ -1,9 +1,11 @@
.globl _vwait .sect .text; .sect .rom; .sect .data; .sect .bss
.set vwait,71 .sect .text
.define _vwait
vwait = 71
.align 1 .align 1
_vwait: _vwait:
.word 0x0000 .data2 0x0000
chmk $vwait chmk $vwait
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _vwrite .sect .text; .sect .rom; .sect .data; .sect .bss
.set vwrite,68 .sect .text
.define _vwrite
vwrite = 68
.align 1 .align 1
_vwrite: _vwrite:
.word 0x0000 .data2 0x0000
chmk $vwrite chmk $vwrite
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.set wait,7 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _wait .sect .text
wait = 7
.define _wait
.align 1 .align 1
_wait: _wait:
.word 0x0000 .data2 0x0000
chmk $wait chmk $wait
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -1,9 +1,11 @@
.globl _write .sect .text; .sect .rom; .sect .data; .sect .bss
.set write,4 .sect .text
.define _write
write = 4
.align 1 .align 1
_write: _write:
.word 0x0000 .data2 0x0000
chmk $write chmk $write
bcc 1f bcc 1f
jmp errmon jmp errmon

View file

@ -17,8 +17,7 @@ head_em: head_em.s
vax4 -I../../../h -c head_em.s ; mv head_em.o head_em vax4 -I../../../h -c head_em.s ; mv head_em.o head_em
tail_mon: tail_mon:
ASAR=ar ; export ASAR ;\ ASAR=aal ; export ASAR ;\
RANLIB=ranlib ; export RANLIB ;\
march . tail_mon march . tail_mon
clean: clean:

View file

@ -1,29 +1,29 @@
#include "syscall.h" #include "syscall.h"
.globl _end .extern _end
DEFINE(_brk) DEFINE(_brk)
cmpl 4(ap),min cmpl 4(ap),Imin
bgeq ok bgeq Iok
movl min,4(ap) movl Imin,4(ap)
ok: Iok:
chmk $17 chmk $17
bcs err bcs Ierr
movl 4(ap),cur movl 4(ap),Icur
clrl r0 clrl r0
ret ret
err: Ierr:
jmp cerror jmp cerror
DEFINE(_sbrk) DEFINE(_sbrk)
addl3 cur,4(ap),-(sp) addl3 cur,4(ap),-(sp)
bcs err bcs Ierr
pushl $1 pushl $1
movl ap,r3 movl ap,r3
movl sp,ap movl sp,ap
chmk $17 chmk $17
bcs err bcs Ierr
movl cur,r0 movl Icur,r0
addl2 4(r3),cur addl2 4(r3),Icur
ret ret
.data .sect .data
min: .long _end Imin: .data4 _end
cur: .long _end Icur: .data4 _end

View file

@ -1,8 +1,9 @@
.globl _errno .sect .text; .sect .rom; .sect .data; .sect .bss
.globl cerror .sect .text
.define _errno
.define cerror
.comm _errno, 4 .comm _errno, 4
cerror: cerror:
movl r0,_errno movl r0,_errno
mnegl $1,r0 mnegl $1,r0
ret ret

View file

@ -1,5 +1,5 @@
#include "syscall.h" #include "syscall.h"
.globl _environ .extern _environ
DEFINE(_execl) DEFINE(_execl)
pushl _environ pushl _environ
pushab 8(ap) pushab 8(ap)

View file

@ -1,5 +1,5 @@
#include "syscall.h" #include "syscall.h"
.globl _environ .extern _environ
DEFINE(_execv) DEFINE(_execv)
pushl _environ pushl _environ
pushl 8(ap) pushl 8(ap)

View file

@ -1,10 +1,10 @@
#include "syscall.h" #include "syscall.h"
DEFINE(_fork) DEFINE(_fork)
chmk $SYS_fork chmk $SYS_fork
bcs err bcs Ierr
jlbc r1,parent blbc r1,Iparent
clrl r0 clrl r0
parent: Iparent:
ret ret
err: Ierr:
jmp cerror jmp cerror

View file

@ -1,103 +1,104 @@
#include "em_abs.h" #include "em_abs.h"
#include "syscall.h" #include "syscall.h"
# $Header$ ! $Header$
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define hol0
.define .reghp
.define .trppc
.define .trpim
.globl hol0 ! run time startoff
.globl .reghp .data2 0
.globl .trppc bispsw $0100 ! set FU(0100)
.globl .trpim
# run time startoff
.word 0
bispsw $0100 # set FU(0100)
movl 4(sp),r0 movl 4(sp),r0
clrl -4(r0) clrl -4(r0)
movl sp,r0 movl sp,r0
movl (r0)+,r1 movl (r0)+,r1
movl r0,r2 movl r0,r2
a1: 1:
tstl (r0)+ tstl (r0)+
bneq a1 bneq 1b
cmpl r0,(r2) cmpl r0,(r2)
blssu a2 blssu 2f
tstl -(r0) tstl -(r0)
a2: 2:
pushl r0 pushl r0
pushl r2 pushl r2
pushl r1 pushl r1
movl $m1,ap movl $Im1,ap
chmk (ap)+ # catch floating point exception chmk (ap)+ ! catch floating point exception
calls $3,_m_a_i_n calls $3,_m_a_i_n
movl $m2,ap movl $Im2,ap
movl r0,6(ap) movl r0,6(ap)
chmk (ap)+ chmk (ap)+
halt halt
.align 1 .align 1
sig8: Isig8:
.word 0x0000 .data2 0x0000
pushl 8(ap) pushl 8(ap)
movl $m3,ap movl $Im3,ap
chmk (ap)+ # restore default handler chmk (ap)+ ! restore default handler
movl $m5,ap movl $Im5,ap
chmk (ap)+ # get current signal mask chmk (ap)+ ! get current signal mask
bicl3 $0x80,r0,m4+6 # and remove the 8th bit bicl3 $0x80,r0,Im4+6 ! and remove the 8th bit
movl $m4,ap movl $Im4,ap
chmk (ap)+ # and chmk (ap)+ ! and
movl (sp)+,ap movl (sp)+,ap
pushl tab [ap] pushl Itab [ap]
jsb .trp jsb .trp
movl $m1,ap movl $Im1,ap
chmk (ap)+ chmk (ap)+
ret ret
.data .sect .data
m1: Im1:
.word SYS_sigvec .data2 SYS_sigvec
.long 3 .data4 3
.long 8 .data4 8
.long m1a .data4 Im1a
.long 0 .data4 0
m3: Im3:
.word SYS_sigvec .data2 SYS_sigvec
.long 3 .data4 3
.long 8 .data4 8
.long 0 .data4 0
.long 0 .data4 0
m4: Im4:
.word SYS_sigsetmask .data2 SYS_sigsetmask
.long 1 .data4 1
.long 0 .data4 0
m5: Im5:
.word SYS_sigblock .data2 SYS_sigblock
.long 1 .data4 1
.long 0 .data4 0
m1a: Im1a:
.long sig8 .data4 Isig8
.long 0 .data4 0
.long 0 .data4 0
m2: Im2:
.word 1 .data2 1
.long 1 .data4 1
.long 0 .data4 0
.reghp: .reghp:
.long _end .data4 _end
hol0: hol0:
.space 8 .space 8
.trppc: .trppc:
.space 4 .space 4
.trpim: .trpim:
.long 0 .data4 0
tab: Itab:
.long 0 .data4 0
.long EIOVFL .data4 EIOVFL
.long EIDIVZ .data4 EIDIVZ
.long EFOVFL .data4 EFOVFL
.long EFDIVZ .data4 EFDIVZ
.long EFUNFL .data4 EFUNFL
.long EILLINS .data4 EILLINS
.long EARRAY .data4 EARRAY
.long EFOVFL .data4 EFOVFL
.long EFDIVZ .data4 EFDIVZ
.long EFUNFL .data4 EFUNFL

View file

@ -3,9 +3,9 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright". * See the copyright notice in the ACK home directory, in the file "Copyright".
*/ */
#define DEFINE(sysn) .globl sysn; .align 1; sysn: .word 0 #define DEFINE(sysn) .define sysn; .align 1; sysn: .data2 0
#define SYSTEM(sys) chmk $sys; bcs err; ret; err: jmp cerror #define SYSTEM(sys) chmk $sys; bcs Ierr; ret; Ierr: jmp cerror
#define SYSNORET(sys) chmk $sys; bcc ok; jmp cerror; ok: #define SYSNORET(sys) chmk $sys; bcc Iok; jmp cerror; Iok:
#define SYS_exit 1 #define SYS_exit 1
#define SYS_fork 2 #define SYS_fork 2
#define SYS_read 3 #define SYS_read 3
@ -122,3 +122,6 @@
#define SYS_quota 149 #define SYS_quota 149
#define SYS_getsockname 150 #define SYS_getsockname 150
#define SYS_getdirentries 156 #define SYS_getdirentries 156
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text

View file

@ -3,7 +3,7 @@ DEFINE(_syscall)
movl 4(ap),r0 movl 4(ap),r0
subl3 $1,(ap)+,(ap) subl3 $1,(ap)+,(ap)
chmk r0 chmk r0
bcs err bcs Ierr
ret ret
err: Ierr:
jmp cerror jmp cerror

View file

@ -1,17 +1,17 @@
#include "syscall.h" #include "syscall.h"
DEFINE(_vfork) DEFINE(_vfork)
movl 16(fp),r2 movl 16(fp),r2
movab newret,16(fp) movab Inewret,16(fp)
ret # cleans stack ret ! cleans stack
newret: Inewret:
chmk $SYS_vfork chmk $SYS_vfork
bcs err bcs Ierr
tstl r1 tstl r1
beql parent beql Iparent
clrl r0 clrl r0
parent: Iparent:
jmp (r2) jmp (r2)
err: Ierr:
movl r0,_errno movl r0,_errno
mnegl $1,r0 mnegl $1,r0
jmp (r2) jmp (r2)

View file

@ -2,7 +2,7 @@
DEFINE(_wait) DEFINE(_wait)
SYSNORET(SYS_wait) SYSNORET(SYS_wait)
tstl 4(ap) tstl 4(ap)
beql out beql Iout
movl r1,*4(ap) movl r1,*4(ap)
out: Iout:
ret ret

View file

@ -4,11 +4,11 @@ DEFINE(_wait3)
movl 12(ap),r1 movl 12(ap),r1
bispsw $0xf bispsw $0xf
chmk $SYS_wait chmk $SYS_wait
bcs err bcs Ierr
tstl 4(ap) tstl 4(ap)
beql out beql Iout
movl r1,*4(ap) movl r1,*4(ap)
out: Iout:
ret ret
err: Ierr:
jmp cerror jmp cerror

View file

@ -16,8 +16,7 @@ head_em.o: head_em.s
vax4 -I../../../h -c head_em.s vax4 -I../../../h -c head_em.s
libmon_o.a: libmon_s.a libmon_o.a: libmon_s.a
ASAR=ar ; export ASAR ;\ ASAR=aal ; export ASAR ;\
RANLIB=ranlib ; export RANLIB ;\
march . libmon_o.a march . libmon_o.a
clean: clean:

View file

@ -1,7 +1,9 @@
.set exit,1 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl __exit .sect .text
exit = 1
.define __exit
__exit: __exit:
.word 0x0000 .data2 0x0000
chmk $exit chmk $exit
halt halt

View file

@ -1,11 +1,13 @@
.set access,33 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _access .sect .text
.globl cerror access = 33
.define _access
.define cerror
_access: _access:
.word 0x0000 .data2 0x0000
chmk $access chmk $access
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
ret ret

View file

@ -1,11 +1,13 @@
.set acct,51 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _acct .sect .text
.globl cerror acct = 51
.define _acct
.define cerror
_acct: _acct:
.word 0x0000 .data2 0x0000
chmk $acct chmk $acct
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
ret ret

View file

@ -1,7 +1,9 @@
.set alarm,27 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _alarm .sect .text
alarm = 27
.define _alarm
_alarm: _alarm:
.word 0x0000 .data2 0x0000
chmk $alarm chmk $alarm
ret ret

View file

@ -1,10 +1,12 @@
.globl cerror .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _errno .sect .text
.define cerror
.define _errno
.data .sect .bss
_errno: .long 0 .comm _errno, 4
.text .sect .text
cerror: cerror:
movl r0,_errno movl r0,_errno
mnegl $1,r0 mnegl $1,r0

View file

@ -1,12 +1,14 @@
.set chdir,12 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _chdir .sect .text
.globl cerror chdir = 12
.define _chdir
.define cerror
_chdir: _chdir:
.word 0x0000 .data2 0x0000
chmk $chdir chmk $chdir
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
clrl r0 clrl r0
ret ret

View file

@ -1,12 +1,13 @@
.set chmod,15 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _chmod .sect .text
.globl cerror chmod = 15
.define _chmod
_chmod: _chmod:
.word 0x0000 .data2 0x0000
chmk $chmod chmk $chmod
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
clrl r0 clrl r0
ret ret

View file

@ -1,12 +1,13 @@
.set chown,16 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _chown .sect .text
.globl cerror chown = 16
.define _chown
_chown: _chown:
.word 0x0000 .data2 0x0000
chmk $chown chmk $chown
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
clrl r0 clrl r0
ret ret

View file

@ -1,11 +1,12 @@
.set chroot,61 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _chroot .sect .text
.globl cerror chroot = 61
.define _chroot
_chroot: _chroot:
.word 0x0000 .data2 0x0000
chmk $chroot chmk $chroot
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
ret ret

View file

@ -1,12 +1,13 @@
.set close,6 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _close .sect .text
.globl cerror close = 6
.define _close
_close: _close:
.word 0x0000 .data2 0x0000
chmk $close chmk $close
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
clrl r0 clrl r0
ret ret

View file

@ -1,11 +1,12 @@
.set creat,8 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _creat .sect .text
.globl cerror creat = 8
.define _creat
_creat: _creat:
.word 0x0000 .data2 0x0000
chmk $creat chmk $creat
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
ret ret

View file

@ -1,11 +1,12 @@
.set dup,41 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _dup .sect .text
.globl cerror dup = 41
.define _dup
_dup: _dup:
.word 0x0000 .data2 0x0000
chmk $dup chmk $dup
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
ret ret

View file

@ -1,8 +1,9 @@
.globl _execl .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _execv .sect .text
.define _execl
_execl: _execl:
.word 0x0000 .data2 0x0000
pushab 8(ap) pushab 8(ap)
pushl 4(ap) pushl 4(ap)
calls $2,_execv calls $2,_execv

View file

@ -1,8 +1,9 @@
.globl _execle .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _execve .sect .text
.define _execle
_execle: _execle:
.word 0x0000 .data2 0x0000
movl (ap),r0 movl (ap),r0
pushl (ap)[r0] pushl (ap)[r0]
pushab 8(ap) pushab 8(ap)

View file

@ -1,9 +1,9 @@
.globl _execv .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _execve .sect .text
.globl _environ .define _execv
_execv: _execv:
.word 0x0000 .data2 0x0000
pushl _environ pushl _environ
pushl 8(ap) pushl 8(ap)
pushl 4(ap) pushl 4(ap)

View file

@ -1,8 +1,9 @@
.set exece,59 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _execve .sect .text
.globl cerror exece = 59
.define _execve
_execve: _execve:
.word 0x0000 .data2 0x0000
chmk $exece chmk $exece
jmp cerror jmp cerror

View file

@ -1,11 +1,12 @@
.set fcntl,62 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _fcntl .sect .text
.globl cerror fcntl = 62
.define _fcntl
_fcntl: _fcntl:
.word 0x0000 .data2 0x0000
chmk $fcntl chmk $fcntl
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
ret ret

View file

@ -1,14 +1,15 @@
.set fork,2 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _fork .sect .text
.globl cerror fork = 2
.define _fork
_fork: _fork:
.word 0x0000 .data2 0x0000
chmk $fork chmk $fork
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
blbc r1,out blbc r1,1f
clrl r0 clrl r0
out: 1:
ret ret

View file

@ -1,12 +1,13 @@
.set fstat,28 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _fstat .sect .text
.globl cerror fstat = 28
.define _fstat
_fstat: _fstat:
.word 0x0000 .data2 0x0000
chmk $fstat chmk $fstat
bcc ok bcc 1f
jmp cerror jmp cerror
ok: 1:
clrl r0 clrl r0
ret ret

View file

@ -1,8 +1,10 @@
.set getgid,47 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getegid .sect .text
getgid = 47
.define _getegid
_getegid: _getegid:
.word 0x0000 .data2 0x0000
chmk $getgid chmk $getgid
movl r1,r0 movl r1,r0
ret ret

View file

@ -1,8 +1,10 @@
.set getuid,24 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _geteuid .sect .text
getuid = 24
.define _geteuid
_geteuid: _geteuid:
.word 0x0000 .data2 0x0000
chmk $getuid chmk $getuid
movl r1,r0 movl r1,r0
ret ret

View file

@ -1,7 +1,9 @@
.set getgid,47 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getgid .sect .text
getgid = 47
.define _getgid
_getgid: _getgid:
.word 0x0000 .data2 0x0000
chmk $getgid chmk $getgid
ret ret

View file

@ -1,7 +1,9 @@
.set getpid,20 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getpid .sect .text
getpid = 20
.define _getpid
_getpid: _getpid:
.word 0x0000 .data2 0x0000
chmk $getpid chmk $getpid
ret ret

View file

@ -1,8 +1,10 @@
.set getpid,20 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getppid .sect .text
getpid = 20
.define _getppid
_getppid: _getppid:
.word 0x0000 .data2 0x0000
chmk $getpid chmk $getpid
movl r1,r0 movl r1,r0
ret ret

View file

@ -1,7 +1,9 @@
.set getuid,24 .sect .text; .sect .rom; .sect .data; .sect .bss
.globl _getuid .sect .text
getuid = 24
.define _getuid
_getuid: _getuid:
.word 0x0000 .data2 0x0000
chmk $getuid chmk $getuid
ret ret

Some files were not shown because too many files have changed in this diff Show more