Initial revision
This commit is contained in:
parent
e61b887e31
commit
4043036e27
3
mach/xenix3/.distr
Normal file
3
mach/xenix3/.distr
Normal file
|
@ -0,0 +1,3 @@
|
|||
Action
|
||||
cv
|
||||
libsys
|
6
mach/xenix3/Action
Normal file
6
mach/xenix3/Action
Normal 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
|
5
mach/xenix3/libsys/.distr
Normal file
5
mach/xenix3/libsys/.distr
Normal file
|
@ -0,0 +1,5 @@
|
|||
LIST
|
||||
Makefile
|
||||
compmodule
|
||||
libmon_s.a
|
||||
head_em.s
|
88
mach/xenix3/libsys/LIST
Normal file
88
mach/xenix3/libsys/LIST
Normal 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
|
27
mach/xenix3/libsys/Makefile
Normal file
27
mach/xenix3/libsys/Makefile
Normal 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
|
10
mach/xenix3/libsys/_exit.s
Normal file
10
mach/xenix3/libsys/_exit.s
Normal 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
|
13
mach/xenix3/libsys/_pipe.s
Normal file
13
mach/xenix3/libsys/_pipe.s
Normal 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
|
13
mach/xenix3/libsys/_profil.s
Normal file
13
mach/xenix3/libsys/_profil.s
Normal 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
|
22
mach/xenix3/libsys/_sdget.s
Normal file
22
mach/xenix3/libsys/_sdget.s
Normal 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
|
16
mach/xenix3/libsys/_stime.s
Normal file
16
mach/xenix3/libsys/_stime.s
Normal 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
|
8
mach/xenix3/libsys/_time.s
Normal file
8
mach/xenix3/libsys/_time.s
Normal 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
|
13
mach/xenix3/libsys/_wait.s
Normal file
13
mach/xenix3/libsys/_wait.s
Normal 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
|
6
mach/xenix3/libsys/access.s
Normal file
6
mach/xenix3/libsys/access.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _access
|
||||
.sect .text
|
||||
_access:
|
||||
mov ax,33
|
||||
jmp sysal
|
6
mach/xenix3/libsys/acct.s
Normal file
6
mach/xenix3/libsys/acct.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _acct
|
||||
.sect .text
|
||||
_acct:
|
||||
mov ax,51
|
||||
jmp sysal
|
11
mach/xenix3/libsys/alarm.s
Normal file
11
mach/xenix3/libsys/alarm.s
Normal 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
6
mach/xenix3/libsys/brk.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _brk
|
||||
.sect .text
|
||||
_brk:
|
||||
mov ax,17
|
||||
jmp sysal
|
6
mach/xenix3/libsys/chdir.s
Normal file
6
mach/xenix3/libsys/chdir.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _chdir
|
||||
.sect .text
|
||||
_chdir:
|
||||
mov ax,12
|
||||
jmp sysal
|
6
mach/xenix3/libsys/chmod.s
Normal file
6
mach/xenix3/libsys/chmod.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _chmod
|
||||
.sect .text
|
||||
_chmod:
|
||||
mov ax,15
|
||||
jmp sysal
|
6
mach/xenix3/libsys/chown.s
Normal file
6
mach/xenix3/libsys/chown.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _chown
|
||||
.sect .text
|
||||
_chown:
|
||||
mov ax,16
|
||||
jmp sysal
|
6
mach/xenix3/libsys/chroot.s
Normal file
6
mach/xenix3/libsys/chroot.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _chroot
|
||||
.sect .text
|
||||
_chroot:
|
||||
mov ax,61
|
||||
jmp sysal
|
1
mach/xenix3/libsys/cleanup.c
Normal file
1
mach/xenix3/libsys/cleanup.c
Normal file
|
@ -0,0 +1 @@
|
|||
_cleanup() { }
|
6
mach/xenix3/libsys/close.s
Normal file
6
mach/xenix3/libsys/close.s
Normal 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
4
mach/xenix3/libsys/compmodule
Executable file
|
@ -0,0 +1,4 @@
|
|||
if xenix3.0 -c $1 1>&2
|
||||
then echo `basename $1 $2`.o
|
||||
else exit 1
|
||||
fi
|
6
mach/xenix3/libsys/creat.s
Normal file
6
mach/xenix3/libsys/creat.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _creat
|
||||
.sect .text
|
||||
_creat:
|
||||
mov ax,8
|
||||
jmp sysal
|
6
mach/xenix3/libsys/creatsem.s
Normal file
6
mach/xenix3/libsys/creatsem.s
Normal 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
5
mach/xenix3/libsys/dup.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
int
|
||||
dup(d)
|
||||
{
|
||||
return __xdup(d, 0);
|
||||
}
|
6
mach/xenix3/libsys/dup2.c
Normal file
6
mach/xenix3/libsys/dup2.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
int
|
||||
dup2(oldd, newd)
|
||||
{
|
||||
oldd |= 64;
|
||||
return __xdup(oldd, newd);
|
||||
}
|
9
mach/xenix3/libsys/execl.c
Normal file
9
mach/xenix3/libsys/execl.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
int
|
||||
execl(name,args)
|
||||
char *name;
|
||||
int args;
|
||||
{
|
||||
extern char **environ;
|
||||
|
||||
return execve(name,&args,environ);
|
||||
}
|
10
mach/xenix3/libsys/execle.c
Normal file
10
mach/xenix3/libsys/execle.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
int
|
||||
execle(name,args)
|
||||
char *name;
|
||||
char *args;
|
||||
{
|
||||
char **p = &args;
|
||||
while (*p++) ;
|
||||
|
||||
return execve(name,&args,*p);
|
||||
}
|
8
mach/xenix3/libsys/execv.c
Normal file
8
mach/xenix3/libsys/execv.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
int
|
||||
execv(name,args)
|
||||
char *name;
|
||||
char **args;
|
||||
{
|
||||
extern char **environ;
|
||||
return execve(name,args,environ);
|
||||
}
|
19
mach/xenix3/libsys/execve.s
Normal file
19
mach/xenix3/libsys/execve.s
Normal 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
|
5
mach/xenix3/libsys/exit.c
Normal file
5
mach/xenix3/libsys/exit.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
exit(n)
|
||||
{
|
||||
_cleanup();
|
||||
_exit(n);
|
||||
}
|
6
mach/xenix3/libsys/fcntl.s
Normal file
6
mach/xenix3/libsys/fcntl.s
Normal 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
20
mach/xenix3/libsys/fork.s
Normal 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
|
6
mach/xenix3/libsys/fstat.s
Normal file
6
mach/xenix3/libsys/fstat.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _fstat
|
||||
.sect .text
|
||||
_fstat:
|
||||
mov ax,28
|
||||
jmp sysal
|
12
mach/xenix3/libsys/ftime.s
Normal file
12
mach/xenix3/libsys/ftime.s
Normal 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
|
||||
|
8
mach/xenix3/libsys/getegid.s
Normal file
8
mach/xenix3/libsys/getegid.s
Normal 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
|
8
mach/xenix3/libsys/geteuid.s
Normal file
8
mach/xenix3/libsys/geteuid.s
Normal 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
|
7
mach/xenix3/libsys/getgid.s
Normal file
7
mach/xenix3/libsys/getgid.s
Normal file
|
@ -0,0 +1,7 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _getgid
|
||||
.sect .text
|
||||
_getgid:
|
||||
mov ax,47
|
||||
call syscal
|
||||
ret
|
10
mach/xenix3/libsys/getpgrp.s
Normal file
10
mach/xenix3/libsys/getpgrp.s
Normal 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
|
7
mach/xenix3/libsys/getpid.s
Normal file
7
mach/xenix3/libsys/getpid.s
Normal file
|
@ -0,0 +1,7 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _getpid
|
||||
.sect .text
|
||||
_getpid:
|
||||
mov ax,20
|
||||
call syscal
|
||||
ret
|
8
mach/xenix3/libsys/getppid.s
Normal file
8
mach/xenix3/libsys/getppid.s
Normal 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
|
7
mach/xenix3/libsys/getuid.s
Normal file
7
mach/xenix3/libsys/getuid.s
Normal file
|
@ -0,0 +1,7 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _getuid
|
||||
.sect .text
|
||||
_getuid:
|
||||
mov ax,24
|
||||
call syscal
|
||||
ret
|
5
mach/xenix3/libsys/gtty.c
Normal file
5
mach/xenix3/libsys/gtty.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
gtty(fildes, arg)
|
||||
char *arg;
|
||||
{
|
||||
return ioctl(fildes, ('t' << 8) | 8, arg);
|
||||
}
|
52
mach/xenix3/libsys/head_em.s
Normal file
52
mach/xenix3/libsys/head_em.s
Normal 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:
|
6
mach/xenix3/libsys/ioctl.s
Normal file
6
mach/xenix3/libsys/ioctl.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _ioctl
|
||||
.sect .text
|
||||
_ioctl:
|
||||
mov ax,54
|
||||
jmp sysal
|
6
mach/xenix3/libsys/kill.s
Normal file
6
mach/xenix3/libsys/kill.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _kill
|
||||
.sect .text
|
||||
_kill:
|
||||
mov ax,37
|
||||
jmp sysal
|
6
mach/xenix3/libsys/link.s
Normal file
6
mach/xenix3/libsys/link.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _link
|
||||
.sect .text
|
||||
_link:
|
||||
mov ax,9
|
||||
jmp sysal
|
6
mach/xenix3/libsys/lock.s
Normal file
6
mach/xenix3/libsys/lock.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _lock
|
||||
.sect .text
|
||||
_lock:
|
||||
mov ax,45
|
||||
jmp sysal
|
23
mach/xenix3/libsys/locking.s
Normal file
23
mach/xenix3/libsys/locking.s
Normal 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
|
25
mach/xenix3/libsys/lseek.s
Normal file
25
mach/xenix3/libsys/lseek.s
Normal 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
|
6
mach/xenix3/libsys/mknod.s
Normal file
6
mach/xenix3/libsys/mknod.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _mknod
|
||||
.sect .text
|
||||
_mknod:
|
||||
mov ax,14
|
||||
jmp sysal
|
6
mach/xenix3/libsys/mount.s
Normal file
6
mach/xenix3/libsys/mount.s
Normal 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
19
mach/xenix3/libsys/nap.s
Normal 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
|
6
mach/xenix3/libsys/nbwaitsem.s
Normal file
6
mach/xenix3/libsys/nbwaitsem.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _nbwaitsem
|
||||
.sect .text
|
||||
_nbwaitsem:
|
||||
mov ax,1576
|
||||
jmp sysal
|
6
mach/xenix3/libsys/nice.s
Normal file
6
mach/xenix3/libsys/nice.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _nice
|
||||
.sect .text
|
||||
_nice:
|
||||
mov ax,34
|
||||
jmp sysal
|
6
mach/xenix3/libsys/open.s
Normal file
6
mach/xenix3/libsys/open.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _open
|
||||
.sect .text
|
||||
_open:
|
||||
mov ax,5
|
||||
jmp sysal
|
6
mach/xenix3/libsys/opensem.s
Normal file
6
mach/xenix3/libsys/opensem.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _opensem
|
||||
.sect .text
|
||||
_opensem:
|
||||
mov ax,808
|
||||
jmp sysal
|
11
mach/xenix3/libsys/pause.s
Normal file
11
mach/xenix3/libsys/pause.s
Normal 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
14
mach/xenix3/libsys/pipe.c
Normal 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;
|
||||
}
|
6
mach/xenix3/libsys/profil.c
Normal file
6
mach/xenix3/libsys/profil.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
profil(buff, bufsiz, offset, scale)
|
||||
char *buff;
|
||||
int (*offset)();
|
||||
{
|
||||
_profil(buff, bufsiz, offset, scale, 7262);
|
||||
}
|
23
mach/xenix3/libsys/ptrace.s
Normal file
23
mach/xenix3/libsys/ptrace.s
Normal 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
|
15
mach/xenix3/libsys/rdchk.s
Normal file
15
mach/xenix3/libsys/rdchk.s
Normal 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
|
6
mach/xenix3/libsys/read.s
Normal file
6
mach/xenix3/libsys/read.s
Normal 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
22
mach/xenix3/libsys/sbrk.s
Normal 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
|
20
mach/xenix3/libsys/sdenter.s
Normal file
20
mach/xenix3/libsys/sdenter.s
Normal 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
|
19
mach/xenix3/libsys/sdfree.s
Normal file
19
mach/xenix3/libsys/sdfree.s
Normal 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
|
19
mach/xenix3/libsys/sdget.c
Normal file
19
mach/xenix3/libsys/sdget.c
Normal 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);
|
||||
}
|
19
mach/xenix3/libsys/sdgetv.s
Normal file
19
mach/xenix3/libsys/sdgetv.s
Normal 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
|
19
mach/xenix3/libsys/sdleave.s
Normal file
19
mach/xenix3/libsys/sdleave.s
Normal 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
|
20
mach/xenix3/libsys/sdwaitv.s
Normal file
20
mach/xenix3/libsys/sdwaitv.s
Normal 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
|
6
mach/xenix3/libsys/setgid.s
Normal file
6
mach/xenix3/libsys/setgid.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _setgid
|
||||
.sect .text
|
||||
_setgid:
|
||||
mov ax,46
|
||||
jmp sysal
|
6
mach/xenix3/libsys/setuid.s
Normal file
6
mach/xenix3/libsys/setuid.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _setuid
|
||||
.sect .text
|
||||
_setuid:
|
||||
mov ax,23
|
||||
jmp sysal
|
14
mach/xenix3/libsys/shutdn.s
Normal file
14
mach/xenix3/libsys/shutdn.s
Normal 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
123
mach/xenix3/libsys/signal.s
Normal 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
|
6
mach/xenix3/libsys/sigsem.s
Normal file
6
mach/xenix3/libsys/sigsem.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _sigsem
|
||||
.sect .text
|
||||
_sigsem:
|
||||
mov ax,1064
|
||||
jmp sysal
|
6
mach/xenix3/libsys/stat.s
Normal file
6
mach/xenix3/libsys/stat.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _stat
|
||||
.sect .text
|
||||
_stat:
|
||||
mov ax,18
|
||||
jmp sysal
|
5
mach/xenix3/libsys/stime.c
Normal file
5
mach/xenix3/libsys/stime.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
stime(p)
|
||||
long *p;
|
||||
{
|
||||
return _stime(*p);
|
||||
}
|
5
mach/xenix3/libsys/stty.c
Normal file
5
mach/xenix3/libsys/stty.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
stty(fildes, arg)
|
||||
char *arg;
|
||||
{
|
||||
return ioctl(fildes, ('t' << 8) | 9, arg);
|
||||
}
|
7
mach/xenix3/libsys/sync.s
Normal file
7
mach/xenix3/libsys/sync.s
Normal 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
70
mach/xenix3/libsys/sys.s
Normal 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
11
mach/xenix3/libsys/time.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
long _time();
|
||||
|
||||
long
|
||||
time(p)
|
||||
long *p;
|
||||
{
|
||||
long l = _time();
|
||||
if (p) *p = l;
|
||||
|
||||
return l;
|
||||
}
|
19
mach/xenix3/libsys/times.s
Normal file
19
mach/xenix3/libsys/times.s
Normal 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
|
22
mach/xenix3/libsys/ulimit.s
Normal file
22
mach/xenix3/libsys/ulimit.s
Normal 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
|
6
mach/xenix3/libsys/umask.s
Normal file
6
mach/xenix3/libsys/umask.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _umask
|
||||
.sect .text
|
||||
_umask:
|
||||
mov ax,60
|
||||
jmp sysal
|
6
mach/xenix3/libsys/umount.s
Normal file
6
mach/xenix3/libsys/umount.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _umount
|
||||
.sect .text
|
||||
_umount:
|
||||
mov ax,22
|
||||
jmp sysal
|
6
mach/xenix3/libsys/uname.s
Normal file
6
mach/xenix3/libsys/uname.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _uname
|
||||
.sect .text
|
||||
_uname:
|
||||
mov ax,57
|
||||
jmp sysal
|
6
mach/xenix3/libsys/unlink.s
Normal file
6
mach/xenix3/libsys/unlink.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _unlink
|
||||
.sect .text
|
||||
_unlink:
|
||||
mov ax,10
|
||||
jmp sysal
|
6
mach/xenix3/libsys/ustat.s
Normal file
6
mach/xenix3/libsys/ustat.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _ustat
|
||||
.sect .text
|
||||
_ustat:
|
||||
mov ax,569
|
||||
jmp sysal
|
6
mach/xenix3/libsys/utime.s
Normal file
6
mach/xenix3/libsys/utime.s
Normal 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
11
mach/xenix3/libsys/wait.c
Normal 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;
|
||||
}
|
6
mach/xenix3/libsys/waitsem.s
Normal file
6
mach/xenix3/libsys/waitsem.s
Normal file
|
@ -0,0 +1,6 @@
|
|||
.sect .text; .sect .rom; .sect .data; .sect .bss
|
||||
.define _waitsem
|
||||
.sect .text
|
||||
_waitsem:
|
||||
mov ax,1320
|
||||
jmp sysal
|
6
mach/xenix3/libsys/write.s
Normal file
6
mach/xenix3/libsys/write.s
Normal 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
16
mach/xenix3/libsys/xdup.s
Normal 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
|
Loading…
Reference in a new issue