Initial revision

This commit is contained in:
ceriel 1987-10-06 16:39:14 +00:00
parent e61b887e31
commit 4043036e27
94 changed files with 1233 additions and 0 deletions

3
mach/xenix3/.distr Normal file
View file

@ -0,0 +1,3 @@
Action
cv
libsys

6
mach/xenix3/Action Normal file
View file

@ -0,0 +1,6 @@
name "Xenix 3.0 8086 systemcall library"
dir libsys
end
name "Xenix 3.0 conversion program from ack.out --> Xenix 3.0 a.out"
dir cv
end

View file

@ -0,0 +1,5 @@
LIST
Makefile
compmodule
libmon_s.a
head_em.s

88
mach/xenix3/libsys/LIST Normal file
View file

@ -0,0 +1,88 @@
libmon_s.a
exit.c
cleanup.c
stty.c
gtty.c
dup.c
dup2.c
execl.c
execle.c
execv.c
pipe.c
profil.c
sdget.c
stime.c
time.c
wait.c
_exit.s
_pipe.s
_profil.s
_sdget.s
_stime.s
_time.s
_wait.s
access.s
acct.s
alarm.s
brk.s
chdir.s
chmod.s
chown.s
chroot.s
close.s
creat.s
creatsem.s
execve.s
fcntl.s
fork.s
fstat.s
ftime.s
getegid.s
geteuid.s
getgid.s
getpgrp.s
getpid.s
getppid.s
getuid.s
ioctl.s
kill.s
link.s
lock.s
locking.s
lseek.s
mknod.s
mount.s
nap.s
nbwaitsem.s
nice.s
open.s
opensem.s
pause.s
ptrace.s
rdchk.s
read.s
sbrk.s
sdenter.s
sdfree.s
sdgetv.s
sdleave.s
sdwaitv.s
setgid.s
setuid.s
shutdn.s
signal.s
sigsem.s
stat.s
sync.s
sys.s
times.s
ulimit.s
umask.s
umount.s
uname.s
unlink.s
ustat.s
utime.s
waitsem.s
write.s
xdup.s

View file

@ -0,0 +1,27 @@
# $Header$
MACH=xenix3.0
all: libmon_o.a head_em.o
install: all
../../install libmon_o.a tail_mon
../../install head_em.o head_em
cmp: all
-../../compare libmon_o.a tail_mon
-../../compare head_em.o head_em
libmon_o.a: libmon_s.a
ASAR=aal ; export ASAR ;\
march . libmon_o.a
head_em.o: head_em.s
$(MACH) -O -c head_em.s
clean:
rm -f *.o libmon_o.a
opr :
make pr | opr
pr:
@pr `pwd`/head_em.s
@arch pv libmon_s.a | pr -h `pwd`/libmon_s.a

View file

@ -0,0 +1,10 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __exit
.sect .text
__exit:
mov ax,1
push bp
mov bp,sp
mov bx,4(bp)
call syscal
1: jmp 1b

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __pipe
.sect .text
__pipe:
mov ax,42
call syscal
mov dx,bx
jae 1f
mov (_errno),ax
mov ax,-1
cwd
1:
ret

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __profil
.sect .text
__profil:
mov ax,44
mov bx,sp
add bx,2
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,22 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __sdget
.sect .text
__sdget:
mov ax,3368
push bp
mov bp,sp
push si
push di
mov di,10(bp)
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,16 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __stime
.sect .text
__stime:
mov ax,25
push bp
mov bp,sp
mov cx,6(bp)
mov bx,4(bp)
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
1:
pop bp
ret

View file

@ -0,0 +1,8 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __time
.sect .text
__time:
mov ax,13
call syscal
mov dx,bx
ret

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define __wait
.sect .text
__wait:
mov ax,7
call syscal
mov dx,bx
jae 1f
mov (_errno),ax
mov ax,-1
cwd
1:
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _access
.sect .text
_access:
mov ax,33
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _acct
.sect .text
_acct:
mov ax,51
jmp sysal

View file

@ -0,0 +1,11 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _alarm
.sect .text
_alarm:
mov ax,27
push bp
mov bp,sp
mov bx,4(bp)
call syscal
pop bp
ret

6
mach/xenix3/libsys/brk.s Normal file
View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _brk
.sect .text
_brk:
mov ax,17
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _chdir
.sect .text
_chdir:
mov ax,12
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _chmod
.sect .text
_chmod:
mov ax,15
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _chown
.sect .text
_chown:
mov ax,16
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _chroot
.sect .text
_chroot:
mov ax,61
jmp sysal

View file

@ -0,0 +1 @@
_cleanup() { }

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _close
.sect .text
_close:
mov ax,6
jmp sysal

4
mach/xenix3/libsys/compmodule Executable file
View file

@ -0,0 +1,4 @@
if xenix3.0 -c $1 1>&2
then echo `basename $1 $2`.o
else exit 1
fi

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _creat
.sect .text
_creat:
mov ax,8
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _creatsem
.sect .text
_creatsem:
mov ax,552
jmp sysal

5
mach/xenix3/libsys/dup.c Normal file
View file

@ -0,0 +1,5 @@
int
dup(d)
{
return __xdup(d, 0);
}

View file

@ -0,0 +1,6 @@
int
dup2(oldd, newd)
{
oldd |= 64;
return __xdup(oldd, newd);
}

View file

@ -0,0 +1,9 @@
int
execl(name,args)
char *name;
int args;
{
extern char **environ;
return execve(name,&args,environ);
}

View file

@ -0,0 +1,10 @@
int
execle(name,args)
char *name;
char *args;
{
char **p = &args;
while (*p++) ;
return execve(name,&args,*p);
}

View file

@ -0,0 +1,8 @@
int
execv(name,args)
char *name;
char **args;
{
extern char **environ;
return execve(name,args,environ);
}

View file

@ -0,0 +1,19 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _execve
.sect .text
_execve:
mov ax,59
push bp
mov bp,sp
push si
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop si
jae 1f
mov (_errno),ax
mov ax,-1
1:
pop bp
ret

View file

@ -0,0 +1,5 @@
exit(n)
{
_cleanup();
_exit(n);
}

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _fcntl
.sect .text
_fcntl:
mov ax,62
jmp sysal

20
mach/xenix3/libsys/fork.s Normal file
View file

@ -0,0 +1,20 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _fork, _par_uid
.sect .bss
.comm _par_uid, 2
.sect .text
_fork:
mov ax,2
call syscal
jb 1f
and bx,bx
je 2f
ret
1:
mov (_errno),ax
mov ax,-1
ret
2:
mov (_par_uid),ax
xor ax,ax
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _fstat
.sect .text
_fstat:
mov ax,28
jmp sysal

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _ftime
.sect .text
_ftime:
mov ax,2856
push bp
mov bp,sp
mov bx,4(bp)
call syscal
pop bp
ret

View file

@ -0,0 +1,8 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _getegid
.sect .text
_getegid:
mov ax,47
call syscal
xchg bx,ax
ret

View file

@ -0,0 +1,8 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _geteuid
.sect .text
_geteuid:
mov ax,24
call syscal
xchg bx,ax
ret

View file

@ -0,0 +1,7 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _getgid
.sect .text
_getgid:
mov ax,47
call syscal
ret

View file

@ -0,0 +1,10 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _getpgrp
.sect .text
_getpgrp:
xor ax,ax
push ax
mov ax,39
call syscal
pop bx
ret

View file

@ -0,0 +1,7 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _getpid
.sect .text
_getpid:
mov ax,20
call syscal
ret

View file

@ -0,0 +1,8 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _getppid
.sect .text
_getppid:
mov ax,20
call syscal
xchg bx,ax
ret

View file

@ -0,0 +1,7 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _getuid
.sect .text
_getuid:
mov ax,24
call syscal
ret

View file

@ -0,0 +1,5 @@
gtty(fildes, arg)
char *arg;
{
return ioctl(fildes, ('t' << 8) | 8, arg);
}

View file

@ -0,0 +1,52 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define begtext,begdata,begbss
.define hol0,.reghp,.limhp,.trppc,.ignmask
.define ERANGE,ESET,EHEAP,ECASE,EILLINS,EIDIVZ,EODDZ
.extern _end
ERANGE = 1
ESET = 2
EIDIVZ = 6
EHEAP = 17
EILLINS = 18
EODDZ = 19
ECASE = 20
.sect .text
begtext:
mov bx,sp
mov cx,(bx)
add bx,2
mov ax,cx
inc ax
shl ax,1
add ax,bx
push ax
push bx
push cx
xor bp,bp
call _m_a_i_n
call __exit
.sect .data
begdata:
hol0:
.data2 0,0
.data2 0,0
argv:
.data2 3f
envp:
.data2 0
3:
.asciz "PROGRAM"
.reghp:
.data2 endbss
.limhp:
.data2 endbss
.ignmask:
.data2 0
.trppc:
.data2 0
.sect .bss
begbss:

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _ioctl
.sect .text
_ioctl:
mov ax,54
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _kill
.sect .text
_kill:
mov ax,37
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _link
.sect .text
_link:
mov ax,9
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _lock
.sect .text
_lock:
mov ax,45
jmp sysal

View file

@ -0,0 +1,23 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _locking
.sect .text
_locking:
mov ax,296
push bp
mov bp,sp
push si
push di
mov di,10(bp)
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
mov dx,ax
1:
ret

View file

@ -0,0 +1,25 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _lseek
.sect .text
_lseek:
mov ax,19
push bp
mov bp,sp
push si
push di
mov di,10(bp)
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
mov dx,ax
ret
1:
mov dx,bx
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _mknod
.sect .text
_mknod:
mov ax,14
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _mount
.sect .text
_mount:
mov ax,21
jmp sysal

19
mach/xenix3/libsys/nap.s Normal file
View file

@ -0,0 +1,19 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _nap
.sect .text
_nap:
mov ax,3112
push bp
mov bp,sp
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
mov dx,ax
ret
1:
mov dx,bx
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _nbwaitsem
.sect .text
_nbwaitsem:
mov ax,1576
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _nice
.sect .text
_nice:
mov ax,34
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _open
.sect .text
_open:
mov ax,5
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _opensem
.sect .text
_opensem:
mov ax,808
jmp sysal

View file

@ -0,0 +1,11 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _pause
.sect .text
_pause:
mov ax,29
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

14
mach/xenix3/libsys/pipe.c Normal file
View file

@ -0,0 +1,14 @@
long _pipe();
int
pipe(f)
int f[2];
{
long x;
x = _pipe();
if (x == -1) return -1;
f[0] = x;
f[1] = x >> 16;
return 0;
}

View file

@ -0,0 +1,6 @@
profil(buff, bufsiz, offset, scale)
char *buff;
int (*offset)();
{
_profil(buff, bufsiz, offset, scale, 7262);
}

View file

@ -0,0 +1,23 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _ptrace
.sect .text
_ptrace:
mov ax,26
push bp
mov bp,sp
push si
push di
mov di,4(bp)
mov si,8(bp)
mov cx,6(bp)
mov bx,10(bp)
mov (_errno),0
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
1:
pop di
pop si
pop bp
ret

View file

@ -0,0 +1,15 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _rdchk
.sect .text
_rdchk:
mov ax,1832
push bp
mov bp,sp
mov bx,4(bp)
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
1:
pop bp
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _read
.sect .text
_read:
mov ax,3
jmp sysal

22
mach/xenix3/libsys/sbrk.s Normal file
View file

@ -0,0 +1,22 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sbrk
.sect .text
_sbrk:
push bp
mov bp,sp
push ds
mov ax,4(bp)
cwd
push dx
push ax
mov ax,1
push ax
call __brkctl
add sp,8
pop bp
ret
__brkctl:
mov ax,4904
jmp sysal

View file

@ -0,0 +1,20 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sdenter
.sect .text
_sdenter:
mov ax,3880
push bp
mov bp,sp
push si
push di
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,19 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sdfree
.sect .text
_sdfree:
mov ax,3624
push bp
mov bp,sp
push si
push di
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,19 @@
char *
sdget(path, flags, size, mode)
char *path;
long size;
{
if ((flags & 2) == 2) {
if (size > 0) {
extern char *_sdget();
if (size >= 0x10000L) {
extern int errno;
errno = 22;
return (char *) -1;
}
}
}
return _sdget(path, flags, (unsigned) size - 1, mode);
}

View file

@ -0,0 +1,19 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sdgetv
.sect .text
_sdgetv:
mov ax,4392
push bp
mov bp,sp
push si
push di
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,19 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sdleave
.sect .text
_sdleave:
mov ax,4136
push bp
mov bp,sp
push si
push di
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,20 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sdwaitv
.sect .text
_sdwaitv:
mov ax,4648
push bp
mov bp,sp
push si
push di
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop di
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
1:
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _setgid
.sect .text
_setgid:
mov ax,46
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _setuid
.sect .text
_setuid:
mov ax,23
jmp sysal

View file

@ -0,0 +1,14 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _shutdn
.sect .text
_shutdn:
mov ax,40
push bp
mov bp,sp
mov cx,6(bp)
mov bx,4(bp)
call syscal
mov (_errno),ax
mov ax,-1
pop bp
ret

123
mach/xenix3/libsys/signal.s Normal file
View file

@ -0,0 +1,123 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _signal
.sect .text
_signal:
push bp
mov bp,sp
push si
push di
mov cx,6(bp)
mov bx,4(bp)
cmp bx,20
jae 1f
mov ax,bx
add bx,bx
push table(bx)
mov table(bx),cx
and cx,cx
je 2f
cmp cx,1
je 2f
add bx,bx
lea cx,tbl(bx)
2:
mov bx,ax
mov ax,48
call syscal
pop bx
jb 4f
and ax,ax
je 5f
cmp ax,1
jne 6f
5:
jmp 7f
6:
xchg ax,bx
jmp 7f
1:
mov ax,22
4:
mov (_errno),ax
mov ax,-1
7:
pop di
pop si
pop bp
ret
ctch:
push bp
mov bp,sp
push ax
push bx
push cx
push dx
push si
push di
mov ax,2(bp)
sub ax,tbl
shr ax,1
push ax
call table(bx)
pop di
pop di
pop si
pop dx
pop cx
pop bx
pop ax
pop bp
add sp,2
pop (retadr)
pop (dummy)
popf
jmp (retadr)
.sect .bss
retadr: .space 2
dummy: .space 2
.sect .text
tbl:
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
call ctch
.align
.sect .bss
table:
.space 40

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sigsem
.sect .text
_sigsem:
mov ax,1064
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _stat
.sect .text
_stat:
mov ax,18
jmp sysal

View file

@ -0,0 +1,5 @@
stime(p)
long *p;
{
return _stime(*p);
}

View file

@ -0,0 +1,5 @@
stty(fildes, arg)
char *arg;
{
return ioctl(fildes, ('t' << 8) | 9, arg);
}

View file

@ -0,0 +1,7 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _sync
.sect .text
_sync:
mov ax,36
call syscal
ret

70
mach/xenix3/libsys/sys.s Normal file
View file

@ -0,0 +1,70 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define syscal, sysal, sysn, sysnl, sysnx, sysc, syse, cerror, _errno
.sect .bss
.comm _errno, 2
.sect .text
syscal:
int 5
ret
sysal:
push bp
mov bp,sp
push di
push si
mov di,10(bp)
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
mov dx,bx
pop si
pop di
pop bp
jb cerror
ret
syse:
mov bx,sp
add bx,2
call syscal
cerror:
mov (_errno),ax
mov ax,-1
cwd
ret
sysn:
mov bx,sp
add bx,2
call syscal
jb cerror
ret
sysnl:
mov bx,sp
add bx,2
call syscal
jb cerror
mov dx,bx
ret
sysnx:
mov bx,sp
add bx,2
call syscal
jb cerror
xchg bx,ax
ret
sysc:
mov bx,sp
add bx,2
call syscal
jb cerror
xor ax,ax
cbw
ret

11
mach/xenix3/libsys/time.c Normal file
View file

@ -0,0 +1,11 @@
long _time();
long
time(p)
long *p;
{
long l = _time();
if (p) *p = l;
return l;
}

View file

@ -0,0 +1,19 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _times
.sect .text
_times:
mov ax,43
push bp
mov bp,sp
mov bx,4(bp)
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
mov dx,ax
pop bp
ret
1:
mov dx,bx
pop bp
ret

View file

@ -0,0 +1,22 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _ulimit
.sect .text
_ulimit:
mov ax,63
push bp
mov bp,sp
push si
mov si,8(bp)
mov cx,6(bp)
mov bx,4(bp)
call syscal
pop si
pop bp
jae 1f
mov (_errno),ax
mov ax,-1
mov dx,ax
ret
1:
mov dx,bx
ret

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _umask
.sect .text
_umask:
mov ax,60
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _umount
.sect .text
_umount:
mov ax,22
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _uname
.sect .text
_uname:
mov ax,57
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _unlink
.sect .text
_unlink:
mov ax,10
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _ustat
.sect .text
_ustat:
mov ax,569
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _utime
.sect .text
_utime:
mov ax,30
jmp sysal

11
mach/xenix3/libsys/wait.c Normal file
View file

@ -0,0 +1,11 @@
long _wait();
wait(p)
int *p;
{
long l = _wait();
if (l == -1) return -1;
if (*p) *p = (l >> 16);
return (int) l;
}

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _waitsem
.sect .text
_waitsem:
mov ax,1320
jmp sysal

View file

@ -0,0 +1,6 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define _write
.sect .text
_write:
mov ax,4
jmp sysal

16
mach/xenix3/libsys/xdup.s Normal file
View file

@ -0,0 +1,16 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.define ___xdup
.sect .text
___xdup:
push bp
mov bp,sp
mov ax,41
mov cx,6(bp)
mov bx,4(bp)
call syscal
jae 1f
mov (_errno),ax
mov ax,-1
1:
pop bp
ret