Added some more entry points for ANSI C

This commit is contained in:
ceriel 1990-01-22 10:20:09 +00:00
parent 55fab905c1
commit 666c527a43
14 changed files with 78 additions and 0 deletions

View file

@ -3,6 +3,8 @@ _alarm.s
_sbrk.s
_brk.s
_close.s
_creat.s
_dup.s
_execl.s
_execve.s
_fork.s

7
mach/i86/libsys/_creat.s Normal file
View file

@ -0,0 +1,7 @@
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define __creat
.extern __creat, cerror
__creat: int 0x88
jb 9f
ret
9: jmp cerror

8
mach/i86/libsys/_dup.s Normal file
View file

@ -0,0 +1,8 @@
.sect .text; .sect .rom; .sect .data; .sect .bss; .sect .text
.define __dup
.extern __dup, cerror
__dup: int 0xc9
jb 9f
ret
9: jmp cerror

View file

@ -16,6 +16,7 @@ chroot.s
close.s
_close.s
creat.s
_creat.s
dup.s
_dup.s
errmon.s

View file

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

View file

@ -4,6 +4,7 @@ _ftime.c
_gtty.c
_pause.c
_gettimday.s
_creat.s
_open.s
_sigpause.s
_brk.s
@ -14,6 +15,7 @@ _fstat.s
_ioctl.s
_pipe.s
_wait.s
_dup.s
_dup2.s
_kill.s
_read.s

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(__creat)
SYSTEM(SYS_creat)

View file

@ -0,0 +1,3 @@
#include "syscall.h"
DEFINE(__dup)
SYSTEM(SYS_dup)

View file

@ -8,7 +8,9 @@ chmod.s
chown.s
chroot.s
creat.s
_creat.s
dup.s
_dup.s
dup2.c
_dup2.c
close.s

View file

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

View file

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

View file

@ -83,7 +83,9 @@ _Xwait.s
_alarm.s
_brk.s
_close.s
_creat.s
_dup2.c
_dup.c
_execl.c
_execve.s
_exit.s

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,5 @@
int
_dup(d)
{
return __xdup(d, 0);
}