converted to ACK assembler format

This commit is contained in:
ceriel 1987-05-14 17:45:41 +00:00
parent 680e0c347c
commit 7abf78f452
81 changed files with 553 additions and 504 deletions

View file

@ -10,7 +10,7 @@ cmp: all
-../../compare libmon_o.a tail_mon
libmon_o.a: libmon_s.a
ASAR=ar ; export ASAR ;\
ASAR=aal ; export ASAR ;\
march . libmon_o.a
clean:

View file

@ -1,5 +1,5 @@
#include "sys.h"
.globl __exit
.define __exit
__exit:
mov 2(sp),r0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _access
.globl _errno
.define _access
.extern _errno
_access:
mov 2(sp),0f+2
mov 4(sp),0f+4
clr r0
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys access; ..; ..
sys access
.data2 0, 0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _acct
.globl _errno
.define _acct
.extern _errno
_acct:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0, _errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys acct; ..
sys acct
.data2 0

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _alarm
.globl _errno
.define _alarm
.extern _errno
_alarm:
mov 2(sp),r0
sys alarm
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
1:

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _chdir
.globl _errno
.define _chdir
.extern _errno
_chdir:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys chdir; ..
sys chdir
.data2 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _chmod
.globl _errno
.define _chmod
.extern _errno
_chmod:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys chmod; ..; ..
sys chmod
.data2 0, 0

View file

@ -1,19 +1,20 @@
#include "sys.h"
.globl _chown
.globl _errno
.define _chown
.extern _errno
_chown:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys chown; ..; ..; ..
sys chown
.data2 0, 0, 0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _chroot
.globl _errno
.define _chroot
.extern _errno
_chroot:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys chroot; ..
sys chroot
.data2 0

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _close
.globl _errno
.define _close
.extern _errno
_close:
mov 2(sp),r0
sys close
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,4 +1,4 @@
if pdp -O -P -c -I../../../h -I. $1 1>&2
if pdp -O -c -I../../../h -I. $1 1>&2
then echo `basename $1 $2`.o
else exit 1
fi

View file

@ -1,16 +1,17 @@
#include "sys.h"
.globl _creat
.globl _errno
.define _creat
.extern _errno
_creat:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys creat; ..; ..
sys creat
.data2 0, 0

View file

@ -1,7 +1,7 @@
#include "sys.h"
.globl _dup
.globl _dup2
.globl _errno
.define _dup
.define _dup2
.extern _errno
_dup2:
mov 2(sp),r0
@ -13,7 +13,7 @@ _dup:
1:
mov 4(sp),r1
sys dup
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
1:

View file

@ -1,3 +1,4 @@
.globl _errno
.bss
_errno: .=.+2
.sect .text ; .sect .rom; .sect .data; .sect .bss
.define _errno
.sect .bss
_errno: .space 2

View file

@ -1,7 +1,7 @@
#include "sys.h"
.globl _execl
.globl _environ
.globl _errno
.define _execl
.extern _environ
.extern _errno
_execl:
mov 2(sp),0f+2
@ -9,10 +9,11 @@ _execl:
add $4,r0
mov r0,0f+4
mov _environ,0f+6
sys indir; 0f
sys indir; .data2 0f
mov r0,_errno
mov $-1,r0
rts pc
.data
.sect .data
0:
sys exece; ..; ..; ..
sys exece
.data2 0, 0, 0

View file

@ -1,6 +1,6 @@
#include "sys.h"
.globl _execle
.globl _errno
.define _execle
.extern _errno
_execle:
mov 2(sp),0f+2
@ -11,10 +11,11 @@ _execle:
tst (r0)+
bne 1b
mov (r0),0f+6
sys indir; 0f
sys indir; .data2 0f
mov r0,_errno
mov $-1,r0
rts pc
.data
.sect .data
0:
sys exece; ..; ..; ..
sys exece
.data2 0, 0, 0

View file

@ -1,16 +1,17 @@
#include "sys.h"
.globl _execv,
.globl _environ
.globl _errno
.define _execv
.extern _environ
.extern _errno
_execv:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov _environ,0f+6
sys indir; 0f
sys indir; .data2 0f
mov r0,_errno
mov $-1,r0
rts pc
.data
.sect .data
0:
sys exece; ..; ..; ..
sys exece
.data2 0, 0, 0

View file

@ -1,15 +1,16 @@
#include "sys.h"
.globl _execve
.globl _errno
.define _execve
.extern _errno
_execve:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys indir; 0f
sys indir; .data2 0f
mov r0,_errno
mov $-1,r0
rts pc
.data
.sect .data
0:
sys exece; ..; ..; ..
sys exece
.data2 0, 0, 0

View file

@ -1,15 +1,15 @@
#include "sys.h"
.globl _fetchi
.globl _errno
.define _fetchi
.extern _errno
_fetchi:
mov 2(sp),r0
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys fetchi

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _fork
.globl _errno
.define _fork
.extern _errno
_fork:
sys fork
br 1f
bec 2f
bcc 2f
mov r0,_errno
mov $-1,r0
2:

View file

@ -1,10 +1,10 @@
#include "sys.h"
.globl _fperr
.globl _errno
.define _fperr
.extern _errno
_fperr:
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
@ -15,6 +15,6 @@ _fperr:
mov r1,(r5)
mov (sp)+,r5
rts pc
.data
.sect .data
0:
sys fperr

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _fstat
.globl _errno
.define _fstat
.extern _errno
_fstat:
mov 2(sp),r0
mov 4(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys fstat; ..
sys fstat
.data2 0

View file

@ -1,11 +1,12 @@
#include "sys.h"
.globl _ftime
.define _ftime
_ftime:
mov 2(sp),0f+2
sys indir; 0f
sys indir; .data2 0f
rts pc
.data
.sect .data
0:
sys ftime; ..
sys ftime
.data2 0

View file

@ -1,6 +1,6 @@
#include "sys.h"
.globl _getgid
.globl _getegid
.define _getgid
.define _getegid
_getgid:
sys getgid

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _getgrp
.globl _errno
.define _getgrp
.extern _errno
_getgrp:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys getgrp; ..
sys getgrp
.data2 0

View file

@ -1,5 +1,5 @@
#include "sys.h"
.globl _getpid
.define _getpid
_getpid:
sys getpid

View file

@ -1,5 +1,5 @@
#include "sys.h"
.globl _getppid
.define _getppid
_getppid:
sys getpid

View file

@ -1,6 +1,6 @@
#include "sys.h"
.globl _getuid
.globl _geteuid
.define _getuid
.define _geteuid
_getuid:
sys getuid

View file

@ -1,17 +1,17 @@
#include "sys.h"
.globl _gldav
.globl _errno
.define _gldav
.extern _errno
_gldav:
mov 2(sp),r0
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys gldav

View file

@ -1,7 +1,6 @@
#include <sgtty.h>
int gtty(fildes,argp)
int fildes ;
struct sgttyb *argp ;
char *argp ;
{
return ioctl(fildes,TIOCGETP,argp) ;
return ioctl(fildes,/*TIOCGETP*/(('t'<<8)|8),argp) ;
}

View file

@ -1,19 +1,20 @@
#include "sys.h"
.globl _ioctl
.globl _errno
.define _ioctl
.extern _errno
_ioctl:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys ioctl; ..; ..; ..
sys ioctl
.data2 0, 0, 0

View file

@ -1,12 +1,12 @@
#include "sys.h"
.globl _kill
.globl _errno
.define _kill
.extern _errno
_kill:
mov 2(sp),r0
mov 4(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
@ -14,6 +14,7 @@ _kill:
clr r0
rts pc
.data
.sect .data
0:
sys kill; ..
sys kill
.data2 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _killbkg
.globl _errno
.define _killbkg
.extern _errno
_killbkg:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys killbkg; ..; ..
sys killbkg
.data2 0, 0

View file

@ -1,12 +1,12 @@
#include "sys.h"
.globl _killpg
.globl _errno
.define _killpg
.extern _errno
_killpg:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
@ -14,6 +14,7 @@ _killpg:
clr r0
rts pc
.data
.sect .data
0:
sys killpg; ..; ..
sys killpg
.data2 0, 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _link
.globl _errno
.define _link
.extern _errno
_link:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys link; ..; ..
sys link
.data2 0, 0

View file

@ -1,15 +1,16 @@
#include "sys.h"
.globl _lock
.globl _errno
.define _lock
.extern _errno
_lock:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys lock; ..
sys lock
.data2 0

View file

@ -1,19 +1,20 @@
#include "sys.h"
.globl _login
.globl _errno
.define _login
.extern _errno
_login:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys login; ..; ..; ..;
sys login
.data2 0, 0, 0

View file

@ -1,19 +1,20 @@
#include "sys.h"
.globl _lseek
.globl _errno
.define _lseek
.extern _errno
_lseek:
mov 2(sp),r0
mov 4(sp),0f+2
mov 6(sp),0f+4
mov 10(sp),0f+6
sys indir; 0f
bec 1f
mov 010(sp),0f+6
sys indir; .data2 0f
bcc 1f
mov $-1,r1
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys lseek; ..; ..; ..
sys lseek
.data2 0, 0, 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _lstat
.globl _errno
.define _lstat
.extern _errno
_lstat:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys lstat; ..; ..
sys lstat
.data2 0, 0

View file

@ -1,19 +1,20 @@
#include "sys.h"
.globl _mknod
.globl _errno
.define _mknod
.extern _errno
_mknod:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys mknod; ..; ..; ..
sys mknod
.data2 0, 0, 0

View file

@ -1,19 +1,20 @@
#include "sys.h"
.globl _mount
.globl _errno
.define _mount
.extern _errno
_mount:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys mount; ..; ..; ..
sys mount
.data2 0, 0, 0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _mpxcall
.globl _errno
.define _mpxcall
.extern _errno
_mpxcall:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys mpx; ..; ..
sys mpx
.data2 0, 0

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _nice
.globl _errno
.define _nice
.extern _errno
_nice:
mov 2(sp),r0
sys nice
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,9 +1,9 @@
#include "sys.h"
.globl _nostk
.define _nostk
_nostk:
sys local; 0f
sys local; .data2 0f
rts pc
.data
.sect .data
0:
sys nostk

View file

@ -1,16 +1,17 @@
#include "sys.h"
.globl _open
.globl _errno
.define _open
.extern _errno
_open:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys open; ..; ..
sys open
.data2 0, 0

View file

@ -1,5 +1,5 @@
#include "sys.h"
.globl _pause
.define _pause
_pause:
sys pause

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _phys
.globl _errno
.define _phys
.extern _errno
_phys:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys phys; ..; ..; ..
sys phys
.data2 0, 0, 0

View file

@ -1,10 +1,10 @@
#include "sys.h"
.globl _pipe
.globl _errno
.define _pipe
.extern _errno
_pipe:
sys pipe
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,13 +1,14 @@
#include "sys.h"
.globl _profil
.define _profil
_profil:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
mov 10(sp),0f+10
sys indir; 0f
mov 010(sp),0f+010
sys indir; .data2 0f
rts pc
.data
.sect .data
0:
sys profil; ..; ..; ..; ..
sys profil
.data2 0, 0, 0, 0

View file

@ -1,20 +1,21 @@
#include "sys.h"
.globl _ptrace
.globl _errno
.define _ptrace
.extern _errno
_ptrace:
mov 2(sp),0f+6
mov 4(sp),0f+2
mov 6(sp),0f+4
mov 10(sp),r0
mov 010(sp),r0
clr _errno
sys indir; 9f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys ptrace; ..; ..; ..
sys ptrace
.data2 0, 0, 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _qfstat
.globl _errno
.define _qfstat
.extern _errno
_qfstat:
mov 2(sp),r0
mov 4(sp),0f+2
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys qfstat; ..
sys qfstat
.data2 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _qstat
.globl _errno
.define _qstat
.extern _errno
_qstat:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys qstat; ..; ..
sys qstat
.data2 0, 0

View file

@ -1,21 +1,22 @@
#include "sys.h"
.globl _quota
.globl _errno
.define _quota
.extern _errno
_quota:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
mov 10(sp),0f+10
mov 12(sp),0f+12
sys local; 0f
bec 1f
mov 010(sp),0f+010
mov 012(sp),0f+012
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys quota; ..; ..; ..; ..; ..
sys quota
.data2 0, 0, 0, 0, 0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _read
.globl _errno
.define _read
.extern _errno
_read:
mov 2(sp),r0
mov 4(sp),0f+2
mov 6(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys read; ..; ..
sys read
.data2 0, 0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _readlink
.globl _errno
.define _readlink
.extern _errno
_readlink:
mov 2(sp),r0
mov 4(sp),0f+2
mov 6(sp),0f+4
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys readlink; ..; ..
sys readlink
.data2 0, 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _reboot
.globl _errno
.define _reboot
.extern _errno
_reboot:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys reboot; ..; ..
sys reboot
.data2 0, 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _renice
.globl _errno
.define _renice
.extern _errno
_renice:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys renice; ..; ..
sys renice
.data2 0, 0

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _rtp
.globl _errno
.define _rtp
.extern _errno
_rtp:
mov 2(sp),r0
sys rtp
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,16 +1,16 @@
#include "sys.h"
.globl _sbrk
.globl _brk
.globl _end
.globl _errno
.define _sbrk
.define _brk
.extern _end
.extern _errno
_sbrk:
mov 2(sp),0f+2
beq 1f
add xxx,0f+2
bcs 2f
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
2:
mov r0,_errno
mov $-1,r0
@ -22,8 +22,8 @@ _sbrk:
_brk:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
@ -32,7 +32,8 @@ _brk:
clr r0
rts pc
.data
.sect .data
0:
sys break; ..
xxx: _end
sys break
.data2 0
xxx: .data2 _end

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _setgid
.globl _errno
.define _setgid
.extern _errno
_setgid:
mov 2(sp),r0
sys setgid
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _setgrp
.globl _errno
.define _setgrp
.extern _errno
_setgrp:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys setgrp; ..
sys setgrp
.data2 0

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _setuid
.globl _errno
.define _setuid
.extern _errno
_setuid:
mov 2(sp),r0
sys setuid
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,31 +1,30 @@
#include <errno.h>
#include "sys.h"
rtt = 6
.globl _signal
.globl _errno
EINVAL = 026
.define _signal
.extern _errno
NSIGNALS = 0
NSIGNALS = 024
tvect:
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f; NSIGNALS=NSIGNALS+1
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
jsr r0,1f
1:
mov r1,-(sp)
@ -64,8 +63,8 @@ _signal:
add $tvect,r1
mov r1,0f+4
1:
sys indir; 0f
bes 3f
sys indir; .data2 0f
bcs 3f
bit $1,r0
beq 1f
mov r0,(sp)
@ -74,15 +73,16 @@ _signal:
mov (sp)+,r5
rts pc
2:
mov $EINVAL.,r0
mov $EINVAL,r0
3:
mov r0,_errno
mov $-1,r0
mov (sp)+,r5
rts pc
.data
.sect .data
0:
sys signal; ..; ..
.bss
dvect: .=.+[NSIGNALS*2]
sys signal
.data2 0, 0
.sect .bss
dvect: .space [NSIGNALS*2]

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _stat
.globl _errno
.define _stat
.extern _errno
_stat:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys stat; ..; ..
sys stat
.data2 0, 0

View file

@ -1,13 +1,13 @@
#include "sys.h"
.globl _stime
.globl _errno
.define _stime
.extern _errno
_stime:
mov 2(sp),r1
mov (r1)+,r0
mov (r1),r1
sys stime
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,7 +1,6 @@
#include <sgtty.h>
int stty(fildes,argp)
int fildes ;
struct sgttyb *argp ;
char *argp;
{
return ioctl(fildes,TIOCSETP,argp) ;
return ioctl(fildes,/*TIOCSETP*/(('t'<<8)|9),argp) ;
}

View file

@ -1,15 +1,15 @@
#include "sys.h"
.globl _submit
.globl _errno
.define _submit
.extern _errno
_submit:
mov 2(sp),r0
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys submit

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _symlink
.globl _errno
.define _symlink
.extern _errno
_symlink:
mov 2(sp),r0
mov 4(sp),0f+2
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys symlink; ..
sys symlink
.data2 0

View file

@ -1,5 +1,5 @@
#include "sys.h"
.globl _sync
.define _sync
_sync:
sys sync

View file

@ -3,100 +3,102 @@
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
#define indir 0.
#define exit 1.
#define fork 2.
#define read 3.
#define write 4.
#define open 5.
#define close 6.
#define wait 7.
#define creat 8.
#define link 9.
#define unlink 10.
#define exec 11.
#define chdir 12.
#define time 13.
#define mknod 14.
#define chmod 15.
#define chown 16.
#define break 17.
#define stat 18.
#define lseek 19.
#define getpid 20.
#define mount 21.
#define umount 22.
#define setuid 23.
#define getuid 24.
#define stime 25.
#define ptrace 26.
#define alarm 27.
#define fstat 28.
#define pause 29.
#define utime 30.
#define smdate 30.
#define stty 31.
#define gtty 32.
#define access 33.
#define nice 34.
#define sleep 35.
#define ftime 35.
#define sync 36.
#define kill 37.
#define csw 38.
#define setpgrp 39.
#define dup 41.
#define pipe 42.
#define times 43.
#define profil 44.
#define getgrp 45.
#define setgid 46.
#define getgid 47.
#define signal 48.
#define rtp 49.
#define setgrp 50.
#define acct 51.
#define phys 52.
#define lock 53.
#define ioctl 54.
#define reboot 55.
#define mpx 56.
#define vfork 57.
#define setinf 59.
#define exece 59.
#define local 58.
#define umask 60.
#define getinf 60.
#define chroot 61.
#define indir 0
#define exit 1
#define fork 2
#define read 3
#define write 4
#define open 5
#define close 6
#define wait 7
#define creat 010
#define link 011
#define unlink 012
#define exec 013
#define chdir 014
#define time 015
#define mknod 016
#define chmod 017
#define chown 020
#define break 021
#define stat 022
#define lseek 023
#define getpid 024
#define mount 025
#define umount 026
#define setuid 027
#define getuid 030
#define stime 031
#define ptrace 032
#define alarm 033
#define fstat 034
#define pause 035
#define utime 036
#define smdate 036
#define stty 037
#define gtty 040
#define access 041
#define nice 042
#define sleep 043
#define ftime 043
#define sync 044
#define kill 045
#define csw 046
#define setpgrp 047
#define dup 051
#define pipe 052
#define times 053
#define profil 054
#define getgrp 055
#define setgid 056
#define getgid 057
#define signal 060
#define rtp 061
#define setgrp 062
#define acct 063
#define phys 064
#define lock 065
#define ioctl 066
#define reboot 067
#define mpx 070
#define vfork 071
#define setinf 073
#define exece 073
#define local 072
#define umask 074
#define getinf 074
#define chroot 075
#define login 1.
#define lstat 2.
#define submit 3.
#define nostk 4.
#define killbkg 5.
#define killpg 6.
#define renice 7.
#define fetchi 8.
#define ucall 9.
#define quota 10.
#define qfstat 11.
#define qstat 12.
#define gldav 14.
#define fperr 15.
#define vhangup 16.
#define symlink 29.
#define readlink 30.
#define login 01
#define lstat 02
#define submit 03
#define nostk 04
#define killbkg 05
#define killpg 06
#define renice 07
#define fetchi 010
#define ucall 011
#define quota 012
#define qfstat 013
#define qstat 014
#define gldav 016
#define fperr 017
#define vhangup 020
#define symlink 035
#define readlink 036
#define select 18.
#define gethost 19.
#define sethost 20.
#define socket 21.
#define connect 22.
#define accept 23.
#define send 24.
#define receive 25.
#define socketa 26.
#define setreuid 27.
#define setregid 28.
#define gethstid 31.
#define sethstid 32.
#define select 022
#define gethost 023
#define sethost 024
#define socket 025
#define connect 026
#define accept 027
#define send 030
#define receive 031
#define socketa 032
#define setreuid 033
#define setregid 034
#define gethstid 037
#define sethstid 040
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text

View file

@ -1,5 +1,5 @@
#include "sys.h"
.globl _time
.define _time
_time:
sys time

View file

@ -1,10 +1,11 @@
#include "sys.h"
.globl _times
.define _times
_times:
mov 2(sp),0f+2
sys indir; 0f
sys indir; .data2 0f
rts pc
.data
.sect .data
0:
sys times; ..
sys times
.data2 0

View file

@ -1,13 +1,14 @@
#include "sys.h"
.globl _ucall
.define _ucall
_ucall:
mov 2(sp),0f+2
mov 4(sp),0f+4
mov 6(sp),0f+6
mov 10(sp),0f+10
sys local; 0f
mov 010(sp),0f+010
sys local; .data2 0f
rts pc
.data
.sect .data
0:
sys ucall; ..; ..; ..; ..
sys ucall
.data2 0, 0, 0, 0

View file

@ -1,15 +1,16 @@
#include "sys.h"
.globl _umask
.globl _errno
.define _umask
.extern _errno
_umask:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys umask; ..
sys umask
.data2 0

View file

@ -1,11 +1,11 @@
#include "sys.h"
.globl _umount
.globl _errno
.define _umount
.extern _errno
_umount:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
@ -13,6 +13,7 @@ _umount:
clr r0
rts pc
.data
.sect .data
0:
sys umount; ..
sys umount
.data2 0

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _unlink
.globl _errno
.define _unlink
.extern _errno
_unlink:
mov 2(sp),0f+2
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys unlink; ..
sys unlink
.data2 0

View file

@ -1,18 +1,19 @@
#include "sys.h"
.globl _utime
.globl _errno
.define _utime
.extern _errno
_utime:
mov 2(sp),0f+2
mov 4(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc
1:
clr r0
rts pc
.data
.sect .data
0:
sys utime; ..; ..
sys utime
.data2 0, 0

View file

@ -1,18 +1,18 @@
#include "sys.h"
.globl _vfork
.globl _errno
.define _vfork
.extern _errno
_vfork:
mov (sp)+,r1
sys vfork
br 1f
bec 2f
bcc 2f
3: mov r0,_errno
mov $-1,r0
jmp (r1)
1: / child, or vfork systemcall does not exist
bes 3b
1: ! child, or vfork systemcall does not exist
bcs 3b
clr r0
2:
jmp (r1)

View file

@ -1,14 +1,14 @@
#include "sys.h"
.globl _vhangup
.globl _errno
.define _vhangup
.extern _errno
_vhangup:
sys local; 0f
bec 1f
sys local; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys vhangup

View file

@ -1,10 +1,10 @@
#include "sys.h"
.globl _wait
.globl _errno
.define _wait
.extern _errno
_wait:
sys wait
bec 1f
bcc 1f
mov r0,_errno
mov $-1,r0
rts pc

View file

@ -1,17 +1,18 @@
#include "sys.h"
.globl _write
.globl _errno
.define _write
.extern _errno
_write:
mov 2(sp),r0
mov 4(sp),0f+2
mov 6(sp),0f+4
sys indir; 0f
bec 1f
sys indir; .data2 0f
bcc 1f
mov r0,_errno
mov $-1,r0
1:
rts pc
.data
.sect .data
0:
sys write; ..; ..
sys write
.data2 0, 0