execle.e
execv.e
execve.e
-_exit.e
fork.e
fstat.e
ftime.e
wait.e
write.e
errno.e
+_alarm.e
+_brk.e
+_close.e
+_creat.e
+_dup.e
+_dup2.e
+_execl.e
+_exit.e
+_fork.e
+_fstat.e
+_ftime.e
+_getpid.e
+_gtty.c
+_ioctl.e
+_kill.e
+_link.e
+_lseek.e
+_open.e
+_pause.e
+_pipe.e
+_read.e
+_sbrk.e
+_unlink.e
+_wait.e
+_write.e
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_alarm
+ pro $_alarm,0
+ lol 0
+ loc 27
+ mon
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+#include <em_abs.h>
+
+ mes 2,EM_WSIZE,EM_PSIZE
+
+.1
+ bss EM_PSIZE,0,0
+.2
+ bss EM_WSIZE,0,0
+
+ pro $ctch,0
+ lol 0
+ loc EHEAP
+ beq *1
+ lae .1
+ loi EM_PSIZE
+ sig
+ asp EM_PSIZE
+ lol 0
+ trp
+ rtt
+1
+ loc 1
+ ste .2
+ rtt
+ end
+
+
+ exp $_brk
+ pro $_brk,0
+ lpi $ctch
+ sig
+ lae .1
+ sti EM_PSIZE
+ loc 0
+ ste .2
+ lal 0
+ loi EM_PSIZE
+ str 2 ; The - possibly - occurring trap is caught
+ lae .1
+ loi EM_PSIZE
+ sig
+ asp EM_PSIZE
+ loe .2
+ zgt *1
+ zer EM_PSIZE
+ ret EM_PSIZE
+1
+ loc -1
+ loc EM_WSIZE
+ loc EM_PSIZE
+ cii
+ ret EM_PSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_close
+ pro $_close,0
+ lol 0
+ loc 6
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_creat
+ pro $_creat,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 8
+ mon
+ zeq *1
+ ste errno ; since e==r0
+ loc -1
+1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_dup
+ pro $_dup,0
+ lol 0
+ _dup EM_WSIZE
+ loc 41
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_dup2
+ pro $_dup2,0
+ lal 0
+ loi 2*EM_WSIZE
+ loc 64
+ ior EM_WSIZE
+ loc 41
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_execl
+ pro $_execl,0
+ lae _penvp
+ loi EM_PSIZE
+ lal EM_PSIZE
+ lal 0
+ loi EM_PSIZE
+ loc 59
+ mon
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+
+ exp $_fork
+ pro $_fork,0
+ loc 2
+ mon
+ zeq *1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+1
+ zeq *2
+ asp EM_WSIZE
+ loc 0
+2
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_fstat
+ pro $_fstat,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 28
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_ftime
+ pro $_ftime,0
+ lal 0
+ loi EM_PSIZE
+ loc 35
+ mon
+ ret 0
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_getpid
+ pro $_getpid,0
+ loc 20
+ mon
+ ret EM_WSIZE
+ end
--- /dev/null
+/* $Header$ */
+#include <sgtty.h>
+int
+_gtty(fildes,argp) int fildes ; struct sgttyb *argp ; {
+ return _ioctl(fildes,TIOCGETP,argp) ;
+}
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_ioctl
+ pro $_ioctl,0
+ lal 0
+ loi EM_PSIZE+2*EM_WSIZE
+ loc 54
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_kill
+ pro $_kill,0
+ ldl 0
+ loc 37
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_link
+ pro $_link,0
+ lal 0
+ loi 2*EM_PSIZE
+ loc 9
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_lseek
+ pro $_lseek,0
+ lal 0
+ loi 4*EM_WSIZE
+ loc 19
+ mon
+ zeq *1
+ ste errno
+#if EM_WSIZE==1
+ ldc -1
+ loc 2
+ loc 4
+ cii
+#endif
+#if EM_WSIZE==2
+ ldc -1
+#endif
+#if EM_WSIZE==4
+ loc -1
+#endif
+1
+#if EM_WSIZE==1
+ ret 4*EM_WSIZE
+#endif
+#if EM_WSIZE==2
+ ret 2*EM_WSIZE
+#endif
+#if EM_WSIZE==4
+ ret EM_WSIZE
+#endif
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_open
+ pro $_open,0
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 5
+ mon
+ zeq *1
+ ste errno
+ loc -1
+1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_pause
+ pro $_pause,0
+ loc 29
+ mon
+ ret 0
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_pipe
+ pro $_pipe,0
+ loc 42
+ mon
+ zeq *1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+1
+ lal 0
+ loi EM_PSIZE
+ stf EM_WSIZE
+ sil 0
+ loc 0
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_read
+ pro $_read,0
+ lol EM_WSIZE+EM_PSIZE
+ loc EM_WSIZE
+ loc EM_PSIZE
+ ciu
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 3
+ mon
+ zne *1
+ loc EM_PSIZE
+ loc EM_WSIZE
+ cui
+ bra *2
+1
+ ste errno
+ loc -1
+2
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+#include <em_abs.h>
+
+ mes 2,EM_WSIZE,EM_PSIZE
+
+.1
+ bss EM_PSIZE,0,0
+.2
+ bss EM_WSIZE,0,0
+
+ pro $ctch,0
+ lol 0
+ loc EHEAP
+ beq *1
+ lae .1
+ loi EM_PSIZE
+ sig
+ asp EM_PSIZE
+ lol 0
+ trp
+ rtt
+1
+ loc 1
+ ste .2
+ rtt
+ end
+
+
+ exp $_sbrk
+ pro $_sbrk,0
+ lor 2
+ lor 2
+ lpi $ctch
+ sig
+ lae .1
+ sti EM_PSIZE
+ loc 0
+ ste .2
+ lol 0
+ ads EM_WSIZE ; this is the new heap pointer, but watch out for overflow!
+ dup EM_PSIZE
+ lor 2
+ cmp ; compare with old heap pointer
+ zlt *1
+ str 2 ; The - possibly - occurring trap is caught
+ lae .1
+ loi EM_PSIZE
+ sig
+ asp EM_PSIZE
+ loe .2
+ zgt *1
+ ret EM_PSIZE
+1
+ asp EM_PSIZE
+ loc -1
+ loc EM_WSIZE
+ loc EM_PSIZE
+ cii
+ ret EM_PSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_unlink
+ pro $_unlink,0
+ lal 0
+ loi EM_PSIZE
+ loc 10
+ mon
+ zne *1
+ loc 0
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+#if EM_WSIZE<4
+#define STATUS_SIZE 2
+#else
+#define STATUS_SIZE EM_WSIZE
+#endif
+ exp $_wait
+ pro $_wait,0
+ loc 7
+ mon
+ zne *1
+ lal 0
+ loi EM_PSIZE
+ zer EM_PSIZE
+ cms EM_PSIZE
+ zeq *2
+#if EM_WSIZE==1
+ lal 0
+ loi EM_PSIZE
+ sti 2 ; 2 bytes, not one int!
+#else
+ sil 0
+#endif
+ ret EM_WSIZE
+2
+ asp STATUS_SIZE
+ ret EM_WSIZE
+1
+ ste errno
+ loc -1
+ ret EM_WSIZE
+ end
--- /dev/null
+#
+ mes 2,EM_WSIZE,EM_PSIZE
+ exp $_write
+ pro $_write,0
+ lol EM_WSIZE+EM_PSIZE
+ loc EM_WSIZE
+ loc EM_PSIZE
+ ciu
+ lal 0
+ loi EM_WSIZE+EM_PSIZE
+ loc 4
+ mon
+ zne *1
+ loc EM_PSIZE
+ loc EM_WSIZE
+ cui
+ bra *2
+1
+ ste errno
+ loc -1
+2
+ ret EM_WSIZE
+ end
/* $Header$ */
#include <sgtty.h>
-int gtty(fildes,argp) int fildes ; struct sgttyb *argp ; {
+int
+gtty(fildes,argp) int fildes ; struct sgttyb *argp ; {
return ioctl(fildes,TIOCGETP,argp) ;
}
/* $Header$ */
#include <sgtty.h>
-int stty(fildes,argp) int fildes ; struct sgttyb *argp ; {
+int
+stty(fildes,argp) int fildes ; struct sgttyb *argp ; {
return ioctl(fildes,TIOCSETP,argp) ;
}
/* $Header$ */
#include <sys/types.h>
#include <sys/timeb.h>
-time_t time(timpt) time_t *timpt ; {
+time_t
+time(timpt) time_t *timpt ; {
struct timeb buf ;
ftime(&buf) ;