stime.c
time.c
wait.c
-_exit.s
-_pipe.s
-_profil.s
-_stime.s
-_time.s
-_wait.s
+xwait.s
+xpipe.s
+xprofil.s
+xstime.s
+xtime.s
access.s
acct.s
alarm.s
utime.s
write.s
xdup.s
+_alarm.s
+_brk.s
+_close.s
+_creat.s
+_dup.c
+_dup2.c
+_execl.c
+_execve.s
+_exit.s
+_fork.s
+_fstat.s
+_ftime.s
+_getpid.s
+_gtty.c
+_ioctl.s
+_kill.s
+_link.s
+_lseek.s
+_open.s
+_pause.s
+_pipe.c
+_read.s
+_sbrk.s
+_unlink.s
+_wait.c
+_write.s
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __alarm
+.sect .text
+__alarm:
+ mov ax,27
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __brk
+.sect .text
+__brk:
+ mov ax,17
+ callf 0x7:0x0
+ jb 1f
+ mov ax,4(sp)
+ mov (.limhp),ax
+ xor ax,ax
+ ret
+1:
+ jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __close
+.sect .text
+__close:
+ mov ax,6
+ jmp sysx
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __creat
+.sect .text
+__creat:
+ mov ax,8
+ jmp syscal
--- /dev/null
+int
+_dup(d)
+{
+ return __xdup(d, 0);
+}
--- /dev/null
+int
+_dup2(oldd, newd)
+{
+ oldd |= 64;
+ return __xdup(oldd, newd);
+}
--- /dev/null
+int
+_execl(name,args)
+ char *name;
+ int args;
+{
+ extern char **environ;
+
+ return _execve(name,&args,environ);
+}
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __execve
+.sect .text
+__execve:
+ mov ax,59
+ callf 0x7:0x0
+ jmp cerror
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __fork
+.sect .text
+__fork:
+ mov ax,2
+ callf 0x7:0x0
+ jb 1f
+ and dx,dx
+ jne 2f
+ ret
+1:
+ jmp cerror
+2:
+ xor ax,ax
+ ret
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __fstat
+.sect .text
+__fstat:
+ mov ax,28
+ jmp sysx
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __ftime
+.sect .text
+__ftime:
+ mov ax,2856
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __getpid
+.sect .text
+__getpid:
+ mov ax,20
+ jmp syscal
--- /dev/null
+_gtty(fildes, arg)
+ char *arg;
+{
+ return _ioctl(fildes, ('t' << 8) | 8, arg);
+}
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __ioctl
+.sect .text
+__ioctl:
+ mov ax,54
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __kill
+.sect .text
+__kill:
+ mov ax,37
+ jmp sysx
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __link
+.sect .text
+__link:
+ mov ax,9
+ jmp sysx
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __lseek
+.sect .text
+__lseek:
+ mov ax,19
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __open
+.sect .text
+__open:
+ mov ax,5
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __pause
+.sect .text
+__pause:
+ mov ax,29
+ jmp syscal
--- /dev/null
+long _xpipe();
+
+int
+_pipe(f)
+ int f[2];
+{
+ long x;
+
+ x = _xpipe();
+ if (x == -1) return -1;
+ f[0] = x;
+ f[1] = x >> 16;
+ return 0;
+}
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __read
+.sect .text
+__read:
+ mov ax,3
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __sbrk
+.sect .text
+__sbrk:
+ push bp
+ mov bp,sp
+ mov ax,8(bp)
+ or ax,ax
+ jne 1f
+ mov ax,(.limhp)
+ pop bp
+ ret
+1:
+ mov bx,(.limhp)
+ add ax,bx
+ push ax
+ call _brk
+ or ax,ax
+ jne 1f
+ pop ax
+ mov (.limhp),ax
+ mov ax,bx
+ pop bp
+ ret
+1:
+ pop ax
+ mov ax,-1
+ pop bp
+ ret
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __unlink
+.sect .text
+__unlink:
+ mov ax,10
+ jmp sysx
--- /dev/null
+long _xwait();
+
+_wait(p)
+ int *p;
+{
+ long l = _xwait();
+
+ if (l == -1) return -1;
+ if (p) *p = (l >> 16);
+ return l & 0xffff;
+}
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __write
+.sect .text
+__write:
+ mov ax,4
+ jmp syscal
-long _pipe();
+long _xpipe();
int
pipe(f)
{
long x;
- x = _pipe();
+ x = _xpipe();
if (x == -1) return -1;
f[0] = x;
f[1] = x >> 16;
+char *_syspc;
+
profil(buff, bufsiz, offset, scale)
char *buff;
int (*offset)();
{
- _profil(buff, bufsiz, offset, scale, 7262);
+ _xprofil(buff, bufsiz, offset, scale, &_syspc);
}
stime(p)
long *p;
{
- return _stime(*p);
+ return _xstime(*p);
}
-long _time();
+long _xtime();
long
time(p)
long *p;
{
- long l = _time();
+ long l = _xtime();
if (p) *p = l;
return l;
-long _wait();
+long _xwait();
wait(p)
int *p;
{
- long l = _wait();
+ long l = _xwait();
if (l == -1) return -1;
if (p) *p = (l >> 16);
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __xpipe
+.sect .text
+__xpipe:
+ mov ax,42
+ callf 0x7:0x0
+ jae 1f
+ jmp cerror
+1:
+ shl dx,0x10
+ or eax,edx
+ ret
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __xprofil
+.sect .text
+__xprofil:
+ mov ax,44
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __xstime
+.sect .text
+__xstime:
+ mov ax,25
+ jmp sysx
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __xtime
+.sect .text
+__xtime:
+ mov ax,13
+ jmp syscal
--- /dev/null
+.sect .text; .sect .rom; .sect .data; .sect .bss
+.define __xwait
+.sect .text
+__xwait:
+ mov ax,7
+ callf 0x7:0x0
+ jb 1f
+ shl dx,0x10
+ or eax,edx
+ ret
+1:
+ jmp cerror