Added entry points for ANSI C

This commit is contained in:
ceriel 1990-01-19 16:22:03 +00:00
parent 89b736ba83
commit b6038dab22
24 changed files with 324 additions and 0 deletions

View file

@ -2,6 +2,7 @@ libmon_s.a
access.s
acct.s
alarm.s
_alarm.s
chdir.s
chmod.s
chown.s
@ -9,40 +10,59 @@ chroot.s
creat.s
dup.s
dup2.c
_dup2.c
close.s
_close.s
execl.s
_execl.s
execle.s
execv.s
_execv.s
execve.s
_execve.s
exit.c
cleanup.c
fcntl.s
_fcntl.s
fork.s
_fork.s
fstat.s
_fstat.s
getegid.s
geteuid.s
getgid.s
getpid.s
_getpid.s
getppid.s
getuid.s
gtty.s
_gtty.s
ioctl.s
_ioctl.s
kill.s
_kill.s
link.s
_link.s
lseek.s
_lseek.s
mknod.s
mount.s
msg.s
nexect.s
nice.s
open.s
_open.s
pause.s
_pause.s
pipe.s
_pipe.s
plock.s
profil.s
ptrace.s
read.s
_read.s
sbrk.s
_sbrk.s
sem.s
setgid.s
setpgrp.s
@ -61,9 +81,12 @@ umask.s
umount.s
uname.s
unlink.s
_unlink.s
ustat.s
utime.s
wait.s
_wait.s
write.s
_write.s
_exit.s
cerror.s

View file

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

View file

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

View file

@ -0,0 +1,6 @@
int
_dup2(oldfd, newfd)
{
_close(newfd);
return _fcntl(oldfd, 0, newfd);
}

View file

@ -0,0 +1,10 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define __execl
__execl:
.data2 0x0000
pushab 8(ap)
pushl 4(ap)
calls $2,__execv
ret

View file

@ -0,0 +1,11 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define __execv
__execv:
.data2 0x0000
pushl _environ
pushl 8(ap)
pushl 4(ap)
calls $3,__execve
ret

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
gtty = 32
.define __gtty
__gtty:
.data2 0x0000
chmk $gtty
bcc 1f
jmp cerror
1:
ret

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
ioctl = 54
.define __ioctl
__ioctl:
.data2 0x0000
chmk $ioctl
bcc 1f
jmp cerror
1:
ret

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
kill = 37
.define __kill
__kill:
.data2 0x0000
chmk $kill
bcc 1f
jmp cerror
1:
clrl r0
ret

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
link = 9
.define __link
__link:
.data2 0x0000
chmk $link
bcc 1f
jmp cerror
1:
clrl r0
ret

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
lseek = 19
.define __lseek
__lseek:
.data2 0x0000
chmk $lseek
bcc 1f
jmp cerror
1:
ret

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
open = 5
.define __open
__open:
.data2 0x0000
chmk $open
bcc 1f
jmp cerror
1:
ret

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
pause = 29
.define __pause
__pause:
.data2 0x0000
chmk $pause
bcc 1f
jmp cerror
1:
clrl r0
ret

View file

@ -0,0 +1,16 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
pipe = 42
.define __pipe
__pipe:
.data2 0x0000
chmk $pipe
bcc 1f
jmp cerror
1:
movl 4(ap),r2
movl r0,(r2)+
movl r1,(r2)
clrl r0
ret

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
read = 3
.define __read
__read:
.data2 0x0000
chmk $read
bcc 1f
jmp cerror
1:
ret

View file

@ -0,0 +1,38 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
break = 17
.define __sbrk
.define __brk
__sbrk:
.data2 0x0000
movl Ind,r0
tstl 4(ap)
jeql 3f
addl3 r0,4(ap),-(sp)
bcs 1f
pushl $1
movl ap,r3
movl sp,ap
chmk $break
bcc 2f
1:
jmp cerror
2:
movl Ind,r0
addl2 4(r3),Ind
3:
ret
__brk:
.data2 0x0000
chmk $break
bcc 1f
jmp cerror
1:
movl 4(ap),Ind
clrl r0
ret
.sect .data
Ind: .data4 endbss

View file

@ -0,0 +1,13 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
unlink = 10
.define __unlink
__unlink:
.data2 0x0000
chmk $unlink
bcc 1f
jmp cerror
1:
clrl r0
ret

View file

@ -0,0 +1,16 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
wait = 7
.define __wait
__wait:
.data2 0x0000
chmk $wait
bcc 1f
jmp cerror
1:
tstl 4(ap)
beql 1f
movl r1,*4(ap)
1:
ret

View file

@ -0,0 +1,12 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
write = 4
.define __write
__write:
.data2 0x0000
chmk $write
bcc 1f
jmp cerror
1:
ret