Added entry points for ANSI C

This commit is contained in:
ceriel 1990-01-19 16:03:46 +00:00
parent 86b0d0bc80
commit 0939a12a70
25 changed files with 344 additions and 3 deletions

View file

@ -2,44 +2,63 @@ libmon_s.a
exit.c
cleanup.c
gtty.c
_gtty.c
stty.c
_exit.s
access.s
acct.s
alarm.s
_alarm.s
chdir.s
chmod.s
chown.s
chroot.s
close.s
_close.s
creat.s
dup.s
_dup.s
errmon.s
_execl.s
execl.s
execle.s
execv.s
execve.s
_execve.s
fork.s
_fork.s
fstat.s
_fstat.s
ftime.s
_ftime.s
getgid.s
getpid.s
_getpid.s
getuid.s
ioctl.s
_ioctl.s
kill.s
_kill.s
link.s
_link.s
lseek.s
_lseek.s
mknod.s
mount.s
mpx.s
nice.s
open.s
_open.s
pause.s
_pause.s
pipe.s
_pipe.s
profil.s
ptrace.s
_read.s
read.s
sbrk.s
_sbrk.s
setgid.s
setuid.s
signal.s
@ -52,6 +71,7 @@ times.s
umask.s
umount.s
unlink.s
_unlink.s
utime.s
vadvise.s
vfork.s
@ -62,4 +82,6 @@ vtimes.s
vwait.s
vwrite.s
wait.s
_wait.s
write.s
_write.s

View file

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

View file

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

View file

@ -0,0 +1,21 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define __dup
.define __dup2
dup = 41
.align 1
__dup:
.data2 0x0000
brb 1f
.align 1
__dup2:
.data2 0x0000
bisb2 $0100,4(ap)
1:
chmk $dup
bcc 1f
jmp errmon
1:
ret

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,18 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
.define __getpid
.define __getppid
getpid = 20
.align 1
__getpid:
.data2 0x0000
chmk $getpid
ret
.align 1
__getppid:
.data2 0x0000
chmk $getpid
movl r1,r0
ret

View file

@ -0,0 +1,8 @@
#include <sgtty.h>
int
_gtty(fildes,argp)
int fildes ;
struct sgttyb *argp ;
{
return ioctl(fildes,TIOCGETP,argp) ;
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,34 @@
.sect .text; .sect .rom; .sect .data; .sect .bss
.sect .text
break = 17
.define __sbrk
.define __brk
.align 1
__sbrk:
.data2 0x0000
addl3 Ibrk,4(ap),-(sp)
bcc 1f
movl $0xFFFFFFFF,(sp) ! will cause an error (I hope)
1:
movl Ibrk,r3
calls $1,_brk
tstl r0
blss 1f
movl r3,r0
1:
ret
.align 1
__brk:
.data2 0x0000
chmk $break
bcc 1f
jmp errmon
1:
movl 4(ap),Ibrk
clrl r0
ret
.sect .data
Ibrk: .data4 endbss

View file

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

View file

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

View file

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

View file

@ -1,5 +1,6 @@
#include <sgtty.h>
int gtty(fildes,argp)
int
gtty(fildes,argp)
int fildes ;
struct sgttyb *argp ;
{

View file

@ -3,7 +3,6 @@
break = 17
.define _sbrk
.define _brk
.define _end
.align 1
_sbrk:
@ -32,4 +31,4 @@ _brk:
ret
.sect .data
Ibrk: .data4 _end
Ibrk: .data4 endbss