@@ -3,6 +3,8 @@ _alarm.s
_sbrk.s
_brk.s
_close.s
+_creat.s
+_dup.s
_execl.s
_execve.s
_fork.s
@@ -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
@@ -0,0 +1,8 @@
+
+.define __dup
+.extern __dup, cerror
+__dup: int 0xc9
@@ -16,6 +16,7 @@ chroot.s
close.s
creat.s
dup.s
_dup.s
errmon.s
@@ -0,0 +1,13 @@
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.sect .text
+creat = 8
+.align 1
+__creat:
+ .data2 0x0000
+ chmk $creat
+ bcc 1f
+ jmp errmon
+1:
@@ -4,6 +4,7 @@ _ftime.c
_gtty.c
_pause.c
_gettimday.s
_open.s
_sigpause.s
@@ -14,6 +15,7 @@ _fstat.s
_ioctl.s
_pipe.s
_wait.s
_dup2.s
_kill.s
_read.s
@@ -0,0 +1,3 @@
+#include "syscall.h"
+DEFINE(__creat)
+SYSTEM(SYS_creat)
+DEFINE(__dup)
+SYSTEM(SYS_dup)
@@ -8,7 +8,9 @@ chmod.s
chown.s
chroot.s
dup2.c
_dup2.c
@@ -0,0 +1,12 @@
+ jmp cerror
+dup = 41
+__dup:
+ chmk $dup
@@ -83,7 +83,9 @@ _Xwait.s
_alarm.s
+_dup.c
_execl.c
_exit.s
@@ -0,0 +1,6 @@
+ mov ax,8
+ jmp sysal
@@ -0,0 +1,5 @@
+int
+_dup(d)
+{
+ return __xdup(d, 0);
+}