diff -ru ash/README.elks ash-elks-3/README.elks
--- ash/README.elks	Wed Feb 25 02:34:44 1998
+++ ash-elks-3/README.elks	Wed Feb 25 02:39:40 1998
@@ -69,3 +69,18 @@
     bcc complained about "invalid indirect to indirect" errors.
 
 --------------------------------------------------------------
+19980225 Vincent Zweije <zweije@xs4all.nl>
+
+FIXES:
+
+(*) elks now supports the TCGETS ioctl(), so libc's isatty() works again.
+    Removed the eisatty() substitute again.
+
+(*) system call read() clobbers register SI containing register variable
+    p in preadbuffer() in input.c.  Made workaround.
+
+TODO:
+
+(*) Find out where the read()-clobbers-SI bug originates.
+
+--------------------------------------------------------------
diff -ru ash/input.c ash-elks-3/input.c
--- ash/input.c	Wed Feb 11 04:25:53 1998
+++ ash-elks-3/input.c	Wed Feb 25 02:36:45 1998
@@ -207,8 +207,14 @@
     } else {
 #endif
 retry:
+	/*
+	 * 19980225 Vincent Zweije <zweije@xs4all.nl>
+	 * read() seems to clobber register SI with its first argument
+	 * This changed p which was kept in SI
+	 * Now assigning p *after* the read() call
+	 */
+	i = read(parsefile->fd, parsefile->buf, BUFSIZ);
 	p = parsenextc = parsefile->buf;
-	i = read(parsefile->fd, p, BUFSIZ);
 	if (i <= 0) {
                 if (i < 0) {
                         if (errno == EINTR)
diff -ru ash/miscbltin.c ash-elks-3/miscbltin.c
--- ash/miscbltin.c	Mon Feb 16 02:04:44 1998
+++ ash-elks-3/miscbltin.c	Wed Feb 25 02:36:45 1998
@@ -82,7 +82,7 @@
 		else
 			eflag = 1;
 	}
-	if (prompt && eisatty(0)) {
+	if (prompt && isatty(0)) {
 		out2str(prompt);
 		flushall();
 	}
diff -ru ash/options.c ash-elks-3/options.c
--- ash/options.c	Mon Feb 16 02:04:44 1998
+++ ash-elks-3/options.c	Wed Feb 25 02:36:45 1998
@@ -52,9 +52,6 @@
 #include "memalloc.h"
 #include "error.h"
 #include "mystring.h"
-#include <termios.h>
-#include <sys/stat.h>
-#include <errno.h>
 
 char *arg0;			/* value of $0 */
 struct shparam shellparam;	/* current positional parameters */
@@ -75,28 +72,6 @@
 #endif
 
 
-/*
- * Determine if a file descriptor is connected to a tty
- *
- * 19980216 Vincent Zweije <zweije@xs4all.nl>
- * bcc libc's isatty() is broken in ELKS,
- * because ELKS does not support the TCGETS ioctl().
- * Hence this isatty() replacement.
- */
-
-int eisatty(fd)
-int fd;
-{  struct termios tios;
-   struct stat st;
-   if (ioctl(fd,TCGETS,&tios)==0)       /* The normal way */
-      return 1;
-   else if ((errno==ENOSYS || errno==EINVAL) && fstat(fd,&st)==0)
-                                        /* Guess a character device is ok */
-      return S_ISCHR(st.st_mode);
-   else if (errno==ENOSYS)              /* Last guess */
-      return fd<3;
-}
-
 
 /*
  * Process the shell command line arguments.
@@ -116,7 +91,7 @@
 	options(1);
 	if (*argptr == NULL && minusc == NULL)
 		sflag = 1;
-	editable = (eisatty(0) && eisatty(1));
+	editable = (isatty(0) && isatty(1));
 	if (iflag == 2 && sflag == 1 && editable)
 		iflag = 1;
 	if (jflag == 2)
diff -ru ash/options.h ash-elks-3/options.h
--- ash/options.h	Mon Feb 16 02:04:44 1998
+++ ash-elks-3/options.h	Wed Feb 25 02:36:45 1998
@@ -82,11 +82,9 @@
 void setparam(char **);
 void freeparam(struct shparam *);
 int nextopt(char *);
-int eisatty(int);
 #else
 void procargs();
 void setparam();
 void freeparam();
 int nextopt();
-int eisatty();
 #endif
